{"id":21532662,"url":"https://github.com/itsmeadarsh2008/fastbench","last_synced_at":"2025-10-13T09:03:33.958Z","repository":{"id":236476935,"uuid":"792687965","full_name":"itsmeadarsh2008/fastbench","owner":"itsmeadarsh2008","description":"A pure-python based benchmarking package for Python 🤪","archived":false,"fork":false,"pushed_at":"2024-04-28T04:25:30.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T21:18:50.998Z","etag":null,"topics":["benchmark","dead-simple","lightweight","pure-python","python","simple"],"latest_commit_sha":null,"homepage":"https://github.com/itsmeadarsh2008/fastbench","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsmeadarsh2008.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-27T09:30:06.000Z","updated_at":"2025-01-14T03:11:11.000Z","dependencies_parsed_at":"2024-04-27T10:29:54.838Z","dependency_job_id":"ee6c753d-144c-48b5-b955-e5fd84c734f7","html_url":"https://github.com/itsmeadarsh2008/fastbench","commit_stats":null,"previous_names":["itsmeadarsh2008/fastbench"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeadarsh2008%2Ffastbench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeadarsh2008%2Ffastbench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeadarsh2008%2Ffastbench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmeadarsh2008%2Ffastbench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsmeadarsh2008","download_url":"https://codeload.github.com/itsmeadarsh2008/fastbench/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244097116,"owners_count":20397545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","dead-simple","lightweight","pure-python","python","simple"],"created_at":"2024-11-24T02:21:22.556Z","updated_at":"2025-10-13T09:03:33.873Z","avatar_url":"https://github.com/itsmeadarsh2008.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003e\r\n  \u003cbr\u003e\r\n  \u003cimg src=\"https://raw.githubusercontent.com/itsmeadarsh2008/fastbench/main/fastbench.svg\" width=\"200\" height=\"200\"\u003e\r\n  \u003cbr\u003e\r\n  FastBench\r\n  \u003cbr\u003e\r\n  \u003cimg alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/fastbench\"\u003e\r\n  \u003cimg alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/itsmeadarsh2008/fastbench\"\u003e\r\n  \u003cbr\u003e\r\n\u003c/h1\u003e\r\n\r\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.\r\n\r\n## ✨ Features\r\n\r\n- ⏱️ Measure the execution time of a function or code block\r\n- 📊 Track CPU usage during code execution\r\n- 🖥️ Monitor memory usage during code execution\r\n- ⚡ Lightweight and fast\r\n- 🔄 Simple and easy-to-use API\r\n\r\n##  Installation\r\n\r\nYou can install FastBench via pip:\r\n\r\n```bash\r\npip install fastbench\r\n```\r\n\r\n##  Usage\r\n\r\nHere's an example of how to use FastBench to benchmark Python code:\r\n\r\n```python\r\nfrom fastbench import mt, mc, mm\r\n\r\n# Define a sample function for testing\r\ndef sample_function(n):\r\n  return sum(range(n))\r\n\r\n# Test the mt function (measure execution time)\r\ntime_taken = mt(sample_function, n=1000000)\r\nprint(\"Time taken:\", time_taken)\r\n\r\n# Test the mc function (measure CPU usage)\r\ncpu_usage = mc(sample_function, n=1000000)\r\nprint(\"CPU usage:\", cpu_usage)\r\n\r\n# Test the mm function (measure memory usage)\r\nmemory_usage = mm(sample_function, n=1000000)\r\nprint(\"Memory usage:\", memory_usage)\r\n```\r\n\r\n##  Contributing\r\n\r\nContributions are welcome! Check out the [Contribution Guidelines](https://github.com/itsmeadarsh2008/fastbench/blob/main/CONTRIBUTING.md).\r\n\r\n##  License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/itsmeadarsh2008/fastbench?tab=MIT-1-ov-file) file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsmeadarsh2008%2Ffastbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsmeadarsh2008%2Ffastbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsmeadarsh2008%2Ffastbench/lists"}