Skip to content

Commit

Permalink
tiledb_submit_a_b report parallel merge timers
Browse files Browse the repository at this point in the history
  • Loading branch information
rroelke committed Jan 28, 2025
1 parent 76ead21 commit e20d6b3
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/performance/tiledb_submit_a_b.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,16 @@ struct StatKeeper {
}
}

void report_timer(
const StatKey& stat, const std::string& name, const json& value) {
auto& stats = statistics[stat.uri_][stat.qlabel_];
if (stat.is_a_) {
stats.first.metrics[name] = value;
} else {
stats.second.metrics[name] = value;
}
}

/**
* Write durations to a file for analysis.
*/
Expand Down Expand Up @@ -590,6 +600,28 @@ static void run(
b_key,
"internal_loop_num",
optional_json(b_stats.find_counter("internal_loop_num")));

// record parallel merge timers
stat_keeper.report_timer(
a_key,
"preprocess_result_tile_order_compute",
optional_json(
a_stats.find_timer("preprocess_result_tile_order_compute.sum")));
stat_keeper.report_timer(
a_key,
"preprocess_result_tile_order_await",
optional_json(
a_stats.find_timer("preprocess_result_tile_order_await.sum")));
stat_keeper.report_timer(
b_key,
"preprocess_result_tile_order_compute",
optional_json(
b_stats.find_timer("preprocess_result_tile_order_compute.sum")));
stat_keeper.report_timer(
b_key,
"preprocess_result_tile_order_await",
optional_json(
b_stats.find_timer("preprocess_result_tile_order_await.sum")));
}

// change this to match the schema of the target arrays
Expand Down

0 comments on commit e20d6b3

Please sign in to comment.