Created
October 7, 2014 10:11
-
-
Save Unitech/185c4e85f6ba1a8c22e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var profiler = require('profiler'); | |
profiler.monitor('redis', redisClient); | |
// What is redisCLient ? Is it the return of require('redis') ? | |
profiler.monitor('mongodb', mongodb_client); | |
profiler.monitor('rethinkdb', rethinkdb_client); | |
profiler.on('query', function(parameters){ | |
console.log(parameters); | |
/** | |
* | |
* Get something like | |
* | |
* { | |
* db : 'redis', | |
* timespan : 35, // time took to do the query | |
* at : 234234423 // UTC time when the query has been finished | |
* arguments : { | |
* {} {} // Mixed object that can describe in details the query (parameters...) | |
* } | |
* } | |
* | |
*******/ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// What is redisCLient ? Is it the return of require('redis') ?
no, instance of redis client