Extensibility¶
ReBench is designed to be used with existing benchmarking harnesses. It uses what we call 'gauge adapters' to parse the output generated by harnesses and store it in its own data files for later processing.
Available Harness Support¶
ReBench currently provides builtin support for the following benchmark harnesses:
JMH
: JMH, Java's mircobenchmark harnessPlainSecondsLog
: a plain seconds log, i.e., a floating point number per lineReBenchLog
: the ReBench log format, which indicates benchmark name and run time in milliseconds or microsecondsSavinaLog
: the harness of the Savina benchmarksTime
: a harness that uses/usr/bin/time
automatically
Supporting other Benchmark Harnesses¶
To add support for your own harness, check the rebench.interop
module.
In there, the adapter
module contains the GaugeAdapter
base class.
The key method to implement is parse_data(self, data, run_id, invocation)
.
The method is expected to return a list of DataPoint
objects.
Each data point can contain a number of Measurement
objects, where one of
them needs to be indicated as the total
value.
The idea here is that a harness can measure different phases of a benchmark
or different properties, for instance memory usage.
These can be encoded as different measurements. The overall run time is
assumed to be the final measurement to conclude the information for a single
iteration of a benchmark.
A good example to study is the rebench_log_adapter
implementation.