v3.bench
fn new #
fn new() Bench
new creates a new value for bench.
struct Bench #
struct Bench {
mut:
steps []Step
total_sw time.StopWatch
step_sw time.StopWatch
}
Bench represents bench data used by bench.
fn (Bench) step #
fn (mut b Bench) step(name string)
step records a serial pipeline step.
fn (Bench) step_parallel #
fn (mut b Bench) step_parallel(name string, parallel bool)
step_parallel records a pipeline step, appending "(parallel)" to its name when the step actually ran across threads.
fn (Bench) print_report #
fn (b &Bench) print_report()
print_report updates print report state for Bench.
struct Step #
struct Step {
pub:
name string
time_us i64
ram_kb i64
}
Step represents step data used by bench.