Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: backfill the data to fit multiple metrics benchmarking (#468)
*Description of changes:* The Go multiple metric benchmarking was fixed in upstream. benchmark-action/github-action-benchmark#118 Backfilling it for Finch. Backfilled by the script ``` let obj = window.BENCHMARK_DATA; for (let benchmark of obj.entries["Finch Benchmark"]) { let newBenches = []; for (let bench of benchmark.benches) { let metrics = bench.unit.split("\t").filter(el => el !== ""); // If data already split, skip if(metrics.length === 1) { newBenches.push(bench); continue; } // handle the first metric let firstMetric = metrics[0].trim(); let newBench = JSON.parse(JSON.stringify(bench)); // Deep clone newBench.name += " - " + firstMetric; newBench.unit = firstMetric; newBenches.push(newBench); // handle the rest of the metrics for (let i = 1; i < metrics.length; i++) { let metric = metrics[i].trim().split(" "); let value = metric[0]; let unit = metric[1]; let newBench = JSON.parse(JSON.stringify(bench)); // Deep clone newBench.name += " - " + unit; newBench.unit = unit; newBench.value = value; newBenches.push(newBench); } } benchmark.benches = newBenches; } console.log(JSON.stringify(obj, null, 2)); ``` *Testing done:* By locally exploring the index.html in Chrome. - [ X ] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Ziwen Ning <[email protected]>
- Loading branch information