official plugins for viztracer
Project description
vizplugins
official plugins for VizTracer; currently support tracing cpu usage through psutil.
Install
The prefered way to install vizplugins is via pip
pip install vizplugins
Basic Usage
The vizplugin should be used with viztracer.
You can use VizTracer and the plugin by
viztracer --plugin vizplugins.cpu_usage -- my_script.py arg1 arg2
which will generate a result.html
file in the directory you run this command, which you can open with Chrome.
The plugin samples cpu usage per 0.02s by default, but you can explicitly indicate the desired frequency at which to sample data per second
viztracer --plugin "vizplugins.cpu_usage -f 20" -- my_script.py arg1 arg2
which will sample data approximately 20 times per second, with a sampling interval of 0.05 second.
Example
The below image is an example of the resulting html, which is called on an recursively defined fibonacci funtion.
The "cpu_percentage" on the top indicates the corresponding cpu usage at each time period. You can see the details by clicking on one of the periods.
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
Built Distribution
Hashes for vizplugins-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f470d2e9577653458b1f23e4051333a0353d3fadd372c0a36dc8ad016466e7c |
|
MD5 | 60ee43034f74a85b4ffba196f486ca52 |
|
BLAKE2b-256 | 074b22b22a66e37291788f09e53e42c62f7e4815223214cd3a5ade8dc0bbd4d6 |