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

Side by Side Diff: third_party/WebKit/PerformanceTests/resources/runner.js

Issue 2857403002: Move trace event emitting calls to outside of test run time measurement (Closed)
Patch Set: Created 3 years, 7 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
« 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 // There are tests for computeStatistics() located in LayoutTests/fast/harness/p erftests 1 // There are tests for computeStatistics() located in LayoutTests/fast/harness/p erftests
2 2
3 if (window.testRunner) { 3 if (window.testRunner) {
4 testRunner.waitUntilDone(); 4 testRunner.waitUntilDone();
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 } 6 }
7 7
8 (function () { 8 (function () {
9 var logLines = null; 9 var logLines = null;
10 var completedIterations = -1; 10 var completedIterations = -1;
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 351 }
352 352
353 function zeroTimeoutScheduler(task) { 353 function zeroTimeoutScheduler(task) {
354 setTimeout(task, 0); 354 setTimeout(task, 0);
355 } 355 }
356 356
357 function measureTimeOnce() { 357 function measureTimeOnce() {
358 // Force gc before measuring time to avoid interference between tests. 358 // Force gc before measuring time to avoid interference between tests.
359 PerfTestRunner.gc(); 359 PerfTestRunner.gc();
360 360
361 addRunTestStartMarker();
361 var start = PerfTestRunner.now(); 362 var start = PerfTestRunner.now();
362 addRunTestStartMarker();
363 var returnValue = currentTest.run(); 363 var returnValue = currentTest.run();
364 var end = PerfTestRunner.now();
364 addRunTestEndMarker(); 365 addRunTestEndMarker();
365 var end = PerfTestRunner.now();
366 366
367 if (returnValue - 0 === returnValue) { 367 if (returnValue - 0 === returnValue) {
368 if (returnValue < 0) 368 if (returnValue < 0)
369 PerfTestRunner.log("runFunction returned a negative value: " + r eturnValue); 369 PerfTestRunner.log("runFunction returned a negative value: " + r eturnValue);
370 return returnValue; 370 return returnValue;
371 } 371 }
372 372
373 return end - start; 373 return end - start;
374 } 374 }
375 375
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 438
439 iframe.contentDocument.close(); 439 iframe.contentDocument.close();
440 document.body.removeChild(iframe); 440 document.body.removeChild(iframe);
441 }; 441 };
442 442
443 PerfTestRunner.measureTime(test); 443 PerfTestRunner.measureTime(test);
444 } 444 }
445 445
446 window.PerfTestRunner = PerfTestRunner; 446 window.PerfTestRunner = PerfTestRunner;
447 })(); 447 })();
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