Lightning-AI/litperf
Python
Captured source
source ↗published Jul 26, 2025seen 5dcaptured 13hhttp 200method plain
Lightning-AI/litperf
Description: Lightweight performance tracker for Python code - zero overhead when disabled.
Language: Python
License: Apache-2.0
Stars: 5
Forks: 2
Open issues: 0
Created: 2025-07-26T12:47:10Z
Pushed: 2025-07-26T13:11:02Z
Default branch: main
Fork: no
Archived: no
README:
LitPerf
Lightweight performance tracker for Python code - zero overhead when disabled.
install
pip install git+https://github.com/Lightning-AI/litperf.git
Example use
from litperf import PerfTimer
timer = PerfTimer()
# Step 1
numbers = [i * i for i in range(50000)]
timer.mark("step1: count")
# Step 2
total = 0
for num in numbers:
total += num / 2
timer.mark("step2: sum_numbers")
timer.print_report()The above generates the following report:
============================== Timing Report: start → step1: count: 0.0031 seconds step1: count → step2: sum_numbers: 0.0036 seconds ------------------------------ Total time: 0.0067 seconds ------------------------------
Notability
notability 2.0/10Low stars, routine new repo