summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-03-08 10:52:59 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-03-08 10:52:59 +0100
commitf14522292b4952456dbcf7aeaa2d33b78dc3c953 (patch)
treef2fd606fe1ca98b709544ebba0e81c53ef75fe73 /bin
parentb09b01fe74eeb446fb14f4449f927cf6130cf1db (diff)
Add CSV support; right now hard-coded for kaggle acher linux-kernel-size
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-log.py9
1 files changed, 6 insertions, 3 deletions
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():