How to use the Bench function from hoek
Find comprehensive JavaScript hoek.Bench code examples handpicked from public code repositorys.
GitHub: janl/good
19 20 21 22 23 24 25 26 27 28
}; internals.ProcessMonitor.prototype.delay = function (callback) { var bench = new Hoek.Bench(); setImmediate(function () { return callback(null, bench.elapsed()); });
165
1
2
+ 3 other calls in file
GitHub: wolfeidau/svcs
17 18 19 20 21 22 23 24 25
statsd.gauge('os.gauge.load.short', load.pop()); statsd.gauge('node.gauge.process.rss', memory.rss); statsd.gauge('node.gauge.process.heapTotal', memory.heapTotal); statsd.gauge('node.gauge.process.heapUsed', memory.heapUsed); var bench = new hoek.Bench(); setImmediate(function () { statsd.gauge('node.gauge.process.event.delay', bench.elapsed()); });
1
0
2
GitHub: Cron-J/hapi
25 26 27 28 29 30 31 32 33
Events.EventEmitter.call(this); // Take measurement as soon as possible this._bench = new Hoek.Bench(); var now = Date.now(); // Public members
0
0
10
64 65 66 67 68 69 70 71 72
}; internals.handler = function (request, callback) { var timer = new Hoek.Bench(); var finalize = function (response) { // Check for Error result
0
0
0
GitHub: KyleAMathews/hapi
99 100 101 102 103 104 105 106 107 108
// Server load Hoek.assert(this.settings.load.sampleInterval || (!this.settings.load.maxEventLoopDelay && !this.settings.load.maxHeapUsedBytes && !this.settings.load.maxRssBytes), 'Load sample interval must be set in enable load limits'); this._eventLoopTimer = null; this._loadBench = new Hoek.Bench(); this.load = { eventLoopDelay: 0, heapUsed: 0, rss: 0
0
0
3
hoek.assert is the most popular function in hoek (1712 examples)