Skip to content

Conversation

@scotthart
Copy link
Member

@scotthart scotthart commented Sep 18, 2025

Adds scan_async_throughput_benchmark as an async version of scan_throughput_benchmark. Both now support profiling around ReadRows sections which require gperftools to be installed and can be enabled via:

PROFILER_PATH="/tmp/<filename>" bazel run -c opt --copt=-DPROFILE --copt=-g --linkopt='-lprofiler' //google/cloud/bigtable/benchmarks:scan_async_throughput_benchmark

This change is Reviewable

@scotthart scotthart requested a review from a team as a code owner September 18, 2025 22:11
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Sep 18, 2025
@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.04%. Comparing base (7d383d7) to head (8620254).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...gle/cloud/bigtable/benchmarks/benchmark_options.cc 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15557   +/-   ##
=======================================
  Coverage   93.03%   93.04%           
=======================================
  Files        2408     2408           
  Lines      220145   220149    +4     
=======================================
+ Hits       204810   204833   +23     
+ Misses      15335    15316   -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

mpeddada1
mpeddada1 previously approved these changes Sep 19, 2025
Comment on lines 100 to 104
#ifdef PROFILE
auto profile_data_path = google::cloud::internal::GetEnv("PROFILER_PATH");
if (profile_data_path) ProfilerStart(profile_data_path->c_str());
auto profiler_start = std::chrono::steady_clock::now();
#endif // PROFILE
Copy link
Collaborator

Choose a reason for hiding this comment

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

not a blocker for the PR but maybe as a follow-up: it might be worth adding documentation to the README or onboarding docs on how to perform throughput benchmarking with this newly added logic?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added doc link and execution instructions.

Comment on lines +98 to +102
{"--enable-metrics",
"whether to enable Client Side Metrics for benchmarking",
[&options](std::string const& val) {
options.enable_metrics = ParseBoolean(val).value_or(true);
}},
Copy link
Collaborator

Choose a reason for hiding this comment

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

would you provide some context into why we are choosing to have client-side metrics for benchmarking behind a flag?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because some of the latency metrics are part of the inner loop of delivering assembled rows to the application, I want to be able to easily compare the performance impact of metrics on versus off.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the context!

Copy link
Member Author

@scotthart scotthart left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 8 files reviewed, 2 unresolved discussions (waiting on @mpeddada1)

Comment on lines +98 to +102
{"--enable-metrics",
"whether to enable Client Side Metrics for benchmarking",
[&options](std::string const& val) {
options.enable_metrics = ParseBoolean(val).value_or(true);
}},
Copy link
Member Author

Choose a reason for hiding this comment

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

Because some of the latency metrics are part of the inner loop of delivering assembled rows to the application, I want to be able to easily compare the performance impact of metrics on versus off.

Comment on lines 100 to 104
#ifdef PROFILE
auto profile_data_path = google::cloud::internal::GetEnv("PROFILER_PATH");
if (profile_data_path) ProfilerStart(profile_data_path->c_str());
auto profiler_start = std::chrono::steady_clock::now();
#endif // PROFILE
Copy link
Member Author

Choose a reason for hiding this comment

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

Added doc link and execution instructions.

mpeddada1
mpeddada1 previously approved these changes Sep 19, 2025
mpeddada1
mpeddada1 previously approved these changes Sep 19, 2025
@scotthart scotthart merged commit feb385d into googleapis:main Sep 19, 2025
67 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants