Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hooks for calling arbitrary code around each benchmark #193

Merged
merged 13 commits into from
Jul 28, 2024
Prev Previous commit
Next Next commit
Add next version
mdboom committed Jul 8, 2024
commit 7cc201e5cf31b827ec77e4e0d90d043d58366f9c
2 changes: 1 addition & 1 deletion doc/run_benchmark.rst
Original file line number Diff line number Diff line change
@@ -198,7 +198,7 @@ Specializer statistics (``pystats``)
If running benchmarks on a CPython built with the ``--enable-pystats`` flag, when you pass ``--hook pystats``, pyperf will collect ``pystats`` on the benchmark code by calling ``sys._stats_on`` immediately before the benchmark and calling ``sys._stats_off`` immediately after.
Stats are not collected when running ``pyperf``'s own code or when warming up or calibrating the benchmarks.

**New in X.YY:** The ``--hook pystats`` flag must be given to collect pystats.
**New in 2.8.0:** The ``--hook pystats`` flag must be given to collect pystats.

Due to the overhead of collecting the statistics, the timing results will be meaningless.