Skip to main content

Hand profiler

Install

$ pip install handprofiler

Example of use

from time import sleep
from random import random

import handprofiler as  profiler


@profiler.track("foo")
def foo():
    for _ in range(2):
        token = profiler.start("in foo")
        sleep(random())
        profiler.stop(token)


@profiler.track("bar")
def bar():
    for _ in range(3):
        sleep(0.3 + random() * 0.001)


def zoo():
    for _ in range(4):
        token = profiler.start("in zoo")
        sleep(random() * 3)
        profiler.stop(token)


bar()
zoo()
foo()
foo()

profiler.printstats()
profiler.clear()
total=0:00:01.866119 avg=0:00:00.466529±0:00:00.340207 runs=4                    in foo
total=0:00:01.579377 avg=0:00:00.394844±0:00:00.310193 runs=4                    in zoo
total=0:00:00.902268 avg=0:00:00.902268±0:00:00 runs=1                           bar
total=0:00:00.867672 avg=0:00:00.433836±0:00:00.332681 runs=2                    foo

Metadata

Release files for handprofiler 0.0.3

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

Source distribution (sdist)

Source distribution for handprofiler 0.0.3
File Size Uploaded Provenance Actions
handprofiler-0.0.3.tar.gz 3.4 kB Without provenance Details for handprofiler-0.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 7.0 kB

Release files / handprofiler-0.0.3.tar.gz

Download URL handprofiler-0.0.3.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dcb90b1e5c9390a13d91028360449f56aa3ef9e92c0ac594fc04ba5a226dca4e
BLAKE2b-256 checksum
How to use checksums
9d24de1d821c52dfd170393d43f5a59eb7b590afdd4e4879c0da87e1a06f437b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / handprofiler-0.0.3-py3-none-any.whl

Download URL handprofiler-0.0.3-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
184d01df22222fcffd01876475ea0f8af6eb29a1263b7638bfda845d18df455a
BLAKE2b-256 checksum
How to use checksums
f01261d1e58a4d00b14bca7fd2470371a2a8aeebd3eb301c5830bed4f181f645
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for handprofiler 0.0.3

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