feat(wish/cpp): improve result reporting#56
Merged
Merged
Conversation
tyoshino
commented
May 6, 2026
| const std::string port_str = std::to_string(absl::GetFlag(FLAGS_port)); | ||
| const std::string port = std::to_string(absl::GetFlag(FLAGS_port)); | ||
|
|
||
| LOG(INFO) << "Target address: " << host << ":" << port; |
Collaborator
Author
There was a problem hiding this comment.
added using this opportunity
| << " bytes, target_qps=" << state.range(1) | ||
| << ", poisson=" << absl::GetFlag(FLAGS_poisson); | ||
|
|
||
| static void BM_PlainText_HighQPS(benchmark::State& state) { |
Collaborator
Author
There was a problem hiding this comment.
- clarified that it's for the plain text case
- removed WiSH as it's clear
Comment on lines
+313
to
+316
| LOG(INFO) << "Starting benchmark"; | ||
| LOG(INFO) << " Payload size: " << payload_size << " bytes"; | ||
| LOG(INFO) << " Target QPS: " << target_qps; | ||
| LOG(INFO) << " Poisson arrivals: " << (absl::GetFlag(FLAGS_poisson) ? "enabled" : "disabled"); |
Comment on lines
+438
to
+446
| LOG(INFO) << "Result:"; | ||
| LOG(INFO) << " # of workers: " << num_workers; | ||
| LOG(INFO) << " Measured requests: " << recorded.size(); | ||
| LOG(INFO) << " Measurement duration: " << wall_seconds << " s"; | ||
| LOG(INFO) << " Actual QPS: " << static_cast<double>(recorded.size()) / wall_seconds; | ||
| LOG(INFO) << " p10 latency: " << PercentileFromSorted(recorded, 0.10) << " us"; | ||
| LOG(INFO) << " p50 latency: " << PercentileFromSorted(recorded, 0.50) << " us"; | ||
| LOG(INFO) << " p90 latency: " << PercentileFromSorted(recorded, 0.90) << " us"; | ||
| LOG(INFO) << " p99 latency: " << PercentileFromSorted(recorded, 0.99) << " us"; |
Collaborator
Author
There was a problem hiding this comment.
using one row for each result value as it's easier to share the result
| state.counters["actual_qps"] = | ||
| static_cast<double>(recorded.size()) / wall_seconds; | ||
| state.counters["num_workers"] = static_cast<double>(num_workers); | ||
| state.SetItemsProcessed(static_cast<int64_t>(recorded.size())); |
Collaborator
Author
There was a problem hiding this comment.
This is not useful.
It's using kIsRate. It uses the CPU time.
https://github.com/google/benchmark/blob/ff773f8c97717424a7855ce0933b036b79628a02/src/counter.cc#L26
| ->UseManualTime() | ||
| ->Unit(benchmark::kMicrosecond) | ||
| ->Args({1 << 10, 100}) | ||
| ->Iterations(100 * 10); |
Collaborator
Author
There was a problem hiding this comment.
tweaked the number of iterations so that each test case runs for 10 sec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.