From: Anthony Robledo Date: Mon, 27 Jun 2011 18:52:09 +0000 (-0400) Subject: Added an average metric for dygraphs many points benchmark. X-Git-Tag: v1.0.0~459^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=a11725ce0a1a383718faea5d8f1070e09c3f7d19;p=dygraphs.git Added an average metric for dygraphs many points benchmark. --- diff --git a/tests/dygraph-many-points-benchmark.html b/tests/dygraph-many-points-benchmark.html index 2919706..b4f7471 100644 --- a/tests/dygraph-many-points-benchmark.html +++ b/tests/dygraph-many-points-benchmark.html @@ -82,8 +82,13 @@ 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) {