import { Bench } from 'tinybench' const bench = new Bench({ name: 'simple benchmark', time: 100 }) bench .add('faster task', () => { console.log('I am faster') }) .add('slower task', async () => { await new Promise(resolve => setTimeout(resolve, 1)) // we wait 1ms :) console.log('I am slower') }) await bench.run() console.log(bench.name) console.table(bench.table()) // Output: // simple benchmark
By Jacek Schae Also available in: Turkish — thanks to @erdenizZz, Portugues — thanks to @felipefialho For the third time, we are comparing Front-End frameworks by using the Real World example apps. RealWorld example app gives us: RealWorld App Something more than a “todo”. Usually “todos” don’t convey enough knowledge and perspective to actually build real applications. Standardized A project that
High, Low, AverageWedgetail gives you accurate timings for the best, worst and average timings. Measure thousands of executionsGet accurate statistics out of the box, by setting `numberOfExecutions` to at least 5000. import test from "ava"; import { timeExecution } from "wedgetail"; test("Can time a function", async t => { // This object contains a definition of the threshold // at which your func
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く