Skip to main content
Module

x/pretty_benching/mod.ts>prettyBenchmarkDown

:sauropod: A small lib to make your Deno benchmarking progress and results look pretty
Latest
function prettyBenchmarkDown
import { prettyBenchmarkDown } from "https://deno.land/x/pretty_benching@v0.3.3/mod.ts";

Returns a function that expects a BenchmarkRunResult, which than prints the results in a nicely formatted markdown, based on the provided options.

Without options, one markdown table will be generated, containing all the bench results.

Typical basic usage:

// add benches, then
runBenchmarks().then(prettyBenchmarkDown(console.log));
// or write to file
runBenchmarks().then(prettyBenchmarkDown((markdown: string) => { Deno.writeTextFileSync("./benchmark.md", markdown); });

.

Parameters

outputFn: (out: string) => void