A small python profiler using cProfile, pstats, Pandas and matplotlib.
Project description
nanoProfiler
A small python profiler using cProfile, pstats, Pandas and matplotlib.
nanoProfiler was primarily designed evaluate the internal variations of execution times in codes with variable complexity. But it can also be used with fixed complexity code.
Instalation
nanoProfiler can be installed with pip:
pip install nanoprofiler
or:
python -m pip install nanoprofiler
Manual instalation
Clone the repository
git clone https://gitlab.com/nanogennari/nanoprofiler.git
And run setup script
cd nanoprofiler
python setup.py install
Usage
Usage example:
from nanoprofiler import Profiler
pr = Profiler()
pr.start(name="exec1")
your_code()
pr.stop()
pr.start(name="exec2")
another_code()
pr.stop()
pr.plot_top_time(time="cumtime")
pr.plot_function(time="tottime")
pr.save_data("folder/to/save/results", "prefix_for_files")
More details on how to use nanoProfiler can be found here.
Documentation
Documentation can be found here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nanoprofiler-0.2.0.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for nanoprofiler-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd3e765d512a055117097818a307a6fed491f300f5a39fbea8b920f036c7a62f |
|
MD5 | e90ff8a19586decc664b85cc840847f4 |
|
BLAKE2b-256 | f9a8a4a11858be82b38c6dcd7ab8075546ef3a99c973ab06e987c376a5007426 |