blob: 66fd1aeae059967ad0549e679ea748d2a1b58457 [file] [log] [blame]
Christophe Favergeon5cacf9d2019-08-14 10:41:17 +02001.headers ON
2/*
3
4Select the core to be used as reference. Only last day of measurements is used.
5
6*/
7CREATE TEMP VIEW if not exists refCore AS select *
8 from Unary
9 where coreid=5 AND DATE BETWEEN datetime('now','localtime','-23 hours') AND datetime('now', 'localtime');
10 ;
11
12/*
13
14Select the cores to be benchmarked compared with the reference. Only last day of measurements is used.
15
16*/
17CREATE TEMP VIEW if not exists otherCores AS select *
18 from Unary
19 where coreid != 5 AND DATE BETWEEN datetime('now','localtime','-23 hours') AND datetime('now', 'localtime');
20 ;
21
22/*
23
24Using regression database, compute the ratio using max cycles
25and max degree regression coefficient.
26
27Change name of columns for result
28
29*/
30select temp.otherCores.ID as ID,
31 CATEGORY.category as CATEGORY,
32 temp.otherCores.NAME as NAME,
33 PLATFORM.platform as PLATFORM,
34 CORE.core as CORE,
35 COMPILERKIND.compiler as COMPILER,
36 COMPILER.version as COMPILERVERSION,
37 TYPE.type as TYPE,
38 temp.otherCores.DATE as DATE,
39 (1.0*temp.refCore.MAX / temp.otherCores.MAX) as MAXRATIO,
40 (1.0*temp.refCore.MAXREGCOEF / temp.otherCores.MAXREGCOEF) as REGRESSIONRATIO
41 from temp.otherCores
42 INNER JOIN temp.refCore USING(ID,categoryid,NAME)
43 INNER JOIN CATEGORY USING(categoryid)
44 INNER JOIN PLATFORM USING(platformid)
45 INNER JOIN CORE USING(coreid)
46 INNER JOIN COMPILER USING(compilerid)
47 INNER JOIN COMPILERKIND USING(compilerkindid)
48 INNER JOIN TYPE USING(typeid)