{"id":20036320,"url":"https://github.com/lorien/procstat","last_synced_at":"2025-07-18T19:33:04.394Z","repository":{"id":57454948,"uuid":"398062876","full_name":"lorien/procstat","owner":"lorien","description":"A tool to count runtime metrics","archived":false,"fork":false,"pushed_at":"2023-08-11T07:24:29.000Z","size":64,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-05T05:35:32.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-19T20:10:30.000Z","updated_at":"2023-11-08T22:12:47.000Z","dependencies_parsed_at":"2024-11-13T10:11:59.923Z","dependency_job_id":"3968edb1-56b0-4c86-98d6-53e57eaa1e0f","html_url":"https://github.com/lorien/procstat","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"bf13113818158d39ca6e42a23a75282f7c446fe2"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/lorien/procstat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fprocstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fprocstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fprocstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fprocstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorien","download_url":"https://codeload.github.com/lorien/procstat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorien%2Fprocstat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265820103,"owners_count":23833561,"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-11-13T10:11:55.559Z","updated_at":"2025-07-18T19:33:04.375Z","avatar_url":"https://github.com/lorien.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Procstat Documentation\n\n[![Tests Status](https://github.com/lorien/procstat/actions/workflows/test.yml/badge.svg)](https://github.com/lorien/procstat/actions/workflows/test.yml)\n[![Code Quality Status](https://github.com/lorien/procstat/actions/workflows/check.yml/badge.svg)](https://github.com/lorien/procstat/actions/workflows/test.yml)\n[![Types Check Status](https://github.com/lorien/procstat/actions/workflows/mypy.yml/badge.svg)](https://github.com/lorien/procstat/actions/workflows/mypy.yml)\n[![Test Coverage Status](https://coveralls.io/repos/github/lorien/procstat/badge.svg)](https://coveralls.io/github/lorien/procstat)\n[![Documentation Status](https://readthedocs.org/projects/procstat/badge/?version=latest)](http://user-agent.readthedocs.org)\n\nThis library helps to count runtime metrics. For specific events you increment manually the\ncorresponding counters. By default the library dumps all counters into stderr each 3 seconds.\nIt also can display the speed of metric is changing.\n\nIt also can dump metrics into influxdb, will be documented later, see source code for details.\n\n# Installation\n\n```shell\npip install -U procstat\n```\n\n# Usage\n\n```python\nimport time\nfrom procstat import Stat\n\nstat = Stat(speed_keys=['foo', 'bar'])\nwhile True:\n    stat.inc('foo') # default increment is 1\n    stat.inc('bar', 100)\n    stat.inc('baz', 500)\n    time.sleep(1)\n```\n\nThat code will produce output like:\n```\nDEBUG:procstat:EPS: bar: 0.0, foo: 0.0 | TOTAL:\nDEBUG:procstat:EPS: bar: 1.0, foo: 0.0+ | TOTAL: bar: 40, baz: 80, foo: 4\nDEBUG:procstat:EPS: bar: 2.0, foo: 0.0+ | TOTAL: bar: 70, baz: 140, foo: 7\nDEBUG:procstat:EPS: bar: 3.0, foo: 0.0+ | TOTAL: bar: 100, baz: 200, foo: 10\nDEBUG:procstat:EPS: bar: 4.0, foo: 0.0+ | TOTAL: bar: 130, baz: 260, foo: 13\nDEBUG:procstat:EPS: bar: 5.0, foo: 0.0+ | TOTAL: bar: 160, baz: 320, foo: 16\nDEBUG:procstat:EPS: bar: 6.0, foo: 0.0+ | TOTAL: bar: 190, baz: 380, foo: 19\nDEBUG:procstat:EPS: bar: 7.0, foo: 0.0+ | TOTAL: bar: 220, baz: 440, foo: 22\nDEBUG:procstat:EPS: bar: 8.0, foo: 0.0+ | TOTAL: bar: 250, baz: 500, foo: 25\nDEBUG:procstat:EPS: bar: 9.0, foo: 0.0+ | TOTAL: bar: 280, baz: 560, foo: 28\nDEBUG:procstat:EPS: bar: 10.0, foo: 1.0 | TOTAL: bar: 310, baz: 620, foo: 31\nDEBUG:procstat:EPS: bar: 10.0, foo: 1.0 | TOTAL: bar: 340, baz: 680, foo: 34\nDEBUG:procstat:EPS: bar: 10.0, foo: 1.0 | TOTAL: bar: 370, baz: 740, foo: 37\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florien%2Fprocstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florien%2Fprocstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florien%2Fprocstat/lists"}