[pypy-svn] r70666 - in pypy/build/bot2/jsplot: . js

fijal at codespeak.net fijal at codespeak.net
Sun Jan 17 22:25:13 CET 2010


Author: fijal
Date: Sun Jan 17 22:25:12 2010
New Revision: 70666

Modified:
   pypy/build/bot2/jsplot/js/plot.js
   pypy/build/bot2/jsplot/plotsummary.html
Log:
minor tweaks


Modified: pypy/build/bot2/jsplot/js/plot.js
==============================================================================
--- pypy/build/bot2/jsplot/js/plot.js	(original)
+++ pypy/build/bot2/jsplot/js/plot.js	Sun Jan 17 22:25:12 2010
@@ -42,6 +42,14 @@
     }];
 }
 
+function attrs_for_miniature()
+{
+    var attrs = common_attrs();
+    attrs.xaxis.ticks = 0;
+    attrs.yaxis.ticks = 0;
+    return attrs;
+}
+
 var MAX_PER_LINE = 4;
 
 function plot_miniature(benchname, benchresults, cpython_results, lasttime)
@@ -52,12 +60,14 @@
     var capt = benchname + " " + lasttime;
     $("#placeholder").find("tr:last").append("<td><p class='smallcaption'>" + capt + "</p><div class='miniplot'></div></td>");
     var elem = $("#placeholder").find("div:last");
-    var attrs = common_attrs();
-    attrs.xaxis.ticks = 0;
-    attrs.yaxis.ticks = 0;
+    var attrs = attrs_for_miniature();
     var data;
     if (!$("#legend").children() == []) {
         // a bit of a hack, if we didn't add a legend, do it now
+        $("#revstart")[0].value = benchresults[0][0];
+        $("#revstart").change(function(event) {
+            redisplay(elem, benchresults, cpython_results);
+        });
         data = get_plot_input(benchresults, cpython_results);
         attrs.legend.container = "#legend";
     } else {
@@ -66,6 +76,13 @@
     $.plot(elem, data, attrs);
 }
 
+function redisplay(elem, benchresults, cpython_results)
+{
+    var attrs = attrs_for_miniature();
+    attrs.xaxis.min = $("#revstart")[0].value;
+    $.plot(elem, [benchresults, cpython_results], attrs);
+}
+
 function plot_main(benchname, benchresults, cpython_results, lasttime) {
     var capt = benchname + " " + lasttime;
     $("#placeholder").append("<p class='caption'>" + capt + "</p>");

Modified: pypy/build/bot2/jsplot/plotsummary.html
==============================================================================
--- pypy/build/bot2/jsplot/plotsummary.html	(original)
+++ pypy/build/bot2/jsplot/plotsummary.html	Sun Jan 17 22:25:12 2010
@@ -16,7 +16,7 @@
   <body>
     <h1>Benchmarks</h1>
     <p>
-      On <i>X</i> axis revision number, on <i>Y</i> axis time for benchmark (lower is better).
+      On <i>X</i> axis revision number, on <i>Y</i> axis time for benchmark (lower is better). Revisions from <input size="5" id="revstart"></input> to HEAD.
     </p>
     <div id="legend">
     </div>



More information about the Pypy-commit mailing list