{"id":16930481,"url":"https://github.com/schmichael/mmstats","last_synced_at":"2025-03-17T07:32:10.673Z","repository":{"id":57442466,"uuid":"2236069","full_name":"schmichael/mmstats","owner":"schmichael","description":"Memory Mapped Stats Tools","archived":false,"fork":false,"pushed_at":"2013-11-20T18:19:24.000Z","size":583,"stargazers_count":99,"open_issues_count":13,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-14T20:43:18.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schmichael.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-19T20:08:18.000Z","updated_at":"2021-12-17T14:17:46.000Z","dependencies_parsed_at":"2022-09-26T17:21:11.672Z","dependency_job_id":null,"html_url":"https://github.com/schmichael/mmstats","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fmmstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fmmstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fmmstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fmmstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schmichael","download_url":"https://codeload.github.com/schmichael/mmstats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221674181,"owners_count":16861786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T20:41:48.618Z","updated_at":"2024-10-27T12:15:35.982Z","avatar_url":"https://github.com/schmichael.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"`Documentation \u003chttp://mmstats.readthedocs.org/\u003e`_ |\n`Package \u003chttp://pypi.python.org/pypi/mmstats\u003e`_ |\n`Code \u003chttp://github.com/schmichael/mmstats/\u003e`_\n\n.. image:: https://secure.travis-ci.org/schmichael/mmstats.png?branch=master\n   :target: http://travis-ci.org/schmichael/mmstats/\n\n\n**Not under active development**\n\n\nAbout\n=====\n\nMmstats is a way to expose and read diagnostic values and metrics for\napplications.\n\nThink of mmstats as /proc for your application and the readers as procps\nutilities.\n\nThis project is a Python implementation, but compatible implementations can be\nmade in any language (see Goals).\n\nDiscuss at https://groups.google.com/group/python-introspection\n\nGoals\n-----\n\n* Separate publishing/writing from consuming/reading tools\n* Platform/language independent (a Java writer can be read by a Python tool)\n* Predictable performance impact for writers via:\n\n  * No locks (1 writer per thread)\n  * No syscalls (after instantiation)\n  * All in userspace\n  * Reading has no impact on writers\n\n* Optional persistent (writer can sync anytime)\n* 1-way (Publish/consume only; mmstats are not management extensions)\n\nUsage\n=====\n\nRequirements\n------------\n\nCPython 2.6 or 2.7 (Windows is untested)\n\nPyPy (only tested in 1.7, should be faster in 1.8)\n\nUsing\n-----\n\n1. ``easy_install mmstats`` or ``pip install mmstats`` or if you've downloaded\n   the source: ``python setup.py install``\n2. Then in your Python project create a sublcass of mmstats.MmStats like\n\n.. code-block:: python\n\n    import mmstats\n\n    class WebStats(mmstats.MmStats):\n        status2xx = mmstats.CounterField(label='status.2XX')\n        status3xx = mmstats.CounterField(label='status.3XX')\n        status4xx = mmstats.CounterField(label='status.4XX')\n        status5xx = mmstats.CounterField(label='status.5XX')\n        last_hit = mmstats.DoubleField(label='timers.last_hit')\n\n3. Instantiate it once per process: (instances are automatically thread local)\n\n.. code-block:: python\n\n    webstats = WebStats(label_prefix='web.stats.')\n\n4. Record some data:\n\n.. code-block:: python\n\n    if response.status_code == 200:\n        webstats.status2xx.inc()\n\n    webstats.last_hit = time.time()\n\n5. Run ``slurpstats`` to read it\n6. Run ``mmash`` to create a web interface for stats\n7. Run ``pollstats -p web.stats.status 2XX,3XX,4XX,5XX /tmp/mmstats-*`` for a\n   vmstat/dstat like view.\n8. Did a process die unexpectedly and leave around a stale mmstat file?\n   ``cleanstats /path/to/mmstat/files`` will check to see which files are stale\n   and remove them.\n\n\n.. include:: CHANGES.rst\n   :end-before: 0.5.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmichael%2Fmmstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschmichael%2Fmmstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmichael%2Fmmstats/lists"}