Ende.BenchDefinition
interface
interface Ende.BenchDefinitionThe interface for defining a benchmark test using Ende.bench.
Properties
fn
fn: (b: BenchContext) => void | Promise<void>The test function which will be benchmarked.
name
name: stringThe name of the test, which will be used in displaying the results.
ignore
ignore?: booleanIf truthy, the benchmark test will be ignored/skipped.
group
group?: stringGroup name for the benchmark.
Grouped benchmarks produce a group time summary, where the difference in performance between each test of the group is compared.
baseline
baseline?: booleanBenchmark should be used as the baseline for other benchmarks.
If there are multiple baselines in a group, the first one is used as the baseline.
only
only?: booleanIf at least one bench has only set to true, only run benches that have
only set to true and fail the bench suite.
n
n?: numberNumber of iterations to perform.
warmup
warmup?: numberNumber of warmups to do before running the benchmark.
sanitizeExit
sanitizeExit?: booleanEnsure the bench case does not prematurely cause the process to exit,
for example via a call to Ende.exit.
Default: true
permissions
permissions?: PermissionOptionsSpecifies the permissions that should be used to run the bench.
Set this to "inherit" to keep the calling thread's permissions.
Set this to "none" to revoke all permissions.
Default: "inherit"