API¶
This part of the documentation lists the full API reference of all public classes and functions.
Core¶
- class
minibench.
Benchmark
(times=None, prefix=u'bench_', debug=False, before=None, before_each=None, after=None, after_each=None, **kwargs)[source]¶Base class for all benchmark suites
times
= The number of iteration to run each method¶
label
¶A human readable label
run
()[source]¶Collect all tests to run and run them.
Each method will be run
Benchmark.times
.
- class
minibench.
RunResult
(duration, success, result)¶Store a single method execution result
Reporters¶
-
class
minibench.
FileReporter
(filename)[source]¶ A reporter dumping results into a file
Parameters: filename (string) – the output file name
-
class
minibench.
JsonReporter
(filename)[source]¶ A reporter dumping results into a JSON file
Parameters: filename (string) – the output file name
-
class
minibench.
CsvReporter
(filename)[source]¶ A reporter dumping results into a CSV file
The CSV will have the following format:
Benchmark Method Times Total (s) Average (s) It uses ; character as delimiter and “ as delimiter. All Strings are quoted.
Parameters: filename (string) – the output file name
-
class
minibench.
MarkdownReporter
(filename)[source]¶ A reporter rendering result as a markdown table.
Each benchmark will be rendered as a table with the following format:
Method Times Total (s) Average (s) Parameters: filename (string) – the output file name