Skip to content

MicroBenchmark

[Source]

Synchronous benchmarks must provide this trait. The apply method defines a single iteration in a sample. Setup and Teardown are defined by the before and after methods respectively. The before method runs before a sample of benchmarks and after runs after the all iterations in the sample have completed. If your benchmark requires setup and/or teardown to occur beween each iteration of the benchmark, then you must set the configuration of the benchmark to have max_iterations = 1. It should be noted that a larger sample_size may be necessary in this scenario for statistically significant results.

trait iso MicroBenchmark

Public Functions

name

[Source]

fun box name()
: String val

Returns


config

[Source]

fun box config()
: BenchConfig val

Returns


overhead

[Source]

fun box overhead()
: MicroBenchmark iso^

Returns


before

[Source]

fun ref before()
: None val

Returns


apply

[Source]

fun ref apply()
: None val ?

Returns


after

[Source]

fun ref after()
: None val

Returns