Skip to main content

A collection of benchmarking tools.

Project description

Benchmark Utilities

GitHub license

About

A collection of benchmarking tools. PYPI Package

Table of Contents

Using the library

Installing and using the library

First, you need to install the library either using pip:

$ pip install bench_utils

Then, import it and use it like so:

from bench_utils import timeit, profileit

# --- Timeit --- #
# Context Manager
with timeit():
    # A code block
    pass


@timeit()
def my_func():
    # Function code
    pass


# --- Profileit --- #
# Context Manager
with profileit():
    # A code block
    pass


@profileit()
def my_func():
    # Function code
    pass

For more advanced examples check example_timeit.py and example_profileit.py .

Manually install the library

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have a machine with anaconda installed and any Bash based shell (e.g. zsh) installed.

$ conda -V
conda 4.10.1

$ echo $SHELL
/usr/bin/zsh

Install the requirements

All the installation steps are being handled by the Makefile.

First, modify the python version (min_python) and everything else you need in the settings.ini.

Then, execute the following commands:

$ make create_env
$ conda activate yaml_config_wrapper
$ make dist

Now you are ready to use and modify the library.

Update PyPI package

This is mainly for future reference for the developers of this project. First, create a file called ~/.pypirc with your pypi login details, as follows:

[pypi]
username = your_pypi_username
password = your_pypi_password

Then, modify the python version (min_python), project status (status), release version (version) and everything else you need in the settings.ini.

Finally, execute the following commands:

$ make create_env
$ conda activate yaml_config_wrapper
$ make release

For a dev release, change the testing_version and instead of make release, run make release_test.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Buy Me A Coffee

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

bench-utils-1.0.3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

bench_utils-1.0.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file bench-utils-1.0.3.tar.gz.

File metadata

  • Download URL: bench-utils-1.0.3.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for bench-utils-1.0.3.tar.gz
Algorithm Hash digest
SHA256 9b206790f9d497bd777b44a8a707b1677ed59f34e19653d8538af8fc9e3e5b48
MD5 16d0bee74e64f9bd9258c83a7a3b72b2
BLAKE2b-256 0d80c073a32db9f9673d0299bdc207bcd7b69d46a0c682d46020f60342dfcea0

See more details on using hashes here.

File details

Details for the file bench_utils-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: bench_utils-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for bench_utils-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4d91ec46e10c3eb6243291f6f353361c70184dd6a4bef68cac9d97439233a04b
MD5 c0646e26c2c47cbf6360582b034ecb44
BLAKE2b-256 45297cd1aab9288b154918793e87fc9d7d3a07baa61cf5d4b90d5cb30e67cf30

See more details on using hashes here.

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