Skip to main content

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|

Metadata

Release files for benchwork 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for benchwork 0.0.2
File Size Uploaded Provenance Actions
benchwork-0.0.2.tar.gz 3.6 kB Without provenance Details for benchwork-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for benchwork 0.0.2
File Interpreter ABI Platform Actions
benchwork-0.0.2-py3-none-any.whl Python 3 none any Details for benchwork-0.0.2-py3-none-any.whl

Total release size: 8.8 kB

Release files / benchwork-0.0.2.tar.gz

Download URL benchwork-0.0.2.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5e6c3ba005c535485534bb67fe48b16a153739103c2d4e319eca57730701fdbe
BLAKE2b-256 checksum
How to use checksums
dadd462a98af7aa97e69d922a38459be009d3ce122b6ebd010e842245a7886ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.11.0 Linux/5.15.0-1022-azure

Release files / benchwork-0.0.2-py3-none-any.whl

Download URL benchwork-0.0.2-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
108ca9bd7aef958ff0b5af1e41d654d95296629ffcffb2b49a9ba1a9347f1fb2
BLAKE2b-256 checksum
How to use checksums
fa182aa185ae0f1be1af719a98836a6f5082fbcd92b27b152615b37b057dc33b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.11.0 Linux/5.15.0-1022-azure

Security for benchwork 0.0.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page