mirror of https://github.com/CGAL/cgal
Set appropriate units and generate construction benchmark plot
This commit is contained in:
parent
375cdf71ae
commit
8a7544df7f
|
|
@ -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());
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue