py.test fixture for benchmarking code
Project description
py.test fixture for benchmarking code
Free software: BSD license
Installation
pip install pytest-benchmark
Usage
def test_my_stuff(benchmark): with benchmark: # Code to be measured result = time.sleep(0.000001) # Extra code, to verify that the run completed correctly. # Note: this code is not measured. assert result is None
Documentation
Obligatory screenshot
Development
To run the all tests run:
tox
Changelog
0.1.0 (2014-10-10)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest-benchmark-0.6.0.tar.gz
(25.2 kB
view details)
Built Distribution
File details
Details for the file pytest-benchmark-0.6.0.tar.gz
.
File metadata
- Download URL: pytest-benchmark-0.6.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66c0d89282a93c553e56c5ec788b8d69784a1e701fa96ec47db9a60f1fddb224 |
|
MD5 | 99906d956d901bf31f54c5a41274c84d |
|
BLAKE2b-256 | 22629780b292c374bd57757cd612d66f325c61f73db998e21ea1b7986772ffd8 |
File details
Details for the file pytest_benchmark-0.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_benchmark-0.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89bca6e560ad55ed95a7742888e37d8dab4ca74b5f5ad0e07ebde93b52e7a75b |
|
MD5 | e95905e88f752dc595e9a0455e264d2b |
|
BLAKE2b-256 | d6943cc47cefe07c174ac4b4a8f91fd1de067d929fea85c89f016497e76560d3 |