client.on('ready', () => { console.log(`ready with ${client.users.cache.size} users`); console.timeEnd('magic'); });
// This function copies the rest of the static assets to their subfolder in the // build directory. function copyStatic () { console.log('[ncp] build/static started') const labelForBuild = '[ncp] build/static finished' console.time(labelForBuild) fs.mkdir(path.join(__dirname, 'build/static'), { recursive: true }, (err) => { if (err) { throw err } ncp(path.join(__dirname, 'static'), path.join(__dirname, 'build/static'), (error) => { if (error) { return console.error(error) } console.timeEnd(labelForBuild) }) }) }
console.timeEnd('init')
console.timeEnd('Pulled containers'); });
console.timeEnd(labelForBuild) }) })
log('Command line args:', argv) processArgv(argv) console.timeEnd('init') })
console.timeEnd('init')
console.timeEnd(labelForBuild) })
// based on this gist: // https://gist.github.com/sqren/5083d73f184acae0c5b7 function slowFunction(baseNumber) { console.time(`slowFunction ${baseNumber}`); var result = 0; for (var i = Math.pow(baseNumber, 10); i >= 0; i--) { result += Math.atan(i) * Math.tan(i); } console.timeEnd(`slowFunction ${baseNumber}`); return result; }
len += TestJSON(); console.timeEnd('test JSON time'); console.log('JSON length total:', len); }); len += TestProtbuf(protobuf); console.timeEnd('test Protobuf time'); console.log('Protobuf length total:', len); len += TestProtbuf(protobufCache); console.timeEnd('test ProtobufCache time'); console.log('ProtobufCache length total:', len);
/* eslint-env mocha, browser */ /* global proclaim */ describe('console', function () { it('timeEnd()', function () { proclaim.doesNotThrow(function () { console.time('testTimeEnd'); console.timeEnd('testTimeEnd'); }); }); });
function benchMemoFetch () { console.time('memoized-make-fetch-happen') return _memoFetchLoop(TIMES).then(() => { console.timeEnd('memoized-make-fetch-happen') }) }
len += TestJSON(); console.timeEnd('test JSON time'); console.log('JSON length total:', len); }); len += TestProtbuf(protobuf); console.timeEnd('test Protobuf time'); console.log('Protobuf length total:', len); len += TestProtbuf(protobufCache); console.timeEnd('test ProtobufCache time'); console.log('ProtobufCache length total:', len);