Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dirty.on('drain', function() {
var start = Date.now();
require('dirty')(DB_FILE).on('load', function(length) {
var ms = Date.now() - start,
mhz = ((COUNT / (ms / 1000)) / 1e3).toFixed(2),
million = COUNT / 1e6;
// Can't use console.log() since since I also test this in ancient node versions
util.log(mhz+' Hz ('+million+' million in '+ms+' ms)');
loaded = true;
assert.equal(length, COUNT);
});
});