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 details)
File details
Details for the file mocha-time-0.0.7.tar.gz.
File metadata
- Download URL: mocha-time-0.0.7.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c4bb5bbc93753198c817f87f4b18ea613a4307fc54f21a6724c98ca686b7ced
|
|
| MD5 |
a3db7ac3eceeef231e0a407b44798d20
|
|
| BLAKE2b-256 |
f50357d794a218cfd12b6d9b9564d0e69896d179a520edf1846976a63d4eb620
|