{"id":27334834,"url":"https://github.com/dmuth/golang-stats","last_synced_at":"2025-04-12T14:46:27.606Z","repository":{"id":138470516,"uuid":"14100020","full_name":"dmuth/golang-stats","owner":"dmuth","description":"Stats package for Golang","archived":false,"fork":false,"pushed_at":"2020-09-03T22:21:43.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-20T11:57:53.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/dmuth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2013-11-04T03:48:50.000Z","updated_at":"2015-05-13T23:20:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"66836e49-87d3-40c0-b056-219972f7ec06","html_url":"https://github.com/dmuth/golang-stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fgolang-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fgolang-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fgolang-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fgolang-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmuth","download_url":"https://codeload.github.com/dmuth/golang-stats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248585226,"owners_count":21128966,"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":"2025-04-12T14:46:26.918Z","updated_at":"2025-04-12T14:46:27.599Z","avatar_url":"https://github.com/dmuth.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Golang Stats\n\nThis is a little package I wrote so that I could keep track of statistics and metrics in \nGoogle Go programs I developed.\n\n\n### Installation\n\n- Make sure your golib is set up properly:\n   `export GOLIB=$HOME/golib`\n- Now install the package\n   `go get -v github.com/dmuth/glang-stats`\n\n\n### Usage\n\n    import stats \"github.com/dmuth/golang-stats\"\n\n    //\n    // Manipulate stats\n    // The values will be initialized to zero if they do not already exist.\n    //\n    stats.IncrStat(\"key\")\n    stats.DercStat(\"key\")\n    stats.AddStat(\"key2\", 3)\n    stats.SubStat(\"key3\", 4)\n\n    //\n    // Retrieve a stat\n    //\n    value := stats.Stat(\"key\")\n    \n    //\n    // Retrieve all stats as a map[string]int array\n    //\n    values := stats.StatAll()\n    \n    //\n    // Write all stats to standard output once every 500 ms\n    //\n    stats.StatDump(.5)\n    \n    stats.StatDumpFunc(1, func(data map[string]int) {\n      // Do something with our stats data once every second\n    })\n\n\n### Running the tests\n\n    go test -v github.com/dmuth/golang-stats\n    \n\n### Contact\n\nQuestions?  Complaints?  Want to buy me drinks?\n\nHere's my contact info: http://www.dmuth.org/contact\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmuth%2Fgolang-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmuth%2Fgolang-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmuth%2Fgolang-stats/lists"}