Raptor
A Easy Way To Benchmark Your Code.
How To Use It
Step 1: First You Will Need To Create A Benchmark File For Your Project
"""to_benchmark.py"""
#Add All Your Setup
import math
#Write Your Benchmarking Functions
def bench_square_root():
"""Name Your Function Starting With bench. Or Raptor Wont Detect It
Also the function should not take any arguments"""
return math.sqrt(25)
def bench_multiply():
return 5 ** 25
Step 2: Download raptor.py
pip install python-raptor
Then, Run This In Your Terminal
NOTICE: The -t Argument Takes An Integer Which Tells Raptor How Many Times Should Each Benchmarking Function Run
raptor.py to_benchmark.py -t 10000
Step 3: See The Output. Voilaaaaa!!!!!!!!!
Output
========== Bench Marking ===========
[bench_square_root] Took 0.0025385 Seconds For 10000 Run(s)
[bench_multiply] Took 0.0010813999999999997 Seconds For 10000 Run(s)
Future Features
- I want to add an history, which can show you how much faster or slower your program has gotten
- I want to add colored output
- I want to add better exception handling
Built With
Raptor Uses Timeit Module To Benchmark Your Code
Author
Roshan Jignesh Mehta - sonicroshan122@gmail.com
Metadata
Release files for python-raptor 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_raptor-0.2.1.tar.gz | 2.7 kB | Without provenance | Details for python_raptor-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_raptor-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for python_raptor-0.2.1-py3-none-any.whl |
Total release size: 18.1 kB
Release files / python_raptor-0.2.1.tar.gz
| Download URL | python_raptor-0.2.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdb482391184207f7e2490e61986d7d1bc43468bfb493b4fe350d6fcbf85843b
|
|
BLAKE2b-256 checksum How to use checksums |
90e0fdf4099aea3a867b7a5fb29da408ce26df5f958874d683f62bb479880089
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8
|
Release files / python_raptor-0.2.1-py3-none-any.whl
| Download URL | python_raptor-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42d47bd647407e3db6470254ba475d431e039b394b5702ba0c61d10877670ee3
|
|
BLAKE2b-256 checksum How to use checksums |
8d851f1dca86966126692a784e5d1bfe734bbb8cd42cbfdb3ce739501a6982a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8
|
Security for python-raptor 0.2.1
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.