Building Guide (benchmarking)
Introducton
Benchmarking functionality is provided in the libbenchmark library, which provides a small and simple API, so it can be used on arbitrary platforms. The libbenchmark library depends on liblfds itself and also on a third library, libshared. Finally, a convenience thin command line veneer, benchmark, is provided, which is used from the command line to run the benchmark suite and see the results.
The benchmark currently contains one benchmark each for the btree, the freelist and the unbounded, many producer, many consumer queue. Also provided are implementations of these data structures using a range of normal, OS or compiler provided locking mechanisms, such as Windows critical sections, Windows and pthread mutexes, pthread spinlocks, etc. The same benchmarks are run with liblfds and its lock-free data structures and then with all of the locking versions of the same data structures.
If libbenchmark is being used directly, results are provided and queries via a results API. If benchmark is being used, results display to an abstraction which emits strings to the caller - on Linux and Windows, this emits to stdout. Additionally, the libbenchmark library (and so the benchmark veneer) can emit the results in the form of gnuplots.
Building and usage guides exist for all these components.
- Building Guide (liblfds)
- Building Guide (libshared)
- Building Guide (libbenchmark)
- Building Guide (benchmark)