Added an average metric for dygraphs many points benchmark.
authorAnthony Robledo <antrob@google.com>
Mon, 27 Jun 2011 18:52:09 +0000 (14:52 -0400)
committerAnthony Robledo <antrob@google.com>
Mon, 27 Jun 2011 18:52:09 +0000 (14:52 -0400)
tests/dygraph-many-points-benchmark.html

index 2919706..b4f7471 100644 (file)
           document.getElementById('message').innerHTML =
               "completed in " + (end - start) + " milliseconds.";
         } else {
+          var avg = 0;
+          for (var i = 0; i < millisecondss.length; i++) {
+            avg+=millisecondss[i];
+          }
+          avg/=millisecondss.length; 
           document.getElementById('message').innerHTML =
-              "Durations: " + millisecondss;
+              "Durations: " + millisecondss + " Average: " + avg;
         }
 
         if (durations.length > 0) {