Runtime profiler for Streamlit, powered by pyinstrument.
Alpha version, use with care.
⏱️ Live demo ⏱️
pip install streamlit-profiler
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
Profiler class is an extension of
pyinstrument.Profiler, so you can use
all of its functions.