| 31 | |
| 32 | template <typename QueryT> |
| 33 | void benchmarkQuery(const std::vector<util::Coordinate> &queries, |
| 34 | const std::string &name, |
| 35 | QueryT query) |
| 36 | { |
| 37 | TIMER_START(query); |
| 38 | for (const auto &q : queries) |
| 39 | { |
| 40 | auto result = query(q); |
| 41 | (void)result; |
| 42 | } |
| 43 | TIMER_STOP(query); |
| 44 | |
| 45 | std::cout << name << ":\n" |
| 46 | << TIMER_MSEC(query) << "ms" << " -> " << TIMER_MSEC(query) / queries.size() |
| 47 | << " ms/query" << std::endl; |
| 48 | } |
| 49 | |
| 50 | void benchmark(BenchStaticRTree &rtree, unsigned num_queries) |
| 51 | { |