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()
})
})
})
categories.forEach(category => {
const suite = new Suite(category, { minTries: 100, minTime: 1000 })
const benchmarkDir = resolve(categoryDir, category)
const benchmarks = readdirSync(benchmarkDir)
.filter(b => b[0] !== '.' && !!~b.indexOf('.js'))
.map(b => basename(b, extname(b)))
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()
categories.forEach(category => {
const suite = new Suite(category, {
minTries: 100,
minTime: 1000,
})
const benchmarkDir = resolve(categoryDir, category)
const benchmarks = readdirSync(benchmarkDir)
.filter(b => b[0] !== '.' && !!~b.indexOf('.js'))
.map(b => basename(b, extname(b)))
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)
categories.forEach(category => {
const suite = new Suite(category, { minTries: 100, minTime: 1000 })
const benchmarkDir = resolve(categoryDir, category)
const benchmarks = readdirSync(benchmarkDir)
.filter(b => b[0] !== '.' && !!~b.indexOf('.js'))
.map(b => basename(b, extname(b)))
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()
categories.forEach(category => {
const suite = new Suite(category, {
minTries: 100,
minTime: 1000,
})
const benchmarkDir = resolve(categoryDir, category)
const benchmarks = readdirSync(benchmarkDir)
.filter(b => b[0] !== '.' && !!~b.indexOf('.js'))
.map(b => basename(b, extname(b)))
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)