X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/9f7f766a0e3ba735653da76c5564d3d182c12a6c..523d0aed00c01f834607f78356801b38936d2be1:/gw-tests/genhtml/genhtml.py diff --git a/gw-tests/genhtml/genhtml.py b/gw-tests/genhtml/genhtml.py index 8a94dc8..a6cab8f 100755 --- a/gw-tests/genhtml/genhtml.py +++ b/gw-tests/genhtml/genhtml.py @@ -117,6 +117,10 @@ class DimensionTest(Dimension): def htmlTableHeading(self, v): return v+"
source"%(urllib.quote(v)) +class DimensionLoad(Dimension): + def __init__(self): + Dimension.__init__(self, 'load', 'Load') + class DimensionTraffic(Dimension): def __init__(self): Dimension.__init__(self, 'traf', 'Traffic') @@ -163,21 +167,23 @@ class Test(object):

%s

""" % (title, cdup, title) params = ["%s %s" % (v.dim, v) for v in self.values] print >>html, "Results for:", ", ".join(params) - print >>html, "

Other results

" + print >>html, "

Other results

" for d in self.tests.space: links = [] for v in d: if v in self.values: - print "XXX", repr(v) links.append(str(v)) else: vv = DimValues(self.values) vv.replace(v) - href = cdup + urllib.quote(self.tests[vv.key()].path+"/results.html") - links.append("%s"%(href, str(v))) - print >>html, "%s: " % d, " | ".join(links), "
" + try: + href = cdup + urllib.quote(self.tests[vv.key()].path+"/results.html") + links.append("%s"%(href, str(v))) + except KeyError: + pass + print >>html, "" - print >>html, "" + print >>html, "
%s" % d, " | ".join(links), "
" print >>html, "
" % (self.name+".png") print >>html, "Raw data
" print >>html, "Script source
" % (cdup+self.name+".sh.html") @@ -273,6 +279,7 @@ table { border-collapse: collapse; } th, td { border: 1px solid lightgray; padding: 4px;} h4 { margin: 0; } .box { border: 1px solid black; padding: 1ex; margin: 1ex 0} +.otherview { margin: 1ex 0} """ css.close() for test in self.values(): @@ -304,14 +311,16 @@ class Page(object):

%s

""" % (title, title) params = ["%s %s" % (v.dim, v) for v in self.valsOther] print >>html, "

Results for ", ", ".join(params), "

" - print >>html, "

Other views

" + print >>html, "

Other views

" + print >>html, "" for d in self.dimOther: - print >>html, "%s: " % d - print >>html, "X axis, " % \ + print >>html, "" % d + print >>html, "" % \ Page((d, self.dimx), self.valsOther - d + self.dimy.getValue(0), self.tests).getName() links = [] + print >>html, "" + print >>html, "
%s " % \ Page((self.dimy, d), self.valsOther - d + self.dimx.getValue(0), self.tests).getName() - print >>html, "Y axis;  " % \ + print >>html, "" for v in d: if v in self.valsOther: links.append(str(v)) @@ -320,12 +329,8 @@ class Page(object): vv.replace(v) links.append("%s"%(urllib.quote(Page((self.dimy, self.dimx), vv, self.tests).getName()), str(v))) print >>html, " | ".join(links) - print >>html, "
" - try: - print >>html, d.htmlPreamble() - except Exception: - pass - print >>html, "" + print >>html, "
" print >>html, "" % (self.dimx.name, self.dimy.name) for x in self.dimx: @@ -355,6 +360,6 @@ class Page(object): if __name__ == "__main__": os.chdir(sys.argv[1]) os.system("rm *.html") - tests = Tests("./", Space(DimensionHostKern(), DimensionKern(), DimensionTraffic(), DimensionTest())) + tests = Tests("./", Space(DimensionHostKern(), DimensionKern(), DimensionTraffic(), DimensionLoad(), DimensionTest())) tests.generateHtml() sys.exit(0)
%s →
%s ↓