Add gnuplot script for plotting benchmark results

This commit is contained in:
Jackson Campolattaro 2020-11-03 13:23:36 -05:00
parent a62f868d9c
commit 325c4b7191
3 changed files with 20 additions and 1 deletions

View File

@ -32,7 +32,7 @@ int main(int argc, char **argv) {
file << "Number of Points,Build Time (ms) \n"; file << "Number of Points,Build Time (ms) \n";
// Perform tests for various dataset sizes // Perform tests for various dataset sizes
for (size_t num_points = 10; num_points < 1000000; num_points *= 1.1) { for (size_t num_points = 10; num_points < 10000000; num_points *= 1.1) {
// Create a collection of the right number of points // Create a collection of the right number of points
auto points = generate<Kernel>(num_points); auto points = generate<Kernel>(num_points);

View File

@ -56,6 +56,8 @@ int main(int argc, char **argv) {
file << num_points << ","; file << num_points << ",";
file << duration_cast<microseconds>(end - start).count() << "\n"; file << duration_cast<microseconds>(end - start).count() << "\n";
std::cout << num_points << std::endl;
} }
file.close(); file.close();

View File

@ -0,0 +1,17 @@
reset
set terminal png size 800,500
set output 'construction_benchmark.png'
set grid
set style data lines
#set logscale x
set title 'Time to construct a tree from points'
set xlabel "Number of points"
set ylabel "Time (ms)"
set key autotitle columnhead
set datafile separator ","
plot 'construction_benchmark.csv'