Generate Basic Plots of Processing Time#
This section shows how to generate basic plots of processing time using cpp-stat-bench library.
cpp-stat-bench library can generate some plots of processing time without configurations in source codes.
Prerequisites#
Implement a benchmark.
Sample Code#
In this section, a benchmark in Implement a Simple Benchmark is used for demonstration purposes.
Generate Plots#
To create plots, use --plot
option as follows:
./simple_benchmark --plot results
This command generates plots of processing time in the results
directory.
Plots are generated for each group of benchmarks as follows:
Here describes the plots generated:
File Name |
Description |
X-axis |
Y-axis |
---|---|---|---|
|
Line plot of processing time. |
Sample index |
Processing time |
|
Box plot of processing time. |
Case of benchmark |
Processing time |
|
Violin plot of processing time. |
Case of benchmark |
Processing time |
|
Cumulative distribution function of processing time. |
Processing time |
Cumulative probability |
|
Line plot of mean processing time. |
Sample index |
Mean processing time |
|
Box plot of mean processing time. |
Case of benchmark |
Mean processing time |
|
Violin plot of mean processing time. |
Case of benchmark |
Mean processing time |
|
Cumulative distribution function of mean processing time. |
Mean processing time |
Cumulative probability |
Plots are written in HTML format. You can view them in a web browser.
Hint
When you view plots, the browser needs access to the internet to load JavaScript libraries.