Skip to main content




Mocha logo: Mocha is the Python Performance Profiler for Production

Python Performance Profiling for Production
~ It's About Time ~

Mocha is a performance profiler that can monitor the performance of your production Python, and makes results easy to aggregate and search through.

Mocha is designed for Purposeful Profiling. This means that you only use Mocha around code of interest, instead of dumping all code performance logs and mining it later.

Useful for Profiling:

  • 🌎 API performance
  • 🚀 CI/CD stage / granular performance
  • 💡 ML training & inference jobs
  • 📀 Database queries
  • 📊 Data pipelines / compute jobs

What gets measured gets managed!


Mocha logo: Mocha is the Python Performance Profiler for Production

Dashboard

Bad performance has real world consequences, and is often a result of lack of visibility, even if you are logging it, if it's not be easy to get to, it will be ignored.


Installation

pip install mocha-time
docker run -p 9000:9000 -v mocha.db:mocha.db mocha-dev/mocha

Demo

import mocha

mocha.init(url="http://localhost:9000")

mocha.demo()

Usage

# Start / Stop
p = mocha.start("Foobar")

pass

p.stop()

# Profiler
with mocha.Profiler("Foobar"):
    pass

# Function Decorator
@mocha.profiler("Foobar")
def ml_training():
    pass

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.8.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file mocha-time-0.0.8.tar.gz.

File metadata

  • Download URL: mocha-time-0.0.8.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mocha-time-0.0.8.tar.gz
Algorithm Hash digest
SHA256 debd3cbd34cf8675a087d7d549c4e821904f9aa338062cfc44b65a895c70ab35
MD5 9cd56524570373187b7042f0e0e4fd1a
BLAKE2b-256 4e4039768ae357411aa3b148c7140dbee78916cca41e869f5c2c0a9ebf149d23

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.10

1 file

0.0.9

1 file

This release

0.0.8 This release

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page