Skip to main content

A lightweight python timing class

Project description

TimeBoss

Lightweight python timing class. Inspired by TimeLord (https://github.com/IceCubeOpenSource/skyllh)

Installation

pip install TimeBoss

Usage

from time_boss import TimeBoss
import numpy as np

with TimeBoss("uniform and summary stats"):
    for i in range(100):
        a = np.random.uniform(10000)
        with TimeBoss("sum"):
            np.sum(a)
        with TimeBoss("mean"):
            np.average(a)

for i in range(100):
    with TimeBoss("normal"):
        a = np.random.normal(100000)

TimeBoss.result(unit="ms")
TimeBoss.plot_results()

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

TimeBoss-0.1.3.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

TimeBoss-0.1.3-py3-none-any.whl (16.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page