Commit graph

4 commits

Author SHA1 Message Date
Guillaume Lours
e5b5432781 feat(stats): add --all-projects and --aggregate flags
`docker compose stats` only reports on a single project. Add two
opt-in flags, the default behavior being unchanged:

  --all-projects  one line per container for every project, with a
                  PROJECT column
  --aggregate     one line per project, summing the resource usage of
                  its containers; alone, it reports on the current
                  project

Both support the `table` and `json` formats, the latter printing one
object per line like `docker stats`. Unless `--no-stream` is set, they
refresh 2s after each sample. They cannot be combined with a SERVICE,
and `--all-projects` cannot be combined with `--project-name`.

docker/cli does not export its stats collection, so containers are
sampled through the Engine API and the figures computed the same way
`docker stats` does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
2026-10-15 06:41:29 +02:00
Max Proske
40cd08f318 Update link in stats --help output
Signed-off-by: Max Proske <max@mproske.com>
2025-02-04 18:12:17 +01:00
Guillaume Lours
231ea10058 update docs generation to avoid man pages generation
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-07-17 13:01:51 +02:00
Nicolas De Loof
e105f16527 introduce stats command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-12-22 16:03:02 +01:00