From be670953bb99e8ac19e00e552396c452b1030543 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:41:25 +0100 Subject: [PATCH] chore: dumps --- src/Orchestration/Adapter/DockerAPI.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Orchestration/Adapter/DockerAPI.php b/src/Orchestration/Adapter/DockerAPI.php index 4f2348c..0ba84b4 100644 --- a/src/Orchestration/Adapter/DockerAPI.php +++ b/src/Orchestration/Adapter/DockerAPI.php @@ -268,13 +268,19 @@ public function getStats(?string $container = null, array $filters = []): array // List ahead of time, since API does not allow listing all usage stats $containerIds = []; + var_dump($container, $filters); + if ($container === null) { $containers = $this->list($filters); + + var_dump($containers); $containerIds = \array_map(fn ($c) => $c->getId(), $containers); } else { $containerIds[] = $container; } + var_dump($containerIds); + $list = []; foreach ($containerIds as $containerId) { @@ -286,8 +292,6 @@ public function getStats(?string $container = null, array $filters = []): array $stats = \json_decode($result['response'], true); - \var_dump($stats); - // Calculate CPU usage $cpuDelta = $stats['cpu_stats']['cpu_usage']['total_usage'] - $stats['precpu_stats']['cpu_usage']['total_usage']; $systemCpuDelta = $stats['cpu_stats']['system_cpu_usage'] - $stats['precpu_stats']['system_cpu_usage'];