Skip to main content

vizplugins

build coverage pypi support-version license commit

official plugins for VizTracer; currently support tracing cpu and memory 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 record the cpu percent of the process and 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.

You can also trace the memory usage and cpu usage by

viztracer --plugin vizplugins --cpu_usage --memory_usage -- my_script.py arg1 arg2

which will record both the cpu and memory usage.

Example

The below image is an example of the resulting html, which is called on an recursively defined fibonacci funtion.

The "cpu_usage" on the top indicates the corresponding cpu usage at each time period. The "memory_usage" have two colors, representing rss(Resident Set Size, the non-swapped physical memory) and vms(Virtual Memory Size). You can see the details by clicking on one of the periods.

example_img

Release files for vizplugins 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vizplugins 0.1.3
File Size Uploaded
vizplugins-0.1.3.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vizplugins 0.1.3
File Interpreter ABI Platform
vizplugins-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / vizplugins-0.1.3.tar.gz

Download URL vizplugins-0.1.3.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
734f434cfaa6178314cc4056b728dd9836652b1d3da14969d766f66d47e17a67
BLAKE2b-256 checksum
How to use checksums
432f8c817b9a49a7d82c9f98c79ea3588ed0d6250c10369d737c1d02d2701f95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / vizplugins-0.1.3-py3-none-any.whl

Download URL vizplugins-0.1.3-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35e512395607f2288592c0fdbda0c005ebea311ef9d1eeec8ddd83a8ca9a0f2f
BLAKE2b-256 checksum
How to use checksums
edf79121950290e59cd26e31f701400f37afaab3df4b7a10d456fe998c4c9d88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page