From: Michal Sojka Date: Sun, 12 Dec 2010 12:28:21 +0000 (+0100) Subject: Show statistics in result pages X-Git-Tag: fix-allnoconfig~217 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/423e36d347a8b2d68d8ae4f26499719d11d1476f Show statistics in result pages --- diff --git a/gw-tests/genhtml/genhtml.py b/gw-tests/genhtml/genhtml.py index cd4985b..6218004 100755 --- a/gw-tests/genhtml/genhtml.py +++ b/gw-tests/genhtml/genhtml.py @@ -155,6 +155,25 @@ class Test(object): return "
" % \ (pngName[:-4]+".pdf", pngName) + def htmlPrintStats(self, html): + cwd = os.getcwd() + os.chdir(self.path) + stats = glob.glob("*-stat.txt") + print >>html, "

Statistics

" + print >>html, "" + stats.sort() + for i in stats: + lines = open(i).readlines() + def stripComment(l): + comment = l.find("#") + if comment >= 0: + l = l[:comment-1] + return l + lines = [stripComment(l) for l in lines if l.find("cmdline=") != 0] + print >>html, "" % (i, "
".join(lines)) + print >>html, "

%s

%s
" + os.chdir(cwd) + def generateHtml(self): html = open(os.path.join(self.path, 'results.html'), "w") title = "CAN gateway timing analysis" @@ -188,20 +207,20 @@ class Test(object): print >>html, "" print >>html, self.fullImgLink("graph.png") - print >>html, "Raw data
" - print >>html, "Script source
" % (cdup+self.name+".sh.html") - print >>html, "Back to top
" % cdup - + self.htmlPrintStats(html) cwd = os.getcwd() os.chdir(self.path) additionalImgs = glob.glob("graph?*.png") - if additionalImgs: - print "XXX" - print >>html, "

Additional graphs

" + if additionalImgs: print >>html, "

Additional graphs

" for i in additionalImgs: print >>html, self.fullImgLink(i) os.chdir(cwd) + print >>html, "
" + print >>html, "Raw data
" + print >>html, "Script source
" % (cdup+self.name+".sh.html") + print >>html, "Back to top
" % cdup + html.close() class Space(list):