Skip to main content

Simple Benchmarking Library.

Project description

mbench

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install mbench

Usage

from mbench import profileme
profileme()

def some_function():
    print("Hello")

some_function()
Hello
Function: some_function
  Duration: 0.000706 seconds
  CPU time: 0.000668 seconds
  Memory usage: 2.80 MB
  GPU usage: 0.00 MB
  I/O usage: 0.00 MB
  Avg Duration: 0.000527 seconds
  Avg CPU time: 0.000521 seconds
  Avg Memory usage: 0.35 MB
  Avg GPU usage: 0.00 MB
  Avg I/O usage: 0.00 MB
  Total calls: 8
-----------------------------
Profiling data saved to profiling_data.csv

Functions you want to profile must

  1. Be defined in the same module as the profileme function.
  2. Be called after profileme() is called.

This is to avoid imports and other low-level functions from being profiled.

License

mbench is distributed under the terms of the MIT License.

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

mbench-0.0.3.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

mbench-0.0.3-py3-none-any.whl (6.4 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