Skip to main content

A plugin to render extra performance monitor in browser for Dash applications using Dash Hooks.

Project description

dash-performance-monitor-plugin

GitHub PyPI Ruff

English | 简体中文

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.1.tar.gz (3.8 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.1.tar.gz.

File metadata

File hashes

Hashes for dash_performance_monitor_plugin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f729e2dace30c6849e9e75a9e135eb3026a0a1b574ff08edaba2ae261826c1d2
MD5 d10a6dd42d35c0e2bc4639af177aeaa8
BLAKE2b-256 f9b716b21b3571a4235308bd458eda97f1b096a3f57179e3b2d7b10298509a75

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dash_performance_monitor_plugin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82450de8d545e5c4afafd61aa21222e4d03cd3f205c24fe937e85760393fb7ec
MD5 d428549fadf4dc545d49aa2837999f24
BLAKE2b-256 42f5a28a45f7dfd15f5fe840f742a3b1155ef443a86a7da4a4d4a194a128b832

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