Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/tests/performance/common.js

Issue 6423769060999168: Issue 301 - adblockplustests: Use for (.. of ..) (Closed)
Patch Set: Created April 12, 2014, 1:48 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/tests/notification.js ('k') | chrome/content/tests/performance/filter_fromText.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/tests/performance/common.js
===================================================================
--- a/chrome/content/tests/performance/common.js
+++ b/chrome/content/tests/performance/common.js
@@ -44,17 +44,17 @@ function runTests(testFunc, cleanupFunc,
setTimeout(runNextTest, 0);
}
function getConfidenceInterval(results)
{
let sum = 0;
let sqrsum = 0;
- for each (let result in results)
+ for (let result of results)
{
sum += result;
sqrsum += result * result;
}
let avg = sum / results.length;
let stddev = Math.sqrt((sqrsum - 2 * sum * avg + avg * avg * results.length) / results.length);
let confidence = 1.96 * stddev; // 95% confidence, assuming Gaussian distribution
« no previous file with comments | « chrome/content/tests/notification.js ('k') | chrome/content/tests/performance/filter_fromText.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld