Set appropriate units and generate construction benchmark plot

This commit is contained in:
Jackson Campolattaro 2021-01-18 13:11:05 -05:00
parent 375cdf71ae
commit 8a7544df7f
2 changed files with 5 additions and 4 deletions

View File

@ -26,6 +26,7 @@ typedef Kd_tree_search::Tree Kdtree;
using std::chrono::high_resolution_clock; using std::chrono::high_resolution_clock;
using std::chrono::duration_cast; using std::chrono::duration_cast;
using std::chrono::microseconds; using std::chrono::microseconds;
using std::chrono::milliseconds;
int main(int argc, char **argv) { int main(int argc, char **argv) {
@ -43,7 +44,7 @@ int main(int argc, char **argv) {
auto points = generate<Kernel>(num_points); auto points = generate<Kernel>(num_points);
auto octreePoints = points; auto octreePoints = points;
auto octreeTime = bench<microseconds>( auto octreeTime = bench<milliseconds>(
[&] { [&] {
// Build the tree // Build the tree
Octree octree(octreePoints, octreePoints.point_map()); Octree octree(octreePoints, octreePoints.point_map());
@ -52,7 +53,7 @@ int main(int argc, char **argv) {
); );
auto kdtreePoints = points; auto kdtreePoints = points;
auto kdtreeTime = bench<microseconds>( auto kdtreeTime = bench<milliseconds>(
[&] { [&] {
// Build the tree // Build the tree
Kdtree kdtree(kdtreePoints.points().begin(), kdtreePoints.points().end()); Kdtree kdtree(kdtreePoints.points().begin(), kdtreePoints.points().end());

View File

@ -10,8 +10,8 @@ set style data lines
set title 'Time to construct a tree from points' set title 'Time to construct a tree from points'
set xlabel "Number of points" set xlabel "Number of points"
set ylabel "Time (us)" set ylabel "Time (ms)"
set key autotitle columnhead set key autotitle columnhead
set datafile separator "," set datafile separator ","
plot for [col=2:3] 'construction_benchmark.csv' using 1:col plot for [col=2:10] 'construction_benchmark.csv' using 1:col