From 17dc86369f018caaee0b81740619bb1ca5a5f891 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 19 Apr 2020 21:53:59 +1000 Subject: [PATCH] tools/metrics.py: Use OrderedDict when reading build log. So that the output (eg of the diff command) always has the lines in the same order. --- tools/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/metrics.py b/tools/metrics.py index e603c43de6..25acb30f51 100755 --- a/tools/metrics.py +++ b/tools/metrics.py @@ -43,7 +43,7 @@ Other commands: """ -import sys, re, subprocess +import collections, sys, re, subprocess MAKE_FLAGS = ["-j3", "CFLAGS_EXTRA=-DNDEBUG"] @@ -98,7 +98,7 @@ def parse_port_list(args): def read_build_log(filename): - data = dict() + data = collections.OrderedDict() lines = [] found_sizes = False with open(filename) as f: