mirror of https://github.com/sveltejs/svelte
chore: skippable benchmarks (#17506)
* chore: add benchmark filtering mechanism * tweak * fix * try this * better logging for bench:compare * fixpull/17507/head
parent
c41fef1ef1
commit
0025d42366
@ -1,10 +1,13 @@
|
|||||||
import { reactivity_benchmarks } from '../benchmarks/reactivity/index.js';
|
import { reactivity_benchmarks } from '../benchmarks/reactivity/index.js';
|
||||||
|
|
||||||
const results = [];
|
const results = [];
|
||||||
for (const benchmark of reactivity_benchmarks) {
|
|
||||||
const result = await benchmark();
|
for (let i = 0; i < reactivity_benchmarks.length; i += 1) {
|
||||||
console.error(result.benchmark);
|
const benchmark = reactivity_benchmarks[i];
|
||||||
results.push(result);
|
|
||||||
|
process.stderr.write(`Running ${i + 1}/${reactivity_benchmarks.length} ${benchmark.label} `);
|
||||||
|
results.push({ benchmark: benchmark.label, ...(await benchmark.fn()) });
|
||||||
|
process.stderr.write('\x1b[2K\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
process.send(results);
|
process.send(results);
|
||||||
|
|||||||
Loading…
Reference in new issue