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 ⏱️


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

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


View Github