Skip to content

๐Ÿ„๐Ÿผ Runtime profiler for Streamlit, powered by pyinstrument

License

Notifications You must be signed in to change notification settings

jrieke/streamlit-profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

48 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

streamlit-profiler ย ๐Ÿ„๐Ÿผ

PyPi

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.

About

๐Ÿ„๐Ÿผ Runtime profiler for Streamlit, powered by pyinstrument

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages