Created
April 15, 2016 12:41
-
-
Save rsantosdev/45ccb7f7dd88563d4bcee34f3185c458 to your computer and use it in GitHub Desktop.
Monitor or trace slow queries on rethinkdb cluster.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r.db("rethinkdb").table('jobs') | |
.filter(function(j){ | |
return j('type').eq('query') | |
.and(j('duration_sec').gt(0.001)) | |
.and(j('info')('query').match('jobs').eq(null)) | |
.and(j('info')('query').match('rethinkdb').eq(null)); | |
}) | |
.changes(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment