chore: add summary to benchmark output (#12097)

* chore: add summary to benchmark output

* chore: add summary to benchmark output
pull/12109/head
Dominic Gannaway 2 weeks ago committed by GitHub
parent 97e5b5285a
commit baad4ea320
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -25,13 +25,18 @@ const benchmarks = [
];
async function run_benchmarks() {
let total_time = 0;
let total_gc_time = 0;
// eslint-disable-next-line no-console
console.log('-- Benchmarking Started --');
$.push({}, true);
try {
for (const benchmark of benchmarks) {
const results = await benchmark();
// eslint-disable-next-line no-console
console.log(await benchmark());
console.log(results);
total_time += Number(results.time);
total_gc_time += Number(results.gc_time);
}
} catch (e) {
// eslint-disable-next-line no-console
@ -42,7 +47,12 @@ async function run_benchmarks() {
}
$.pop();
// eslint-disable-next-line no-console
console.log('-- Benchmarking Complete --');
console.log(`-- Benchmarking Complete --`);
// eslint-disable-next-line no-console
console.log({
total_time: total_time.toFixed(2),
total_gc_time: total_gc_time.toFixed(2)
});
}
run_benchmarks();

Loading…
Cancel
Save