Pyperf

Latest version: v2.9.0

Safety actively analyzes 714499 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 10

1.6.1

--------------------------

The project name changes to "pyperf" from "perf", to avoid confusion
with the `Linux perf project <https://perf.wiki.kernel.org/>`_ which has
a Python binding called "perf" as well.

1.6.0

--------------------------

* Add *teardown* optional parameter to :class:`Runner.timeit` and ``--teardown``
option to the :ref:`perf timeit <timeit_cmd>` command. Patch by **Alex
Khomchenko**.
* ``Runner.timeit(stmt)`` can now be used to use the statement as the benchmark
name.
* Port :ref:`system tune <system_cmd>` command to Python 2 (use
lseek+read/write instead of pread/pwrite which aren't available on Python 2).
Patch by **Stefan Talpalaru**.
* :ref:`perf collect_metadata <collect_metadata_cmd>` now also supports reading
CPU frequencies on IBM Z.

1.5.1

--------------------------

* Fix ``--track-memory`` option of the ``Runner.bench_command()`` command.

1.5

------------------------

* Fix ``--track-memory`` and ``--tracemalloc`` options.
Add non regression tests.
* Remove the ``--max-time`` option of Runner, it was ignored.
* Project moved from https://github.com/haypo/perf to https://github.com/vstinner/perf
* system command: In case the system is not ready for benchmarking, makes
system show exits with return code 2 so bash scripts could put
'python -m perf system show' directly without greping for the output.
Contributed by Boris Feld.
* On Windows: Enables high priority for processes when benchmarking
(``REALTIME_PRIORITY_CLASS``). Contributed by Steve Dower.

1.4

------------------------

* Fix parse_cpu_list(): strip also NUL characters
* Add examples to the README file. Contributed by **Alex Willmer**.

1.3

------------------------

* Add ``get_loops()`` and ``get_inner_loops()`` methods to Run and Benchmark
classes
* Documentation: add export_csv.py and plot.py examples
* Rewrite warmup calibration for PyPy:

- Use Q1, Q3 and stdev, rather than mean and checking if the first value
is an outlier
- Always use a sample of 10 values, rather than using a sample of a variable
size starting with 3 values

* Use lazy import for most imports of the largest modules to reduce the
number of imported module on 'import perf'.
* Fix handling of broken pipe error to prevent logging the error:
"Exception ignored in: ... BrokenPipeError: ..."
* ``collect_metadata`` gets more metadata on FreeBSD:

- use ``os.getloadavg()`` if ``/proc/loadavg`` is not available (ex: FreeBSD)
- use ``psutil.boot_time()`` if ``/proc/stat`` is not available (ex: FreeBSD)
to get ``boot_time`` and ``uptime`` metadata

* The Runner constructor now raises an exception if more than one instance is
created.

Page 4 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.