]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - gw-tests/genhtml/genhtml.py
Add new dimension (traffic) to html generator
[can-benchmark.git] / gw-tests / genhtml / genhtml.py
index 08a6dac442fea3839e9cd45b019bb62bbb4d04f9..4c16a951fa29e37c000e9515534faa4a8f8efc92 100755 (executable)
@@ -56,6 +56,12 @@ class DimensionTest(Dimension):
     def htmlLabel(self, v):
        return v+"<br><a href='%s.sh.html'>source</a>"%(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)