Skip to content

Commit

Permalink
"Changed vectors to onlu push if resview is enabled"
Browse files Browse the repository at this point in the history
  • Loading branch information
Saipranav-Kotamreddy committed Oct 10, 2024
1 parent c717887 commit 2289bac
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions platform/statistic/stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,17 +460,21 @@ void Stats::IncPrepare() {
prometheus_->Inc(PREPARE, 1);
}
num_prepare_++;
transaction_summary_.prepare_message_count_times_list.push_back(
std::chrono::system_clock::now());
if(enable_resview){
transaction_summary_.prepare_message_count_times_list.push_back(
std::chrono::system_clock::now());
}
}

void Stats::IncCommit() {
if (prometheus_) {
prometheus_->Inc(COMMIT, 1);
}
num_commit_++;
transaction_summary_.commit_message_count_times_list.push_back(
std::chrono::system_clock::now());
if(enable_resview){
transaction_summary_.commit_message_count_times_list.push_back(
std::chrono::system_clock::now());
}
}

void Stats::IncPendingExecute() { pending_execute_++; }
Expand Down

0 comments on commit 2289bac

Please sign in to comment.