Skip to content

benchmark: add README documenting how to run benchmarks (#8574)#9144

Open
luongs3 wants to merge 1 commit into
grpc:masterfrom
luongs3:docs/8574-benchmark-readme
Open

benchmark: add README documenting how to run benchmarks (#8574)#9144
luongs3 wants to merge 1 commit into
grpc:masterfrom
luongs3:docs/8574-benchmark-readme

Conversation

@luongs3
Copy link
Copy Markdown

@luongs3 luongs3 commented May 27, 2026

Fixes #8574.

Adds a README.md to the benchmark/ directory documenting the commonly used ways to run the benchmarks, and links to it from CONTRIBUTING.md.

What's covered

  • benchmain — the primary configurable driver, with the canonical example invocation (mirrors the package doc in benchmark/benchmain/main.go) and the recommended baseline-capture-then-compare workflow using benchresult.
  • run_bench.sh — the shell harness that sweeps parameter combinations.
  • Go micro-benchmarksgo test -bench for packages like primitives and latency.
  • A directory overview table so readers can find the right entry point.

The CONTRIBUTING.md link is added under the testing bullet in "Guidelines for Pull Requests", so authors and reviewers can find it when a performance-focused PR needs benchmark results — which is the motivation in the issue.

Verification

The documented commands were run against the current tree:

  • go run benchmark/benchmain/main.go -h lists the flags.
  • go test -bench=BenchmarkCodeStringSwitch -benchmem -run='^$' ./benchmark/primitives/ runs and passes.

No code changes; docs only.

RELEASE NOTES: n/a

Adds benchmark/README.md covering the common ways to run the benchmarks:
the benchmain driver and baseline comparison via benchresult, the
run_bench.sh parameter sweep, and the go test -bench micro-benchmarks,
plus a directory overview. Links to it from CONTRIBUTING.md so authors and
reviewers can find it when a performance PR needs benchmark results.

Fixes grpc#8574.

RELEASE NOTES: n/a
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 27, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: luongs3 / name: luongs3 (0acd88a)

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.09%. Comparing base (18a8d3d) to head (0acd88a).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9144      +/-   ##
==========================================
- Coverage   83.16%   83.09%   -0.07%     
==========================================
  Files         417      417              
  Lines       33690    33690              
==========================================
- Hits        28019    27996      -23     
- Misses       4253     4268      +15     
- Partials     1418     1426       +8     

see 26 files with indirect coverage changes

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

@easwars
Copy link
Copy Markdown
Contributor

easwars commented May 27, 2026

@luongs3: Could you please sign the CLA for us to start reviewing the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Benchmarking Includes our benchmarking utility. Type: Documentation Documentation or examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a README to the benchmark directory

3 participants