Skip to main content



FastBench
PyPI - Downloads GitHub repo size

FastBench is a high-performance Python package for benchmarking code execution time, CPU usage, and memory usage. It's implemented in Python for simplicity and provides a simple API for measuring the performance of your Python code.

✨ Features

  • ⏱️ Measure the execution time of a function or code block
  • 📊 Track CPU usage during code execution
  • 🖥️ Monitor memory usage during code execution
  • ⚡ Lightweight and fast
  • 🔄 Simple and easy-to-use API

Installation

You can install FastBench via pip:

pip install fastbench

Usage

Here's an example of how to use FastBench to benchmark Python code:

from fastbench import mt, mc, mm

# Define a sample function for testing
def sample_function(n):
  return sum(range(n))

# Test the mt function (measure execution time)
time_taken = mt(sample_function, n=1000000)
print("Time taken:", time_taken)

# Test the mc function (measure CPU usage)
cpu_usage = mc(sample_function, n=1000000)
print("CPU usage:", cpu_usage)

# Test the mm function (measure memory usage)
memory_usage = mm(sample_function, n=1000000)
print("Memory usage:", memory_usage)

Contributing

Contributions are welcome! Check out the Contribution Guidelines.

License

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

Metadata

Release files for fastbench 0.1.5

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

Source distribution (sdist)

Source distribution for fastbench 0.1.5
File Size Uploaded Provenance Actions
fastbench-0.1.5.tar.gz 3.1 kB Without provenance Details for fastbench-0.1.5.tar.gz

Built distribution (wheel)

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

Total release size: 6.4 kB

Release files / fastbench-0.1.5.tar.gz

Download URL fastbench-0.1.5.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
010ea07a212622a085c5c6750817b5203f96b9d67d99494c27c4d2cab6898e80
BLAKE2b-256 checksum
How to use checksums
cb9447c99410c99756729dd4319581153638c9c1de6b78835178a0f9a6e5ceb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.1 Linux/6.5.0-1018-azure

Release files / fastbench-0.1.5-py3-none-any.whl

Download URL fastbench-0.1.5-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67938716a63c62fe12ab4c4d707103ebcba67682ce5a2abac554cd1eed4e1867
BLAKE2b-256 checksum
How to use checksums
630a7a94a0ee9d968235fc57f494cb20539978c2af7f05f259f9946dfbb38335
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.1 Linux/6.5.0-1018-azure

Security for fastbench 0.1.5

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