// 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.time('Pulled containers'); if (!stdout.includes('selenoid/video-recorder')) { output.debug('Pulling selenoid/video-recorder...');
function mapStr(base, target) { var isMatch = [] console.time('normal') var times = 0 for(var i = 0; i < base.length; i++) {
console.log('[sass] static/css started') const labelForBuild = '[sass] static/css finished' console.time(labelForBuild)
function mapKMPStr(base, target) { var isMatch = [] var pmt = pmtArr(target) console.time('kmp') var times = 0 for(var i = 0; i < base.length; i++) {
console.log(`[metalsmith] build/${locale} started`) const labelForBuild = `[metalsmith] build/${locale} finished` console.time(labelForBuild) const metalsmith = Metalsmith(__dirname)
// 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; }
/* eslint-env mocha, browser */ /* global proclaim */ describe('console', function () { it('timeEnd()', function () { proclaim.doesNotThrow(function () { console.time('testTimeEnd'); console.timeEnd('testTimeEnd'); }); }); });
function main() { console.log(`Starting client on host '${os.hostname()}' w/ target server ${SERVER_URL} ...`) console.time('runtime') if (/:\/\//.test(SERVER_URL)) { loadTask() } else { throw new FatalError('Invalid SERVER_URL environment variable!') } }
function benchFetch () { console.time('fetch') return _fetchLoop(TIMES).then(() => { console.timeEnd('fetch') }) }
async function main() { const trs = buildTransactions(10) console.time('time usage') await submitTransactions(trs) console.timeEnd('time usage') }
function test(name, fun) { console.time(name); for (let i = 0; i < 1e6; i++) { fun.computeSum(); } console.timeEnd(name); }
function benchMemoFetch () { console.time('memoized-make-fetch-happen') return _memoFetchLoop(TIMES).then(() => { console.timeEnd('memoized-make-fetch-happen') }) }