Skip to content

Commit 9652179

Browse files
committed
Measure benchmark timer only around transaction loop
1 parent f35b84c commit 9652179

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/benchmark/benchmark.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ int main(int argc, const char *argv[]) {
7575
}
7676
}
7777
std::cout << "Doing " << NUM_REQUESTS << " transactions...\n";
78-
const auto benchmark_start = std::chrono::steady_clock::now();
7978
modsecurity::ModSecurity *modsec;
8079
modsecurity::RulesSet *rules;
8180
modsecurity::ModSecurityIntervention it;
@@ -91,6 +90,9 @@ int main(int argc, const char *argv[]) {
9190
return -1;
9291
}
9392

93+
// Start timing after one-time setup to measure only transaction processing.
94+
const auto benchmark_start = std::chrono::steady_clock::now();
95+
9496
for (unsigned long long i = 0; i < NUM_REQUESTS; i++) {
9597
//std::cout << "Proceeding with request " << i << std::endl;
9698

0 commit comments

Comments
 (0)