Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1433)

Unified Diff: chrome/test/data/dromaeo/webrunner.js

Issue 2499923002: Update dromaeo to upstream a876d5250befbc41e2deab9d10cf6085b511d5ed (Closed)
Patch Set: Modified readme Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/dromaeo/tests/jslib-traverse-prototype.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/dromaeo/webrunner.js
diff --git a/chrome/test/data/dromaeo/webrunner.js b/chrome/test/data/dromaeo/webrunner.js
index 8b0e346003255fbb495f305cc9a4fe9fde0bd7d5..598998bbaddb17ec9dff304d3445b0c80eaa2db0 100644
--- a/chrome/test/data/dromaeo/webrunner.js
+++ b/chrome/test/data/dromaeo/webrunner.js
@@ -148,7 +148,7 @@
});
function compute(times, runs){
- var results = {runs: runs}, num = times.length;
+ var results = {runs: runs}, num = times.length, middle = num/2;
times = times.sort(function(a,b){
return a - b;
@@ -171,8 +171,8 @@
// Make Median
results.median = num % 2 == 0 ?
- (times[Math.floor(num/2)] + times[Math.ceil(num/2)]) / 2 :
- times[Math.round(num/2)];
+ (times[middle-1] + times[middle]) / 2 :
+ times[Math.floor(middle)];
// Make Variance
results.variance = 0;
« no previous file with comments | « chrome/test/data/dromaeo/tests/jslib-traverse-prototype.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698