YAPBWD - Yet Another Profiler But With Decorators
This Profiler uses decorators, so it is easy to use:
-
Want to profile time of your program? No problem! Just add @YAPBWD.time_profiler
-
Want see how much memory your program uses? Here you are: add @YAPBWD.memory_profiler
-
This profiler also has clones of above decorators with many_ prefix. As it says, it runs the program many times and says the average time or memory.
Cannot understand? Here is a basic demonstration script for you!
import YAPBWD
@YAPBWD.time_profiler
def main(some_arguments):
return some_arguments + 1
if __name__ == '__main__':
main(2)
After execution, you can see the time it takes to Python to add one to a number.
Why you need it?
Well... I think time profiling is useful for everyone, but who will really know how much memory it requires doing something? I know that it is still useful for everybody who will write something like a math algorithm to test it is works fine and there are no problems.
P.S:
Don't try to use two decorators if you need to have accuracy measurements, because the result will be spoiled for a little.
Also, You shouldn't profile memory many times if you are having cache function like a lru_cache from functools.
Another thing, profiler decorators should be at the top of a decorators to work normally.
Release files for YAPBWD 0.0.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 | |
|---|---|---|---|
| YAPBWD-0.0.1.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| YAPBWD-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.6 kB
Release files / YAPBWD-0.0.1.tar.gz
| Download URL | YAPBWD-0.0.1.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a2ccd893124cc79235ec59f395e59858aa2140b38fe20baf674557c414213c8
|
|
BLAKE2b-256 checksum How to use checksums |
561c2fec46419e0db9e2d947df8e2994062d58c1089ecdc54da9564f87690814
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2
|
Release files / YAPBWD-0.0.1-py3-none-any.whl
| Download URL | YAPBWD-0.0.1-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6cb1494ab28ec780534c0d52470a3e8a7baaa8b7cd92204b8dbfbfabeded8db0
|
|
BLAKE2b-256 checksum How to use checksums |
b0af489d5b343fe57bd5d4826bc8bfe571dd83adfb9679ad14b6043635fe75e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2
|