{"id":16025163,"url":"https://github.com/justintimperio/dockerstats","last_synced_at":"2025-10-24T04:56:16.731Z","repository":{"id":56855452,"uuid":"525971191","full_name":"JustinTimperio/dockerstats","owner":"JustinTimperio","description":"Collect Docker Performance Stats in Go","archived":false,"fork":false,"pushed_at":"2022-08-17T22:27:02.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T08:43:44.220Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JustinTimperio.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}},"created_at":"2022-08-17T22:20:22.000Z","updated_at":"2022-08-17T22:24:30.000Z","dependencies_parsed_at":"2022-09-22T14:24:31.531Z","dependency_job_id":null,"html_url":"https://github.com/JustinTimperio/dockerstats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JustinTimperio/dockerstats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fdockerstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fdockerstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fdockerstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fdockerstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JustinTimperio","download_url":"https://codeload.github.com/JustinTimperio/dockerstats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fdockerstats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280742561,"owners_count":26382923,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08T19:41:37.030Z","updated_at":"2025-10-24T04:56:16.709Z","avatar_url":"https://github.com/JustinTimperio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker-Stats-Go \n\n\nPackage docker-stats-go provides the ability to get currently running Docker\ncontainer statistics, including memory and CPU usage.\n\nTo get the statistics of running Docker containers, you can use the `Current()`\nfunction:\n\n    stats, err := dsg.Current()\n    if err != nil {\n    \tpanic(err)\n    }\n\n    for _, s := range stats {\n    \tfmt.Println(s.Container) // 9f2656020722\n    \tfmt.Println(s.Memory) // {Raw=221.7 MiB / 7.787 GiB, Percent=2.78%}\n    \tfmt.Println(s.CPU) // 99.79%\n    }\n\nAlternatively, you can use the `NewMonitor()` function to receive a constant\nstream of Docker container stats, available on the Monitor's `Stream` channel:\n\n    m := dsg.NewMonitor()\n\n    for res := range m.Stream {\n    \tif res.Error != nil {\n    \t\tpanic(err)\n    \t}\n\n    \tfor _, s := range res.Stats {\n    \t\tfmt.Println(s.Container) // 9f2656020722\n    \t}\n    }\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustintimperio%2Fdockerstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustintimperio%2Fdockerstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustintimperio%2Fdockerstats/lists"}