Skip to main content

official plugins for viztracer

Project description

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

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

vizplugins-0.1.3.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vizplugins-0.1.3-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file vizplugins-0.1.3.tar.gz.

File metadata

  • Download URL: vizplugins-0.1.3.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for vizplugins-0.1.3.tar.gz
Algorithm Hash digest
SHA256 734f434cfaa6178314cc4056b728dd9836652b1d3da14969d766f66d47e17a67
MD5 e138590f6c7ebda1ae33e6d6d14592a9
BLAKE2b-256 432f8c817b9a49a7d82c9f98c79ea3588ed0d6250c10369d737c1d02d2701f95

See more details on using hashes here.

File details

Details for the file vizplugins-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: vizplugins-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for vizplugins-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 35e512395607f2288592c0fdbda0c005ebea311ef9d1eeec8ddd83a8ca9a0f2f
MD5 8efd5cf3e87a73e2103c1ec53310051d
BLAKE2b-256 edf79121950290e59cd26e31f701400f37afaab3df4b7a10d456fe998c4c9d88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page