Benchmark tools for C
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 12 commits ahead of c9s:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE clibs package and license Oct 9, 2014
README.md nerp Jul 15, 2014
bench.c fix warnings Apr 3, 2015
bench.h Beautiful colors Jul 8, 2014
example.c better docs with example Jul 8, 2014
package.json clibs package and license Oct 9, 2014
screenshot.png Adds screenshot Jul 15, 2014

README.md

bench

Bench is a C benchmarking utility. Forked from c9s/bench.

Bench Screenshot

Usage

Here is an example. You can view a full example here.

#include "bench.c"

void example_benchmark() {
    BENCHMARK(example_bench, 3)

   	// All the code you want to benchmark

    END_BENCHMARK(example_bench)
    BENCHMARK_SUMMARY(example_bench);
}

void example_measure() {
    MEASURE(example_measure)

   	// All the code you want to measure

    END_MEASURE(example_measure)
    MEASURE_SUMMARY(example_measure);
}