Python Performance Profiling for Production
Project description
Python Performance Profiling for Production
~ It's About Time ~
Mocha is a Python performance profiler that can monitor your entire deployment in production, and makes results easy to aggregate and search through.
Bad code performance is often a result of lack of visibility, with real world consequences. Mocha can help you monitor performance over time.
What gets measured gets managed!
Useful for Profiling:
- 🌎 API performance
- 🚀 CI/CD granular performance
- 💡 ML training & inference
- 📀 Database queries
- 📊 Data pipelines / compute jobs
Installation
pip install mocha-time
Start / Stop
import mocha
mocha.init(url="localhost:9000")
p = mocha.start("ML Training")
import time
time.sleep(10)
p.stop()
Profiler
import mocha
mocha.init(url="localhost:9000")
with mocha.Profiler("ML Training"):
import time
time.sleep(10)
Decorator
import mocha
mocha.init(url="localhost:9000")
@mocha.profiler("ML Training")
def ml_training():
import time
time.sleep(10)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mocha-time-0.0.7.tar.gz
(2.5 kB
view hashes)