Metadata-Version: 2.1
Name: fastbench
Version: 0.1.5
Summary: A pure-python based benchmarking package for Python 🤪
Home-page: https://github.com/itsmeadarsh2008/fastbench
License: MIT
Keywords: bench,fastbench,benchmark,pure,python,simple,performance,package,code,execution,time,cpu,memory,usage,lightweight,api,measure,function,track,monitor,test,efficiency,speed,algorithm,script,development,debugging,optimized,library,analyze,profile,scalable,reliable,tool,optimizations,profiling,debug,evaluate,performance testing,profiler,codebase,analytical,scalability,efficiency,analyzing,optimization,code optimization,proficiency,analytic,performance analysis
Author: Adarsh Gourab Mahalik
Author-email: gourabmahalikadarsh@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: psutil (>=5.9.8,<6.0.0)
Project-URL: Bug Tracker, https://github.com/itsmeadarsh2008/fastbench/issues
Project-URL: Repository, https://github.com/itsmeadarsh2008/fastbench.git
Description-Content-Type: text/markdown

<h1 align="center">
  <br>
  <img src="https://raw.githubusercontent.com/itsmeadarsh2008/fastbench/main/fastbench.svg" width="200" height="200">
  <br>
  FastBench
  <br>
  <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/fastbench">
  <img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/itsmeadarsh2008/fastbench">
  <br>
</h1>

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:

```bash
pip install fastbench
```

##  Usage

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

```python
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](https://github.com/itsmeadarsh2008/fastbench/blob/main/CONTRIBUTING.md).

##  License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/itsmeadarsh2008/fastbench?tab=MIT-1-ov-file) file for details.
