Skip to content

Instantly share code, notes, and snippets.

Last active October 27, 2022 04:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
async function sample_benchmark() {
const benchOptions = {
id: "Suite Name",
log: customLogger,
minIterations: 3
const bench = new Bench(benchOptions);
// Benchmark Group 1"Group Name 1")
.addAsync(null, 'sleep_async',
async () => {
await sample_function_sleep_async()
// Benchmark Group 2"Group Name 2")
.add(null, 'math_sqrt',
() => {
// Run our helper function runBenchmark(...)
await runBenchmarks(bench);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment