Skip to main content

A plugin to add extra performance monitor for Dash applications using Dash Hooks.

Project description

dash-performance-monitor-plugin

GitHub PyPI Ruff

A plugin to add extra performance monitor for Dash applications using Dash Hooks.

Installation

pip install dash-performance-monitor-plugin

Usage

from dash import Dash
# Import the performance monitor plugin
from dash_performance_monitor_plugin import setup_performance_monitor_plugin

# Enable the performance monitor plugin for the current app
setup_performance_monitor_plugin()

app = Dash(__name__)
# Rest of your app code...

Example

Run the included example. This example demonstrates how to add a performance monitor to your Dash application, which will show FPS (Frames Per Second), MS (Milliseconds per frame), and MB (Memory usage) in real-time.

python example.py

API Reference

setup_performance_monitor_plugin()

This function sets up the performance monitor plugin for your Dash application using stats.js.

Parameter Type Default Description
script_src str "https://cdn.jsdelivr.net/npm/stats.js@latest/build/stats.min.js" Source URL of the stats.js script. Alternative CDNs: https://unpkg.com/stats.js@latest/build/stats.min.js, https://registry.npmmirror.com/stats.js/latest/files/build/stats.min.js
left Union[int, float] 0 The left pixel position of the monitor panel.
top Union[int, float] 0 The top pixel position of the monitor panel.
opacity Union[int, float] 0.9 The opacity of the monitor panel (0-1).
zIndex int 10000 The z-index of the monitor panel.

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

dash_performance_monitor_plugin-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file dash_performance_monitor_plugin-0.1.0.tar.gz.

File metadata

File hashes

Hashes for dash_performance_monitor_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6722ad85380f0cf57b12b70c8efeb26a213ae322586a371a0de6e6d0ba673cc8
MD5 2fb0402ba54ca9e4df614ea671bc16d4
BLAKE2b-256 64b1a59af9e43680dd7494566daac9ff620dd7572ba6351c28c21361f4db028a

See more details on using hashes here.

File details

Details for the file dash_performance_monitor_plugin-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dash_performance_monitor_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3fab9e873e5d96d3c3f170be405505eadfde50188238cb4abc26baa03a1760a0
MD5 a0e1450e4575aba71ec2d2d991aa63c4
BLAKE2b-256 5316a0aabf3ecc36be94c78697ba66e776736d7d2a48f8c63bed351dac3824ed

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