summaryrefslogtreecommitdiffstats
path: root/scripts/getstats2.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/getstats2.py')
-rw-r--r--scripts/getstats2.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/scripts/getstats2.py b/scripts/getstats2.py
index 5c43430..2352e5a 100644
--- a/scripts/getstats2.py
+++ b/scripts/getstats2.py
@@ -72,20 +72,22 @@ class GetStats2:
# context 1 and 2 respectively.
def computeBMStatsList(self):
+ context1 = getContext(self.host1_id, self.platform1_id, self.branch1_id, self.sha1_id)
+ context2 = getContext(self.host2_id, self.platform2_id, self.branch2_id, self.sha2_id)
+
# Get all distinct benchmark/metric combinations matching both contexts
# into a 'benchmarks' list:
bmark_metrics = execQuery(
- "SELECT DISTINCT benchmarkId, metricId " +
- "FROM result WHERE hostId = " + str(self.host1_id) +
- " AND platformId = " + str(self.platform1_id) + " AND branchId = " +
- str(self.branch1_id) + " AND sha1Id = " + str(self.sha11_id) +
- " INTERSECT " +
- "SELECT DISTINCT benchmarkId, metricId " +
- "FROM result WHERE hostId = " + str(self.host2_id) +
- " AND platformId = " + str(self.platform2_id) + " AND branchId = " +
- str(self.branch2_id) + " AND sha1Id = " + str(self.sha12_id) +
- #" LIMIT 10;"
- ";"
+ "SELECT DISTINCT benchmarkId, metricId"
+ " FROM result"
+ " WHERE contextId = %d"
+ " INTERSECT "
+ "SELECT DISTINCT benchmarkId, metricId"
+ " FROM result"
+ " WHERE contextId = %d"
+ #" LIMIT 10"
+ ";"
+ % (context1, context2)
)
bmstats_list = []