aboutsummaryrefslogtreecommitdiff
path: root/postprocessing.py
diff options
context:
space:
mode:
Diffstat (limited to 'postprocessing.py')
-rwxr-xr-xpostprocessing.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/postprocessing.py b/postprocessing.py
index 3930ed8..713e0b3 100755
--- a/postprocessing.py
+++ b/postprocessing.py
@@ -27,6 +27,8 @@ from numpy import array, mean
from optparse import OptionParser
SQLITE_DB_GLOBAL_PATH = "/root/db_results/"
+VALUE = 'value'
+UNIT = 'unit'
modes_prepares_statement = "select distinct(id) from workload_specs;"
metric_prepared_statement = """
@@ -57,13 +59,14 @@ if __name__ == '__main__':
for metric_row in metric_cursor.execute(
metric_prepared_statement,
(mode_row[0], )):
- if metric_row[2] in metrics[mode_row[0]]:
- metrics[mode_row[0]][metric_row[2]][VALUE].append(
- float(metric_row[3]))
+ print metric_row
+ if metric_row[1] in metrics[mode_row[0]]:
+ metrics[mode_row[0]][metric_row[1]][VALUE].append(
+ float(metric_row[2]))
else:
- metrics[mode_row[0]][metric_row[2]] = {
- VALUE: [float(metric_row[3])],
- UNIT: metric_row[4]}
+ metrics[mode_row[0]][metric_row[1]] = {
+ VALUE: [float(metric_row[2])],
+ UNIT: metric_row[3]}
metric_cursor.close()
modes_cursor.close()
conn.close()