std1.0.0-beta-7 SafeC docs

std :: test::bench

Struct std::BenchSuite

#include <std/test/bench.h> source

struct BenchSuite {
    struct BenchCase cases[BENCH_MAX];
    int count;
}

Fields

§int countsource

Methods

§static struct BenchSuite new()source · definition

An empty suite.

§generic<T> void add(const &char name, fn void(?&T) func, ?&T arg, unsigned long iters)source · definition

Register a benchmark: func(arg) is called iters times per run.

§void run()source · definition

Run all benchmarks and record results.

§void print_results() constsource · definition

Print results table to stdout.