Skip to content

Build pulsar-perf with a plain cargo build --release - #46

Merged
merlimat merged 1 commit into
mainfrom
pulsar-perf-default-build
Nov 23, 2026
Merged

merlimat merged 1 commit into
mainfrom
pulsar-perf-default-build

Conversation

@merlimat

Copy link
Copy Markdown
Contributor

Problem

The end-to-end benchmark tool in tools/perf was a workspace member named perf, but not a default one. A plain
cargo build --release didn't build it, so finding it meant knowing to build it with -p perf.

Example

cargo build --release
ls target/release/perf   # no such file: only -p perf builds it

Change

The tool is now the pulsar-perf package, under the name Java's tool goes by, and a default member of the workspace:

cargo build --release
target/release/pulsar-perf produce -u pulsar://localhost:6650 -s 1024 -m 1000000 -r 5000000 topic://public/default/perf
  • tools/perf/Cargo.toml: the package is pulsar-perf, and so is its binary and the name its usage line prints. The
    directory stays tools/perf.
  • Cargo.toml: tools/perf joins default-members.
  • coverage.yml: the job measures the default members, so tools/perf is left out of the report with the generated
    protobuf code, instead of arriving at 20% and failing the gate for a change that adds no client code.
  • baseline.sh builds -p pulsar-perf and runs /perf/pulsar-perf.
  • Where both tools are named, baseline.sh, the module docs and docs/8-quality.md §6 say this client's or Java's
    pulsar-perf.

A plain cargo test and cargo clippy now also build pulsar-perf, and with it clap and hdrhistogram. The MSRV
and package jobs name their crates with -p, so they don't take it.

Testing

  • cargo build --release --locked leaves target/release/pulsar-perf, whose --help prints
    Usage: pulsar-perf <COMMAND>.
  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, and bash -n on baseline.sh.
  • cargo llvm-cov -p pulsar-perf --json: tools/perf/src/main.rs is in the report without the new pattern, and gone
    with it.
  • baseline.sh's Docker runs were not run.

The end-to-end benchmark tool in tools/perf is now the pulsar-perf
package, and a default member of the workspace, so that a bare
`cargo build --release` leaves target/release/pulsar-perf next to the
client, under the name Java's tool goes by.

- tools/perf/Cargo.toml: the package is pulsar-perf, and so is its
  binary and the name its usage line prints. The directory stays
  tools/perf.
- Cargo.toml: tools/perf joins default-members.
- coverage.yml: the job measures the default members, so tools/perf is
  left out of the report with the generated protobuf code, instead of
  arriving at 20% and failing the gate for a change that adds no
  client code.
- baseline.sh builds -p pulsar-perf and runs /perf/pulsar-perf.
- Where both tools are named, baseline.sh, the module docs and
  docs/8-quality.md §6 say this client's or Java's pulsar-perf.

A bare `cargo test` and `cargo clippy` now also build pulsar-perf, and
with it clap and hdrhistogram.
@merlimat
merlimat merged commit f6e1f73 into main Nov 23, 2026
14 checks passed
@merlimat
merlimat deleted the pulsar-perf-default-build branch November 23, 2026 19:54
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