From f14522292b4952456dbcf7aeaa2d33b78dc3c953 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 8 Mar 2024 10:52:59 +0100 Subject: Add CSV support; right now hard-coded for kaggle acher linux-kernel-size --- bin/analyze-log.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/analyze-log.py b/bin/analyze-log.py index d6ae27a..1deb438 100755 --- a/bin/analyze-log.py +++ b/bin/analyze-log.py @@ -21,15 +21,18 @@ import time def parse_logfile(filename): - lf = dfatool.utils.Logfile() + if ".csv" in filename: + loader = dfatool.utils.CSVfile() + else: + loader = dfatool.utils.Logfile() if filename.endswith("xz"): import lzma with lzma.open(filename, "rt") as f: - return lf.load(f) + return loader.load(f) with open(filename, "r") as f: - return lf.load(f) + return loader.load(f) def main(): -- cgit v1.2.3