Skip to main content
interface Deno.BenchDefinition

Properties

fn: () => void | Promise<void>
name: string
optional
ignore: boolean
optional
n: number

Specify number of iterations benchmark should perform. Defaults to 1000.

optional
warmup: number

Specify number of warmup iterations benchmark should perform. Defaults to 1000.

These iterations are not measured. It allows the code to be optimized by JIT compiler before measuring its performance.

optional
only: boolean

If at least one bench has only set to true, only run benches that have only set to true and fail the bench suite.

optional
sanitizeExit: boolean

Ensure the bench case does not prematurely cause the process to exit, for example via a call to Deno.exit. Defaults to true.

optional
permissions: Deno.PermissionOptions

Specifies 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.

Defaults to "inherit".