A framework for benchmarking in python
Project description
benchwork
A framework for benchmarking in python
Installation
pip install -U benchwork
Usage
from benchwork import (
BenchAPI,
BenchCaseSpeed,
BenchSuite,
BenchSetSpeed,
BenchSetVersion,
run_suite,
)
class BenchAPIPackage1(BenchAPI):
name = "package1"
version = "0.0.1"
class BenchAPIPackage2(BenchAPI):
name = "package2"
version = "0.0.2"
class BenchCaseSpeed(BenchCaseSpeed):
timeit_number = 10
def run_core(self):
import time
time.sleep(.1)
class BenchSetSpeed(BenchSetSpeed):
case = BenchCaseSpeed
class BenchSuite(BenchSuite):
"""Benchmarking suite"""
set_classes = [BenchSetVersion, BenchSetSpeed]
if __name__ == "__main__":
run_suite(BenchSuite, None, "Benchmarking")
Output:
# Benchmarking
Benchmarking suite
## Versions
Show versions of testing packages
| |Version|
|-|-----------------------|
|package1|0.0.1|
|package2|0.0.2|
## Running speed
| |Speed|
|-|-----------------------|
|package1|1.003228693996789|
|package2|1.0028911930057802|
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
benchwork-0.0.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for benchwork-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ce412f6a53f51d739519a9e687901e07082b861a01010418498d1c52dedca36 |
|
MD5 | 5dc075d2c865cc2feef60f13f8a22c55 |
|
BLAKE2b-256 | 2952e8d35e3f8c59c7069733a964812bf05c87bcf297b7cb3daf5b586e534b30 |