{"id":16431792,"url":"https://github.com/drkostas/bench-utils","last_synced_at":"2025-03-23T08:31:40.313Z","repository":{"id":57414606,"uuid":"440562434","full_name":"drkostas/bench-utils","owner":"drkostas","description":"A collection of benchmarking tools.","archived":false,"fork":false,"pushed_at":"2022-01-30T01:42:26.000Z","size":42,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T12:11:28.182Z","etag":null,"topics":["benchmark","benchmarking","timer","timit"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/bench-utils/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drkostas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-21T15:23:31.000Z","updated_at":"2024-09-14T16:06:10.000Z","dependencies_parsed_at":"2022-09-12T12:10:21.591Z","dependency_job_id":null,"html_url":"https://github.com/drkostas/bench-utils","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkostas%2Fbench-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkostas%2Fbench-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkostas%2Fbench-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkostas%2Fbench-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drkostas","download_url":"https://codeload.github.com/drkostas/bench-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078067,"owners_count":20557274,"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","benchmarking","timer","timit"],"created_at":"2024-10-11T08:32:35.421Z","updated_at":"2025-03-23T08:31:39.826Z","avatar_url":"https://github.com/drkostas.png","language":"Python","funding_links":["https://www.buymeacoffee.com/drkostas"],"categories":[],"sub_categories":[],"readme":"# Benchmark Utilities\n\n[![Downloads](https://static.pepy.tech/personalized-badge/bench-utils?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=red\u0026left_text=Downloads)](https://pepy.tech/project/bench-utils)\n[![GitHub license](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/drkostas/bench-utils/blob/master/LICENSE)\n\n## About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nA collection of benchmarking\ntools. [PYPI Package](https://pypi.org/project/bench-utils/)\n\n## Table of Contents\n\n+ [Using the library](#using)\n    + [Installing and using the library](#install_use)\n+ [Manually install the library](#manual_install)\n    + [Prerequisites](#prerequisites)\n    + [Install the requirements](#installing_req)\n+ [Update PyPI package](#pypi)\n+ [License](#license)\n\n## Using the library \u003ca name = \"using\"\u003e\u003c/a\u003e\n\n### Installing and using the library \u003ca name = \"install_use\"\u003e\u003c/a\u003e\n\nFirst, you need to install the library either using pip:\n\n```shell\n$ pip install bench_utils\n```\n\nThen, import it and use it like so:\n\n```python\nfrom bench_utils import timeit, profileit\n\n# --- Timeit --- #\n# Context Manager\nwith timeit():\n    # A code block\n    pass\n\n\n@timeit()\ndef my_func():\n    # Function code\n    pass\n\n\n# --- Profileit --- #\n# Context Manager\nwith profileit():\n    # A code block\n    pass\n\n\n@profileit()\ndef my_func():\n    # Function code\n    pass\n```\n\nFor more advanced examples\ncheck [example_timeit.py](https://github.com/drkostas/bench-utils/blob/master/example_timeit.py)\nand [example_profileit.py](https://github.com/drkostas/bench-utils/blob/master/example_profileit.py)\n.\n\n## Manually install the library \u003ca name = \"manual_install\"\u003e\u003c/a\u003e\n\nThese instructions will get you a copy of the project up and running on your local machine for\ndevelopment and testing purposes.\n\n### Prerequisites \u003ca name = \"prerequisites\"\u003e\u003c/a\u003e\n\nYou need to have a machine with\n[anaconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) installed and\nany Bash based shell (e.g. zsh) installed.\n\n```ShellSession\n\n$ conda -V\nconda 4.10.1\n\n$ echo $SHELL\n/usr/bin/zsh\n\n```\n\n### Install the requirements \u003ca name = \"installing_req\"\u003e\u003c/a\u003e\n\nAll the installation steps are being handled by\nthe [Makefile](https://github.com/drkostas/bench-utils/blob/master/Makefile).\n\nFirst, modify the python version (`min_python`) and everything else you need in\nthe [settings.ini](https://github.com/drkostas/bench-utils/blob/master/settings.ini).\n\nThen, execute the following commands:\n\n```ShellSession\n$ make create_env\n$ conda activate bench_utils\n$ make dist\n```\n\nNow you are ready to use and modify the library.\n\n## Update PyPI package \u003ca name = \"pypi\"\u003e\u003c/a\u003e\n\nThis is mainly for future reference for the developers of this project. First,\ncreate a file called `~/.pypirc` with your pypi login details, as follows:\n\n```\n[pypi]\nusername = your_pypi_username\npassword = your_pypi_password\n```\n\nThen, modify the python version (`min_python`), project status (`status`), release version (`version`) \nand everything else you need in\nthe [settings.ini](https://github.com/drkostas/bench-utils/blob/master/settings.ini).\n\nFinally, execute the following commands:\n\n```ShellSession\n$ make create_env\n$ conda activate bench_utils\n$ make release\n```\n\nFor a dev release, change the `testing_version` and instead of `make release`, run `make release_test`.\n\n## License \u003ca name = \"license\"\u003e\u003c/a\u003e\n\nThis project is licensed under the Apache License - see\nthe [LICENSE](https://github.com/drkostas/bench-utils/blob/master/LICENSE) file for details.\n\n\u003ca href=\"https://www.buymeacoffee.com/drkostas\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrkostas%2Fbench-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrkostas%2Fbench-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrkostas%2Fbench-utils/lists"}