Skip to main content

System informations

Project description

Pypi Package Build Licence

bmtools provides some tools dedicated to benchmarking.



>= 3.7


>= 3.0


>= 1.1


Clone the github repo and

$ python install

or install via Pypi

$ pip install bmtools

Compare execution times

Benchmarking functions execution can be done with Compare class as follows:

import numpy as np
from bmtools import Compare

def star_op(x):
    return x**0.5

def pow_op(x):
    return pow(x, 0.5)

def sqrt_op(x):
    return np.sqrt(x)

if __name__ == "__main__":

    # Single comparison
    bm1 = Compare(pow_op, star_op, sqrt_op, unit='ms'), ), check_output=True)

    # Parametric comparison
    bm2 = Compare(pow_op, star_op, sqrt_op, unit='ms')
    for n in [2**n for n in range(16, 23)]:, ), desc=n, check_output=True)


Add time probes to your code

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bmtools-0.1.2.tar.gz (6.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page