Runtime profiler for Streamlit, powered by pyinstrument
Project description
streamlit-profiler 🏄🏼
Runtime profiler for Streamlit, powered by pyinstrument.
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 streamlit-profiler
Usage
import streamlit as st
from 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
Built Distribution
Close
Hashes for streamlit_profiler-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4260bdf8acc242b3da77a02205b6db7ef66c8d6c5b45359999b38b37bc00dcf1 |
|
MD5 | b9cdf030e1111159355b9b40d9decd03 |
|
BLAKE2b-256 | cc31f5b9832cd7ad9d5ca382ced64c316f5c1b52aa43ce1878e72399200c93c8 |