Pyperf

Latest version: v2.7.0

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

Scan your dependencies

Page 6 of 9

0.9.0

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

Enhancements:

* Runner doesn't ignore worker stdout and stderr anymore. Regular ``print()``
now works as expected.
* ``system`` command: Add a new ``--affinity`` command line option
* check and system emit a warning if nohz_full is used with the intel_pstate
driver.
* ``collect_metadata``: On CPUs not using the intel_pstate driver, don't run
the cpupower command anymore to check if the Turbo Boost is enabled. It
avoids to spawn N processes in each worker process, where N is the number of
CPUs used by the worker process. The ``system`` command can be used to tune
correctly Turbo Boost, or just to check the state of Turbo Boost.

Changes:

* system: tune stops the irqbalance service and sets the CPU affinity of
interruptions (IRQ).
* The ``--stdout`` internal option has been removed, replaced by a new
``--pipe`` option. Workers can now use stdout for regular messages.
* ``get_dates()`` methods now return ``None`` rather than an empty tuple
if runs don't have the ``date`` metadata.

0.8.3

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

Enhancement:

* New ``system tune`` command to tune the system for benchmarks: disable Turbo
Boost, check isolated CPUs, set CPU frequency, set CPU scaling governor to
"performance", etc.
* Support reading and writing JSON files compressed by gzip: use gzip
if the filename ends with ``.gz``
* The detection of isolated CPUs now works also on Linux older than 4.2:
``/proc/cmdline`` is now parsed to read the ``isolcpus=`` option
if ``/sys/devices/system/cpu/isolated`` sysfs doesn't exist.

Backward incompatible changes:

* JSON file produced by perf 0.8.3 cannot be read by perf 0.8.2 anymore.
* Remove the Metadata class: values of get_metadata() are directly metadata
values.
* Drop support for JSON produced with perf 0.7.3 and older. Use perf 0.8.2
to convert old JSON to new JSON.

Optimizations:

* Loading a large JSON file is now 10x faster (5 sec => 500 ms).
* Optimize ``Benchmark.add_run()``: don't recompute common metadata at each
call, but update existing common metadata.
* Don't store dates of metadata as datetime.datetime but strings to optimize
``Benchmark.load()``

0.8.2

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

* Fix formatting of benchmark which only contains calibration runs.

0.8.1

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

* Rename ``metadata`` command to ``collect_metadata``
* Add new commands: ``metadata`` (display metadata of benchmarks files)
and ``check`` (check if benchmarks seem stable)
* timeit: add ``--duplicate`` option to reduce the overhead of the outer loop.
* BenchmarkSuite constructor now requires a non-empty sequence of Benchmark
objects.
* Store date in metadata with microsecond resolution.
* ``collect_metadata``: add ``--output`` command line option.
* Bugfix: don't follow symbolic links when getting the absolute path to a
Python executable. The venv module requires to use the symlink to get the
modules installed in a virtual environment.

0.8.0

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

The API was redesigned to support running multiple benchmarks with a single
Runner object.

Enhancements:

* ``--loops`` command line argument now accepts ``x^y`` syntax. For example,
``--loops=2^8`` uses ``256`` iterations
* Calibratation is now done in a dedicated process to avoid side effect on the
first process. This change is important if Python has a JIT compiler, to
get more reliable timings on the first worker computing samples.

Incompatible API changes:

* Benchmark constructor now requires a non-empty sequence of Run objects.
* A benchmark must now have a name: all runs must have a name metadata.
* Remove *name* argument from Runner constructor and add *name* parameter
to :func:`Benchmark.bench_func` and :func:`Benchmark.bench_sample_func`
* ``perf.text_runner.TextRunner`` becomes simply ``perf.Runner``.
Remove the ``perf.text_runner`` module.
* ``TextRunner.program_args`` attribute becomes a parameter of :class:`Runner`
constructor. *program_args* must no more start with ``sys.executable`` which
is automatically added, since the executable can now be overridden by the
``--python`` command line option.
* The ``TextRunner.prepare_subprocess_args`` attribute becomes a new
*add_cmdline_args* parameter of :class:`Runner` constructor which is called
with different arguments than the old *prepare_subprocess_args* callback.

Changes:

* Add *show_name* optional parameter to :class:`Runner`. The runner now
displays the benchmark name by default.
* The calibration is now done after starting tracing memory
* Run constructor now accepts an empty list of samples. Moreover, it also
accepts ``int`` and ``long`` number types for warmup sample values, not only
``float``.
* Add a new private ``--worker-task`` command line option to only execute
a specific benchmark function by its identifier.
* Runner now supports calling more than one benchmark function using
``--worker-task`` internally.
* Benchmark.dump() and BenchmarkSuite.dump() now fails by default if the
file already exists. Set the new *replace* parameter to true to allow to
replace an existing file.

0.7.12

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

* Add ``--python`` command line option
* ``timeit``: add ``--name``, ``--inner-loops`` and ``--compare-to`` options
* TextRunner don't set CPU affinity of the main process, only on worker
processes. It may help a little bit when using NOHZ_FULL.
* metadata: add ``boot_time`` and ``uptime`` on Linux
* metadata: add idle driver to ``cpu_config``

Page 6 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.