Lava: Omitting runs with missing metadata file
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 25 Jan 2017 00:14:12 +0000 (19:14 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 25 Jan 2017 19:42:42 +0000 (14:42 -0500)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
scripts/lttng-baremetal-tests/generate-plots.py

index 30005cc8b56507585ddc8edcbfaa91f69a5ebf07..03a4e18df7eaad1eb2539b423ee3b5ef1b0a0efd 100644 (file)
@@ -123,7 +123,11 @@ def create_metadata_file(res_dir):
     for dirname, dirnames, res_files in os.walk('./'+res_dir):
         if len(dirnames) > 0:
             continue
-        metadata = pd.read_csv(os.path.join(dirname, 'metadata.csv'))
+        try:
+            metadata = pd.read_csv(os.path.join(dirname, 'metadata.csv'))
+        except Exception:
+            print('Omitting run {} because metadata.csv is missing'.format(dirname))
+            continue
         list_.append(metadata)
 
     df = pd.concat(list_)
@@ -140,7 +144,11 @@ def create_plots(res_dir):
     for dirname, dirnames, res_files in os.walk('./'+res_dir):
         if len(dirnames) > 0:
             continue
-        metadata = pd.read_csv(os.path.join(dirname, 'metadata.csv'))
+        try:
+            metadata = pd.read_csv(os.path.join(dirname, 'metadata.csv'))
+        except Exception:
+            print('Omitting run {} because metadata.csv is missing'.format(dirname))
+            continue
 
         for res in res_files:
             if res in 'metadata.csv':
This page took 0.024069 seconds and 4 git commands to generate.