From 5dde773e0b5f11cf6a29fc823dd9c9e080842550 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 13 Jan 2020 22:16:04 +0100 Subject: [PATCH] tool/metrics: handle metric without deviations --- tool/metrics/metrics-ccsm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tool/metrics/metrics-ccsm.py b/tool/metrics/metrics-ccsm.py index 83bd3ecb9..b1c6a82ae 100755 --- a/tool/metrics/metrics-ccsm.py +++ b/tool/metrics/metrics-ccsm.py @@ -70,6 +70,10 @@ def analyze_folders(btstack_root, folders): # "Nesting Level","VOCF","Number of functions which call this function", fields = [ 'file','function','GOTO','RETURN','_','STMT' ,'_','CCN','PATH','CALLS','PARAM','LEVEL','_','_','_'] + # init deviations + for key in fields: + metrics[key + '_DEVIATIONS'] = 0 + # for now, just read the file with open("metrics.tsv") as fd: rd = csv.reader(fd, delimiter="\t")