From b2452d1491226d13e6bc0357290e08e4f1ebc287 Mon Sep 17 00:00:00 2001 From: sharbov Date: Wed, 23 Oct 2019 10:17:10 +0300 Subject: [PATCH] Fix stats corner case --- docker_test_tools/stats.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker_test_tools/stats.py b/docker_test_tools/stats.py index f8d92c4..ec8e524 100644 --- a/docker_test_tools/stats.py +++ b/docker_test_tools/stats.py @@ -146,6 +146,10 @@ def parse_line(self, line): # Split the stat data to it's raw components components = json.loads(line) + if components['name'] == '--': + # skip metrics with no service name + return + # Handle bad stats metrics for key, val in components.items(): if '--' in val: