]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Nicer graphs
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 7 Feb 2014 08:13:51 +0000 (09:13 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 7 Feb 2014 08:13:51 +0000 (09:13 +0100)
continuous/www/wvperf2html.py

index 3c3607b315f1b4623955bf32ab0a8dfcabb301f2..2c2952c0c4a112e79a96e3a904e3fb8fcdaa0818 100755 (executable)
@@ -146,6 +146,9 @@ class Graph:
 
     def options_json(self):
         options = {
+            'chart': {
+                'borderWidth': 1,
+                },
             'rangeSelector': {
                 'selected': 5 # All
             },
@@ -185,6 +188,7 @@ class Graph:
                         'x': -3 },
                     'title': { 'text': axis.getLabel() },
                     'minRange': axis.minrange,
+                    'tickPixelInterval': 40,
                     } for axis in self.axes_ordered],
             'series': [{ 'name': '%s [%s]' % (col.name, col.units),
                  'yAxis': col.axis.num }
@@ -274,17 +278,18 @@ for g in graphs:
     g.findRanges()
     g.fixupAxisNumbers()
 
+pagetitle="Linux CAN subsystem performance plots"
 print("""
 <!DOCTYPE HTML>
 <html>
   <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-  <title>NUL Performance Plots</title>
+  <title>%(pagetitle)s</title>
 
   <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
   <script type="text/javascript">
     function tooltip_formatter() {
-      var s = '<b>'+ Highcharts.dateFormat('%a, %d %b %Y %H:%M:%S', this.x) +'</b><br/>';
+      var s = '<b>'+ Highcharts.dateFormat('%%a, %%d %%b %%Y %%H:%%M:%%S', this.x) +'</b><br/>';
       s += commit2msg[date2commit[this.x]];
       $.each(this.points, function(i, point) {
         s += '<br/><span style="color:'+ point.series.color+';">'+ point.series.name +'</span>: '+point.y;
@@ -303,7 +308,7 @@ print("""
           window.location = "https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?qt=range&q="+date2commit[prevpoint.x]+'..'+date2commit[event.point.x];
       else
           window.location = "https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?id="+date2commit[event.point.x];
-    }""")
+    }""" % locals())
 
 def make_int_keys(json):
     r = re.compile('"(\d+)"(.*)')
@@ -323,12 +328,12 @@ print("""
     </head>
 
     <body>
-       <h1>Linux CAN subsystem performance plots</h1>
+       <h1>%(pagetitle)s</h1>
     <p>The graphs below show performance numbers from various
     CAN bus related benchmarks run on different Linux kernel versions.</p>
     <p>Table of content:</p>
         <ul>
-""")
+""" % locals())
 for graph in graphs:
     print("    <li><a href='#%s'>%s</a></li>" % (graph.id, graph.title))
 print("    </ul>")