Skip to content

Commit a404c6c

Browse files
committed
Only report performance regressions if codegen succeeds
1 parent 74f1cda commit a404c6c

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

all-reports.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
fields = ["exectime", "frontend", "backend", "simcode", "templates", "compile", "simulate", "verify"]
3535
entryhead = "<tr><th>Branch</th><th>Total</th><th>Frontend</th><th>Backend</th><th>SimCode</th><th>Templates</th><th>Compilation</th><th>Simulation</th><th>Verification</th>\n"
3636

37+
timeMinPhase = 4 # Need to have completed code generation to report performance regressions
3738
timeRel = 1.7 # Minimum 1.7x time is registered as a performance regression
3839
timeAbs = 10 # Ignore performance regressions for times <10s...
3940

@@ -124,14 +125,16 @@ def libraryLink(branch, libname):
124125
(SELECT model,libname,finalphase,frontend,backend,simcode,templates,compile,simulate FROM [%s] WHERE date IN (?,?) AND libname IN (%s) ORDER BY date)
125126
GROUP BY model,libname HAVING
126127
(MIN(finalphase) <> MAX(finalphase)) OR
127-
(MAX(frontend) > ?*MIN(frontend) AND MAX(frontend) > ?) OR
128-
(MAX(backend) > ?*MIN(backend) AND MAX(backend) > ?) OR
129-
(MAX(simcode) > ?*MIN(simcode) AND MAX(simcode) > ?) OR
130-
(MAX(templates) > ?*MIN(templates) AND MAX(templates) > ?) OR
131-
(MAX(compile) > ?*MIN(compile) AND MAX(compile) > ?) OR
132-
(MAX(simulate) > ?*MIN(simulate) AND MAX(simulate) > ?)
128+
((MIN(finalphase) >= ?) AND
129+
(MAX(frontend) > ?*MIN(frontend) AND MAX(frontend) > ?) OR
130+
(MAX(backend) > ?*MIN(backend) AND MAX(backend) > ?) OR
131+
(MAX(simcode) > ?*MIN(simcode) AND MAX(simcode) > ?) OR
132+
(MAX(templates) > ?*MIN(templates) AND MAX(templates) > ?) OR
133+
(MAX(compile) > ?*MIN(compile) AND MAX(compile) > ?) OR
134+
(MAX(simulate) > ?*MIN(simulate) AND MAX(simulate) > ?)
135+
)
133136
""" % (branch,",".join(["'%s'" % libname for libname in startdates[d1lib]]))
134-
cursor.execute(query, (d1lib,d2,timeRel,timeAbs,timeRel,timeAbs,timeRel,timeAbs,timeRel,timeAbs,timeRel,2*timeAbs,timeRel,timeAbs))
137+
cursor.execute(query, (d1lib,d2,timeMinPhase,timeRel,timeAbs,timeRel,timeAbs,timeRel,timeAbs,timeRel,timeAbs,timeRel,2*timeAbs,timeRel,timeAbs))
135138
regressions += cursor.fetchall()
136139
regressions = sorted(regressions, key = lambda x: (x[1],x[0]))
137140
libs = set()
@@ -153,7 +156,7 @@ def libraryLink(branch, libname):
153156
numRegression += 1
154157
if color is not None:
155158
msg = "%s &rarr; %s" % (shared.finalphaseName(phase1),shared.finalphaseName(phase2))
156-
else:
159+
elif min(phase1,phase2) >= timeMinPhase:
157160
msgs = []
158161
for (phase,times) in [(1,frontend),(2,backend),(3,simcode),(4,templates),(5,compile),(6,simulate)]:
159162
(t1,t2) = [float(d) for d in times.split(",")]

0 commit comments

Comments
 (0)