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 2189533004: Add blink_perf.html_to_dom benchmark. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to the original benchmark Created 4 years, 4 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
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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 PerfTestRunner.forceLayout(iframe.contentDocument); 324 PerfTestRunner.forceLayout(iframe.contentDocument);
325 } 325 }
326 326
327 iframe.contentDocument.close(); 327 iframe.contentDocument.close();
328 document.body.removeChild(iframe); 328 document.body.removeChild(iframe);
329 }; 329 };
330 330
331 PerfTestRunner.measureTime(test); 331 PerfTestRunner.measureTime(test);
332 } 332 }
333 333
334 // Support for benchmarks that run only once and produce multiple values.
335 // The intended use:
336 // 1. PerfTestRunner.startSingleRunBenchmark("Description")
337 // 2. PerfTestRunner.logValues("metric 1", values1, unit1);
338 // 3. PerfTestRunner.logValues("metric 2", values2, unit2);
339 // ...
340 // n. PerfTestRunner.finishSingleRunBenchmark()
341 PerfTestRunner.startSingleRunBenchmark = function(description) {
342 logLines = logLines || (window.testRunner ? [] : null);
343 this.log("Description: " + description);
344 }
345
346 PerfTestRunner.logValues = function (metric, values, unit) {
347 this.log("values " + metric + " " + values.join(", ") + " " + unit)
348 }
349
350 PerfTestRunner.finishSingleRunBenchmark = function() {
351 if (logLines)
352 logLines.forEach(logInDocument);
353 if (window.testRunner)
354 testRunner.notifyDone();
355 }
356
357
334 window.PerfTestRunner = PerfTestRunner; 358 window.PerfTestRunner = PerfTestRunner;
335 })(); 359 })();
OLDNEW
« no previous file with comments | « third_party/WebKit/PerformanceTests/HTMLToDOM/wikipedia-markup.txt ('k') | tools/perf/benchmarks/blink_perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698