内存映射统计信息工具
Documentation _ |
Package _ |
Code _
.. image:: https://secure.travis-ci.org/schmichael/mmstats.png?branch=master :target: http://travis-ci.org/schmichael/mmstats/
Not under active development
Mmstats is a way to expose and read diagnostic values and metrics for applications.
Think of mmstats as /proc for your application and the readers as procps utilities.
This project is a Python implementation, but compatible implementations can be made in any language (see Goals).
Discuss at https://groups.google.com/group/python-introspection
Separate publishing/writing from consuming/reading tools
Platform/language independent (a Java writer can be read by a Python tool)
Predictable performance impact for writers via:
Optional persistent (writer can sync anytime)
1-way (Publish/consume only; mmstats are not management extensions)
CPython 2.6 or 2.7 (Windows is untested)
PyPy (only tested in 1.7, should be faster in 1.8)
easy_install mmstats or pip install mmstats or if you've downloaded
the source: python setup.py install.. code-block:: python
import mmstats
class WebStats(mmstats.MmStats):
status2xx = mmstats.CounterField(label='status.2XX')
status3xx = mmstats.CounterField(label='status.3XX')
status4xx = mmstats.CounterField(label='status.4XX')
status5xx = mmstats.CounterField(label='status.5XX')
last_hit = mmstats.DoubleField(label='timers.last_hit').. code-block:: python
webstats = WebStats(label_prefix='web.stats.').. code-block:: python
if response.status_code == 200:
webstats.status2xx.inc()
webstats.last_hit = time.time()slurpstats to read itmmash to create a web interface for statspollstats -p web.stats.status 2XX,3XX,4XX,5XX /tmp/mmstats-* for a
vmstat/dstat like view.cleanstats /path/to/mmstat/files will check to see which files are stale
and remove them... include:: CHANGES.rst :end-before: 0.5.0
暂无开放 Issues,或尚未同步最近议题。