MCPcopy
hub / github.com/datalab-to/surya / _show_timing

Function _show_timing

surya/scripts/streamlit_app.py:98–101  ·  view source on GitHub ↗

Render a small caption with wall-clock + optional extra detail.

(label: str, elapsed_s: float, extra: str = "")

Source from the content-addressed store, hash-verified

96
97
98def _show_timing(label: str, elapsed_s: float, extra: str = "") -> None:
99 """Render a small caption with wall-clock + optional extra detail."""
100 detail = f" — {extra}" if extra else ""
101 st.caption(f"⏱ {label}: {elapsed_s * 1000:.0f} ms ({elapsed_s:.2f}s){detail}")
102
103
104@st.cache_resource()

Callers 1

streamlit_app.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected