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

Side by Side Diff: chrome/test/data/dromaeo/webrunner.js

Issue 549054: Post aggregated results in post_json mode. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 (function(){ 1 (function(){
2 2
3 // Populated from: http://www.medcalc.be/manual/t-distribution.php 3 // Populated from: http://www.medcalc.be/manual/t-distribution.php
4 // 95% confidence for N - 1 = 4 4 // 95% confidence for N - 1 = 4
5 var tDistribution = 2.776; 5 var tDistribution = 2.776;
6 6
7 // The number of individual test iterations to do 7 // The number of individual test iterations to do
8 var numTests = 5; 8 var numTests = 5;
9 9
10 // The type of run that we're doing (options are "runs/s" or "ms") 10 // The type of run that we're doing (options are "runs/s" or "ms")
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 pre.style.display = "none"; 377 pre.style.display = "none";
378 pre.innerHTML = "__start_report" + summa ry + "__end_report"; 378 pre.innerHTML = "__start_report" + summa ry + "__end_report";
379 document.body.appendChild( pre ); 379 document.body.appendChild( pre );
380 } 380 }
381 381
382 if ( typeof goQuitApplication !== "undefined" ) { 382 if ( typeof goQuitApplication !== "undefined" ) {
383 goQuitApplication(); 383 goQuitApplication();
384 } 384 }
385 385
386 } else if ( dataStore && dataStore.length ) { 386 } else if ( dataStore && dataStore.length ) {
387 » » » » if (!automated || post_json) { 387 » » » » if (!automated) {
388 $("body").addClass("alldone"); 388 $("body").addClass("alldone");
389 var div = jQuery("<div class='results'>S aving...</div>").insertBefore("#overview"); 389 var div = jQuery("<div class='results'>S aving...</div>").insertBefore("#overview");
390 jQuery.ajax({ 390 jQuery.ajax({
391 type: "POST", 391 type: "POST",
392 url: "store.php", 392 url: "store.php",
393 data: "data=" + encodeURICompone nt(JSON.stringify(dataStore)) + "&style=" + runStyle, 393 data: "data=" + encodeURICompone nt(JSON.stringify(dataStore)) + "&style=" + runStyle,
394 success: function(id){ 394 success: function(id){
395 var url = window.locatio n.href.replace(/\?.*$/, "") + "?id=" + id; 395 var url = window.locatio n.href.replace(/\?.*$/, "") + "?id=" + id;
396 div.html("Results saved. You can access them at a later time at the following URL:<br/><strong><a href=' " + url + "'>" + url + "</a></strong></div>"); 396 div.html("Results saved. You can access them at a later time at the following URL:<br/><strong><a href=' " + url + "'>" + url + "</a></strong></div>");
397 } 397 }
398 }); 398 });
399 » » » » } else { 399 » » » » } else if (post_json) {
400 » » » » » jQuery.ajax({
401 » » » » » » type: "POST",
402 » » » » » » url: "store.php",
403 » » » » » » data: "data=" + encodeURICompone nt(JSON.stringify(window.automation.GetResults()))
404 » » » » » });
405 » » » » }
406 » » » » else {
400 window.automation.SetDone(); 407 window.automation.SetDone();
401 } 408 }
402 } 409 }
403 } 410 }
404 } 411 }
405 412
406 function updateTimebar(){ 413 function updateTimebar(){
407 $("#timebar").html("<span><strong>" + (runStyle === "runs/s" ? M ath.pow(Math.E, maxTotal / maxTotalNum) : maxTotal).toFixed(2) + "</strong>" + r unStyle + " (Total)</span>"); 414 $("#timebar").html("<span><strong>" + (runStyle === "runs/s" ? M ath.pow(Math.E, maxTotal / maxTotalNum) : maxTotal).toFixed(2) + "</strong>" + r unStyle + " (Total)</span>");
408 } 415 }
409 416
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 var means = aggregated[name]; 838 var means = aggregated[name];
832 var sum = 0; 839 var sum = 0;
833 for (var i = 0; i < means.length; i++) sum += me ans[i]; 840 for (var i = 0; i < means.length; i++) sum += me ans[i];
834 results[name] = Math.pow(Math.E, sum/means.lengt h).toString(); 841 results[name] = Math.pow(Math.E, sum/means.lengt h).toString();
835 } 842 }
836 843
837 return results; 844 return results;
838 } 845 }
839 } 846 }
840 })(); 847 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698