perfharness
Perfharness is a python library for tracking testcase performance over time.
How to use it
Install perfharness with pip install perfharness.
Write a perfharness testcase by building a python module with a main function that takes no arguments.
You can do any setup you need in the root module namespace so that the code which actually gets timed can be in main.
Configure perfharness by putting a .perfharness.ini file in the current directory.
Here is a sample configuration:
[perfharness]
sources_root = ../../..
sources = angr/angr,angr/angr_native,pyvex/pyvex,pyvex/pyvex_c,archinfo/archinfo,claripy/claripy,cle/cle,ailment/ailment
sources_ignore = *.o,*.so,*.a,*.pyc
build = pip install -e ./angr -e ./pyvex
cpu_percent_less_than = 10
mem_available_greater_than = 3gb
# https://docs.sqlalchemy.org/en/14/core/engines.html#database-urls
database = sqlite:///perf.db
Run perfharness with python -m perfharness run [options] testcase.py.
Valid options include --num [n] to collect n runs of data and --warmup [n] to run the testcase n times before collecting any data.
Visualize your testcase performance over time with python -m perfharness viz [options] testcase.py.
Different colors will be used to demarcate different attributes which might affect performance, such as the cpu and the python version.
Metadata
Release files for perfharness 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| perfharness-1.0.3.tar.gz | 34.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| perfharness-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.0 kB
Release files / perfharness-1.0.3.tar.gz
| Download URL | perfharness-1.0.3.tar.gz |
|---|---|
| Size | 34.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
969284fcc619b1def9dc606820310bda58572bbb3334f3a1d59e99dbdf248838
|
|
BLAKE2b-256 checksum How to use checksums |
7d3ffd0e871159dbe6efbff3c4cd66ad7082d033c71570c1f6ec7ac78f6ca67b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / perfharness-1.0.3-py3-none-any.whl
| Download URL | perfharness-1.0.3-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc6595d56e9ced2caf2ce81a531d0868e73b1034d6103fb7c97584430a84a813
|
|
BLAKE2b-256 checksum How to use checksums |
219f43f6088e1e1a82bb04f286afaa63cd7e630e864b5c3105ec8bc9faff7201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|