diff --git a/benchmarking/run.js b/benchmarking/run.js index 8114641be..ca1f5eb68 100644 --- a/benchmarking/run.js +++ b/benchmarking/run.js @@ -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();