benchmark_format.ts view source
(results: BenchmarkResult[], options?: BenchmarkFormatJsonOptions | undefined): string Format results as JSON.
results
array of benchmark results
BenchmarkResult[]options?
formatting options
BenchmarkFormatJsonOptions | undefinedreturns
string JSON string
examples
console.log(format_json(results));
console.log(format_json(results, {pretty: false}));
console.log(format_json(results, {include_timings: true}));