Add benchmarks comparison job
This commit is contained in:
parent
e97bbef807
commit
f1a7f87544
@ -44,7 +44,8 @@ void benchmarkQuery(const std::vector<util::Coordinate> &queries,
|
||||
}
|
||||
TIMER_STOP(query);
|
||||
|
||||
std::cout << name << ":\n" << TIMER_MSEC(query) << "ms"
|
||||
std::cout << name << ":\n"
|
||||
<< TIMER_MSEC(query) << "ms"
|
||||
<< " -> " << TIMER_MSEC(query) / queries.size() << " ms/query" << std::endl;
|
||||
}
|
||||
|
||||
@ -60,9 +61,8 @@ void benchmark(BenchStaticRTree &rtree, unsigned num_queries)
|
||||
util::FixedLatitude{lat_udist(mt_rand)});
|
||||
}
|
||||
|
||||
benchmarkQuery(queries,
|
||||
"1 result",
|
||||
[&rtree](const util::Coordinate &q) { return rtree.Nearest(q, 1); });
|
||||
benchmarkQuery(
|
||||
queries, "1 result", [&rtree](const util::Coordinate &q) { return rtree.Nearest(q, 1); });
|
||||
benchmarkQuery(queries,
|
||||
"10 results",
|
||||
[&rtree](const util::Coordinate &q) { return rtree.Nearest(q, 10); });
|
||||
|
Loading…
Reference in New Issue
Block a user