Teardown function. See Benchmark.after.
Teardown function. See Benchmark.afterEach.
Setup function. See Benchmark.before.
Setup function. See Benchmark.beforeEach.
Target function for benchmarking. See Benchmark.fun.
Maximum number of executing test. See Benchmark.maxNumber.
Minimal number of executing test. See Benchmark.minNumber.
Name of this benchmark.
the number of executing the test. see Benchmark.number.
Wanted maximum error rate. See Benchmark.targetErrorRate.
Assertion operator type.
The options for Suite.
Teardown function. see Suite.after.
Teardown function. see Suite.afterEach.
Teardown function. see Suite.afterTest.
Setup function. see Suite.before.
Setup function. see Suite.beforeEach.
Setup function. see Suite.beforeTest.
Default options for Suite.add.
Name of this suite.
Flag for executing each benchmark parallelly.
The target function for benchmarking.
If returns Promise, Benchmark will measure the time it takes for the Promise to resolve. Otherwise will measure the time it to method return.
Callback functions set.
Measure tiem to execute a function.
wait for done if the target function returns a thenable object. so you can use async function.
NOTE: this function will execute target function only once.
The target function.
Arguments to passing to target function.
The this
for target function.
milliseconds taked executing.
const msec = await timeit(function() {
# do something heavy.
});
console.log(await timeit(axios.get, ['http://example.com']));
Generated using TypeDoc
The options for Benchmark.
0.3.4