Pyformance is a Python library for performance metrics, inspired by Coda Hale's Yammer metrics (now Dropwizard Metrics). It provides various metric types like Counters, Timers, Gauges, and Histograms, along with different reporters (e.g., Console, Graphite). The current version is 0.4, released in 2016. The project is no longer actively maintained.
pip install pyformanceVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a MetricRegistry, create and interact with common metric types (Counter, Timer, Gauge), and report their values using the ConsoleReporter.
For new projects, evaluate actively maintained libraries like `prometheus_client` or `opentelemetry` for robust metrics and monitoring solutions.
If encountering issues on newer Python versions, try running in a Python 3.4-3.7 environment or migrate to a different metrics library. Check your `python_requires` setting if packaging.
Define a custom class inheriting from `meters.Gauge` and override `get_value()`. Then, use `metrics.add_metric('metric.name', MyCustomGauge())` to register it.No dependency data recorded yet.