true-north
Beautiful, powerful, and pythonic benchmarks engine for Python code.
Features:
- Follows best practices of benchmarking to produce the most reliable results.
- Detects caching and side-effects.
- Traces memory usage and allocations (opt-in).
- Opcodes tracing for reproducble benchmarks (opt-in).
- 100% type safe.
- Zero dependency.
- Highly configurable.
- Nice and colorful output.
- Ships with CLI to discover and run all benchmarks.
- A friendly API to write your own logic on top of benchmarks.
sorting algorithms
list.sort
possible side-effect detected: slowest iteration x21 slower than fastest
5k loops, best of 5: 43.579 us ± 12.681 us ████▇
11 ops, 3961 ns/op
sorted
5k loops, best of 5: 43.911 us ± 3.697 us x1.01 slower █████
11 ops, 3991 ns/op
insert_sort
2 loops, best of 5: 100.662 ms ± 111.725 us x2309.85 slower █████
11_683_767 ops, 8 ns/op
Installation
python3 -m pip install true-north
Usage
import true_north
group = true_north.Group()
@group.add
def math_sorted(r):
val = [1, 2, 3] * 300
# timer start before entering the loop
# and stops when leaving it
for _ in r:
sorted(val)
# run and print all benchmarks in the group
if __name__ == '__main__':
group.print()
See examples for more examples and true-north.orsinium.dev for chad documentation.
Metadata
Release files for true-north 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| true-north-0.3.0.tar.gz | 17.9 kB | Without provenance | Details for true-north-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| true_north-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for true_north-0.3.0-py3-none-any.whl |
Total release size: 35.4 kB
Release files / true-north-0.3.0.tar.gz
| Download URL | true-north-0.3.0.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cedc88339093f68089d0e751e712f143c98a6b51c1af2e14d2b6b817307a3fa8
|
|
BLAKE2b-256 checksum How to use checksums |
75eb98384e09dad09ef2a054c9c89737e5fe0a73cad2d16e4c063b99dd81ae33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.25.1
|
Release files / true_north-0.3.0-py3-none-any.whl
| Download URL | true_north-0.3.0-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41201598bf58d32b3c7b81a2fd68571e94e90e33bfb82d2fa855c5f4f2f3086a
|
|
BLAKE2b-256 checksum How to use checksums |
c021fa5dc2f5d15f2b2c90c38a285fe37288e5e2d88a3bf1732653dded202ed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.25.1
|
Security for true-north 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.