summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McDermott <andrew.mcdermott@linaro.org>2014-06-06 15:34:38 +0100
committerAndrew McDermott <andrew.mcdermott@linaro.org>2014-06-06 15:34:38 +0100
commit179bc105f85ab0d1ec50579bb928083e5ef0235d (patch)
tree239e69edbe78d7324b6399983597bd118a8ff2a5
parent9d8338bfa429343997576134fc7663712dccacfd (diff)
print-historic-results: format ratios to 2 decimal places
Also order by JVM type. Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
-rwxr-xr-xprint-historic-results.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/print-historic-results.py b/print-historic-results.py
index bc275e8..de7b154 100755
--- a/print-historic-results.py
+++ b/print-historic-results.py
@@ -61,11 +61,11 @@ table <= TR(TH('Date') + TH('JVM Variant') + TH('Relative performance'))
conn = sqlite3.connect(sys.argv[1])
cursor = conn.cursor()
-for row in cursor.execute("select date(datetime(timestamp, 'unixepoch', 'localtime')) as 'Date', jvm_type, elapsed_time from results order by date DESC"):
+for row in cursor.execute("select date(datetime(timestamp, 'unixepoch', 'localtime')) as 'Date', jvm_type, elapsed_time from results order by date DESC, jvm_type"):
html_row = TR()
html_row <= TD(row[0])
html_row <= TD(row[1])
- html_row <= TD(round(float(zero_baseline) / row[2], 2), align="right")
+ html_row <= TD("{:.2f}".format(float(zero_baseline) / row[2]), align="right")
table <= html_row
body <= H2("Historic Results")