Skip to main content

(fork of) Runtime profiler for Streamlit, powered by pyinstrument

Project description

wfork-streamlit-profiler  🏄🏼

PyPi

Runtime profiler for Streamlit, powered by pyinstrument.

wfork-streamlit-profiler is a fork of streamlit-profiler 0.2.4. If there are any newer versions of the original streamlit-profiler, you should probably use those instead. See the original project's github for more: https://github.com/jrieke/streamlit-profiler

streamlit-profiler is a Streamlit component that helps you find out which parts of your app are slow. It profiles the code via pyinstrument and shows the results right within your Streamlit app.

Alpha version, use with care.


⏱️ Live demo ⏱️


Installation

pip install wfork-streamlit-profiler

Usage

import streamlit as st
from wfork_streamlit_profiler import Profiler

with Profiler():
    st.title("My app")
    # ... other code

# Or:
# p = Profiler()
# p.start()
# ...
# p.stop()

Then start your app as usual: streamlit run my_app.py

The Profiler class is an extension of pyinstrument.Profiler, so you can use all of its functions.

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

wfork_streamlit_profiler-0.2.8rc2.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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