Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/merlin/deps.ts>pretty_benching.prettyBenchmarkDown

Testing and Benchmarking framework for deno 🧙‍♂️
Latest
function pretty_benching.prettyBenchmarkDown
import { pretty_benching } from "https://deno.land/x/merlin@v1.0.7/deps.ts";
const { prettyBenchmarkDown } = pretty_benching;

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