From: Michal Sojka Date: Fri, 3 Dec 2010 23:36:43 +0000 (+0100) Subject: Add new dimension (traffic) to html generator X-Git-Tag: fix-allnoconfig~260 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/25def517d039b5ff70413a7058f247a4d2c3a3e1 Add new dimension (traffic) to html generator --- diff --git a/gw-tests/genhtml/genhtml.py b/gw-tests/genhtml/genhtml.py index 08a6dac..4c16a95 100755 --- a/gw-tests/genhtml/genhtml.py +++ b/gw-tests/genhtml/genhtml.py @@ -56,6 +56,12 @@ class DimensionTest(Dimension): def htmlLabel(self, v): return v+"
source"%(urllib.quote(v)) +class DimensionTraffic(Dimension): + def __init__(self): + Dimension.__init__(self, 'traf', 'Traffic') + def htmlLabel(self, v): + return v + class Test: @classmethod def isOnPath(cls, path): @@ -103,7 +109,7 @@ class Tests(dict): def addTest(self, test, coordinates): if len(coordinates) != len(self.dimensions): - raise KeyError("The number coordinates do not match the number of dimensions") + raise KeyError("The number coordinates do not match the number of dimensions: " + str(coordinates)) self[tuple(coordinates)] = test for i in xrange(len(coordinates)): self.dimensions[i].addValue(coordinates[i]) @@ -196,6 +202,6 @@ th, td { border: 1px solid lightgray; padding: 4px;} if __name__ == "__main__": os.chdir(sys.argv[1]) - tests = Tests("by-kern/", DimensionKern(), DimensionTest()) + tests = Tests("./", DimensionKern(), DimensionTraffic(), DimensionTest()) tests.generateHtml() sys.exit(0)