From 8dde12e3f28aedfa94053ca2db93c2a0b4d90ed3 Mon Sep 17 00:00:00 2001 From: e1ts Date: Thu, 20 Jul 2023 12:53:33 +0200 Subject: [PATCH] Changed total_files_scanned from underscore to camelcase --- linux/diagnostic/high_cpu_parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux/diagnostic/high_cpu_parser.py b/linux/diagnostic/high_cpu_parser.py index 7a8a039..82312de 100755 --- a/linux/diagnostic/high_cpu_parser.py +++ b/linux/diagnostic/high_cpu_parser.py @@ -21,7 +21,7 @@ if "path" in v: path = v["path"] - cnt = int(v["total_files_scanned"]) + cnt = int(v["totalFilesScanned"]) if name not in groups: groups[name] = [cnt, path] else: @@ -32,7 +32,7 @@ print("%s\t%d" % (k, groups[k][0])) else: - lines = sorted(vals, key=lambda k: int(k['total_files_scanned']), reverse=True) + lines = sorted(vals, key=lambda k: int(k['totalFilesScanned']), reverse=True) for v in lines[:top]: - if int(v["total_files_scanned"]) != 0: - print("%s\t%s\t%s\t%s" % (v["id"], v["name"], v["total_files_scanned"], v["path"])) + if int(v["totalFilesScanned"]) != 0: + print("%s\t%s\t%s\t%s" % (v["id"], v["name"], v["totalFilesScanned"], v["path"]))