Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
benchmarks.forEach(benchmark => {
if (include && !benchmark.match(include)) return
const bench = new Bench(suite, benchmark)
const dir = resolve(benchmarkDir, benchmark)
const module = require(dir)
const fn = module.default
bench.input(() => module.input)
bench.run(input => {
fn(input)
resetMemoization()
})
})
})
benchmarks.forEach(benchmark => {
if (include && !benchmark.match(include)) return
const bench = new Bench(suite, benchmark)
const dir = resolve(benchmarkDir, benchmark)
const module = require(dir)
const fn = module.default
bench.input(() => module.input)
bench.run(input => {
fn(input)
resetMemoization()
})
})
})
benchmarks.forEach(benchmark => {
if (include && !benchmark.match(include)) return
const bench = new Bench(suite, benchmark)
const dir = resolve(benchmarkDir, benchmark)
const module = require(dir)
const fn = module.default
bench.input(module.input)
bench.run(input => {
fn(input)
resetMemoization()
})
})
})
benchmarks.forEach(benchmark => {
if (include && !benchmark.match(include)) return
const bench = new Bench(suite, benchmark)
const dir = resolve(benchmarkDir, benchmark)
const module = require(dir)
const fn = module.default
bench.input(module.input)
bench.run(input => {
fn(input)
resetMemoization()
})
})
})