Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mority committed Apr 24, 2024
1 parent f5964fa commit e63f34c
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions benchmark/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,17 @@ int main(int argc, char* argv[]) {
auto query_generation_timer = scoped_timer(fmt::format(
"generation of {} queries using seed {}", num_queries, qg.seed_));
std::cout << "Query generator settings:\n" << gs << "\n";
progress_tracker->status("generating queries").in_high(queries.size());
utl::parallel_for_run(
num_queries,
[&](auto const i) {
auto const q = qg.random_pretrip_query();
if (q.has_value()) {
std::lock_guard<std::mutex> guard(mutex);
queries.emplace_back(q.value());
}
},
progress_tracker->update_fn());
utl::parallel_for_run(num_queries, [&](auto const i) {
auto const q = qg.random_pretrip_query();
if (q.has_value()) {
std::lock_guard<std::mutex> guard(mutex);
queries.emplace_back(q.value());
}
});
}

std::cout << queries.size() << " queries generated successfully\n";

// process queries
auto results =
std::vector<pair<std::uint64_t, routing_result<raptor_stats>>>{};
Expand Down

0 comments on commit e63f34c

Please sign in to comment.