pytest-benchmark logo

pytest-benchmark

Pytest fixture for benchmarking code with statistical analysis, comparing runs across commits and generating rich performance reports.

-

Our Verdict

The go-to Python microbenchmarking tool for catching performance regressions inside your test suite.

Pros

  • Statistical analysis of test runs built-in
  • Compares benchmarks across git commits
  • Rich HTML and JSON report output
  • Low friction, just add a fixture

Cons

  • Microbenchmarks, not load testing
  • Python-only, no cross-language comparison
  • CI noise can skew results without pinning
Best for: Python libraries guarding hot paths against per-commit performance regressions Not for: Whole-system load testing where Locust or k6 are proper fits

When to Use pytest-benchmark

Good fit if you need

  • Statistical performance benchmarking in pytest suites
  • Compare benchmark results across git commits in CI
  • Track performance regressions in algorithmic code
  • Rich histogram and timing reports for optimization work

pytest-benchmark Pricing

Pricing Model
free
Free Tier
Yes
Entry Price
β€”
Enterprise Available
No
Transparency Score
β€”

Beta β€” estimates may differ from actual pricing

1,000
1001K10K100K1M

Estimated Monthly Cost

$25

Estimated Annual Cost

$300

Estimates are approximate and may not reflect current pricing. Always check the official pricing page.

Project Health

C

Health Score

1.4k 132
Bus Factor

3

Last Commit

26 days

Release Freq

N/A

Open Issues

119

Issue Response

N/A

License

BSD-2-Clause

Last checked: 2026-04-21

Lock-in Assessment

Low 5/5
Lock-in Score
5/5

πŸ”„ Thinking about migrating off pytest-benchmark?

Get an AI-drafted migration plan + a copy-paste email to pytest-benchmark support requesting a data export. Pick where you're moving to and tell us your context.

Looking for alternatives to pytest-benchmark?

Answer 4 quick questions β€” get an AI-ranked shortlist of tools that match your stack and requirements.

Open AI Tool Finder

Community Discussion

Comments powered by Giscus (GitHub Discussions). You need a GitHub account to comment.