Skip to content

Commit

Permalink
Feat: Spring24 project4 update leaderboard metrics (#710)
Browse files Browse the repository at this point in the history
update leaderboard metrics

Signed-off-by: AveryQi115 <[email protected]>
  • Loading branch information
AveryQi115 committed Apr 4, 2024
1 parent 0d774f6 commit 248bbb0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/terrier_bench/terrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,19 @@ struct TerrierTotalMetrics {
void Report(uint64_t db_size) {
auto transfer_txn_per_sec = committed_transfer_txn_cnt_ / static_cast<double>(elapsed_) * 1000;
auto join_txn_per_sec = committed_join_txn_cnt_ / static_cast<double>(elapsed_) * 1000;
auto committed_txn_cnt = committed_join_txn_cnt_ + committed_transfer_txn_cnt_;

fmt::print(stderr, "<<< BEGIN\n");

fmt::print(stderr, "transfer: {}\n", transfer_txn_per_sec);
fmt::print(stderr, "join: {}\n", join_txn_per_sec);
fmt::print(stderr, "db_size: {}\n", db_size);
if (committed_txn_cnt != 0) {
fmt::print(stderr, "db_size per committed txn: {}\n", db_size / static_cast<double>(committed_txn_cnt));
} else{
fmt::print(stderr, "db_size per committed txn: 999999999\n");
}


fmt::print(stderr, ">>> END\n");
}
Expand Down

0 comments on commit 248bbb0

Please sign in to comment.