Skip to content

feat(wish/cpp): improve result reporting#56

Merged
tyoshino merged 1 commit into
mainfrom
tyoshino/log
May 6, 2026
Merged

feat(wish/cpp): improve result reporting#56
tyoshino merged 1 commit into
mainfrom
tyoshino/log

Conversation

@tyoshino
Copy link
Copy Markdown
Collaborator

@tyoshino tyoshino commented May 6, 2026

No description provided.

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;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added using this opportunity

<< " bytes, target_qps=" << state.range(1)
<< ", poisson=" << absl::GetFlag(FLAGS_poisson);

static void BM_PlainText_HighQPS(benchmark::State& state) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 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");
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revised format

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";
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()));
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

->UseManualTime()
->Unit(benchmark::kMicrosecond)
->Args({1 << 10, 100})
->Iterations(100 * 10);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tweaked the number of iterations so that each test case runs for 10 sec

@tyoshino tyoshino requested a review from wenbozhu May 6, 2026 13:02
@tyoshino tyoshino merged commit d2e5533 into main May 6, 2026
2 checks passed
@tyoshino tyoshino deleted the tyoshino/log branch May 6, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant