fastbench


Namefastbench JSON
Version 0.1.5 PyPI version JSON
download
home_pagehttps://github.com/itsmeadarsh2008/fastbench
SummaryA pure-python based benchmarking package for Python 🤪
upload_time2024-04-28 04:26:15
maintainerNone
docs_urlNone
authorAdarsh Gourab Mahalik
requires_python<4.0,>=3.8
licenseMIT
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
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <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.
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/itsmeadarsh2008/fastbench",
    "name": "fastbench",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "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",
    "download_url": "https://files.pythonhosted.org/packages/cb/94/47c99410c99756729dd4319581153638c9c1de6b78835178a0f9a6e5ceb2/fastbench-0.1.5.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n  <br>\n  <img src=\"https://raw.githubusercontent.com/itsmeadarsh2008/fastbench/main/fastbench.svg\" width=\"200\" height=\"200\">\n  <br>\n  FastBench\n  <br>\n  <img alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/fastbench\">\n  <img alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/itsmeadarsh2008/fastbench\">\n  <br>\n</h1>\n\nFastBench 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.\n\n## \u2728 Features\n\n- \u23f1\ufe0f Measure the execution time of a function or code block\n- \ud83d\udcca Track CPU usage during code execution\n- \ud83d\udda5\ufe0f Monitor memory usage during code execution\n- \u26a1 Lightweight and fast\n- \ud83d\udd04 Simple and easy-to-use API\n\n##  Installation\n\nYou can install FastBench via pip:\n\n```bash\npip install fastbench\n```\n\n##  Usage\n\nHere's an example of how to use FastBench to benchmark Python code:\n\n```python\nfrom fastbench import mt, mc, mm\n\n# Define a sample function for testing\ndef sample_function(n):\n\u00a0\u00a0return sum(range(n))\n\n# Test the mt function (measure execution time)\ntime_taken = mt(sample_function, n=1000000)\nprint(\"Time taken:\", time_taken)\n\n# Test the mc function (measure CPU usage)\ncpu_usage = mc(sample_function, n=1000000)\nprint(\"CPU usage:\", cpu_usage)\n\n# Test the mm function (measure memory usage)\nmemory_usage = mm(sample_function, n=1000000)\nprint(\"Memory usage:\", memory_usage)\n```\n\n##  Contributing\n\nContributions are welcome! Check out the [Contribution Guidelines](https://github.com/itsmeadarsh2008/fastbench/blob/main/CONTRIBUTING.md).\n\n##  License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/itsmeadarsh2008/fastbench?tab=MIT-1-ov-file) file for details.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A pure-python based benchmarking package for Python \ud83e\udd2a",
    "version": "0.1.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/itsmeadarsh2008/fastbench/issues",
        "Homepage": "https://github.com/itsmeadarsh2008/fastbench",
        "Repository": "https://github.com/itsmeadarsh2008/fastbench.git"
    },
    "split_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"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "630a7a94a0ee9d968235fc57f494cb20539978c2af7f05f259f9946dfbb38335",
                "md5": "9652ee9a87e2379332fd95828408b532",
                "sha256": "67938716a63c62fe12ab4c4d707103ebcba67682ce5a2abac554cd1eed4e1867"
            },
            "downloads": -1,
            "filename": "fastbench-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9652ee9a87e2379332fd95828408b532",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 3249,
            "upload_time": "2024-04-28T04:26:14",
            "upload_time_iso_8601": "2024-04-28T04:26:14.731077Z",
            "url": "https://files.pythonhosted.org/packages/63/0a/7a94a0ee9d968235fc57f494cb20539978c2af7f05f259f9946dfbb38335/fastbench-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb9447c99410c99756729dd4319581153638c9c1de6b78835178a0f9a6e5ceb2",
                "md5": "22494a70dbd7e80ba94d22f4662cdccd",
                "sha256": "010ea07a212622a085c5c6750817b5203f96b9d67d99494c27c4d2cab6898e80"
            },
            "downloads": -1,
            "filename": "fastbench-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "22494a70dbd7e80ba94d22f4662cdccd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 3103,
            "upload_time": "2024-04-28T04:26:15",
            "upload_time_iso_8601": "2024-04-28T04:26:15.715042Z",
            "url": "https://files.pythonhosted.org/packages/cb/94/47c99410c99756729dd4319581153638c9c1de6b78835178a0f9a6e5ceb2/fastbench-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-28 04:26:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "itsmeadarsh2008",
    "github_project": "fastbench",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fastbench"
}
        
Elapsed time: 0.22307s