summary refs log tree commit diff stats
path: root/classification/tools/create_csv.py
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-03 18:24:16 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-03 18:24:16 +0200
commit5541099586dbd6018574cb44e1934907c121526f (patch)
treee816da36da1c9de3a702823b9ee450823b801c43 /classification/tools/create_csv.py
parentd0c85e36e4de67af628d54e9ab577cc3fad7796a (diff)
downloadqemu-analysis-5541099586dbd6018574cb44e1934907c121526f.tar.gz
qemu-analysis-5541099586dbd6018574cb44e1934907c121526f.zip
edit tool and add result analysis
Diffstat (limited to 'classification/tools/create_csv.py')
-rwxr-xr-xclassification/tools/create_csv.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/classification/tools/create_csv.py b/classification/tools/create_csv.py
index c57c45e6a..ea997ccff 100755
--- a/classification/tools/create_csv.py
+++ b/classification/tools/create_csv.py
@@ -1,7 +1,13 @@
 from os import listdir, path
+from argparse import ArgumentParser
 
 root_directory = "../../results/classifier/"
 
+parser = ArgumentParser()
+parser.add_argument('-d', '--directory')
+
+args = parser.parse_args()
+
 def parse_iteration(directory):
     dictionary = {}
 
@@ -19,6 +25,11 @@ def output_csv(dictionary, full_path):
             file.write(f"{key}, {value}\n")
 
 def main():
+    if args.directory:
+        dictionary = parse_iteration(args.directory)
+        output_csv(dictionary, args.directory)
+        exit()
+
     for entry in listdir(root_directory):
         full_path = path.join(root_directory, entry)
         if path.isdir(full_path):