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

Side by Side Diff: tools/perf/benchmarks/blink_perf.js

Issue 2819343002: Support tracing metrics for measureTime & measureFrameTime method in blink_perf (Closed)
Patch Set: Split StartTracing & StopTracing 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function() { 5 (function() {
6 window.testRunner = {}; 6 window.testRunner = {};
7 window.testRunner.isDone = false; 7 window.testRunner.isDone = false;
8 8
9 testRunner.waitUntilDone = function() {}; 9 testRunner.waitUntilDone = function() {};
10 testRunner.dumpAsText = function() {}; 10 testRunner.dumpAsText = function() {};
11 testRunner.notifyDone = function() { 11 testRunner.notifyDone = function() {
12 this.isDone = true; 12 this.isDone = true;
13 }; 13 };
14 14
15 testRunner.supportTracing = true;
16
17 // If this is true, blink_perf tests is put on paused waiting for tracing to
18 // be started. |scheduleTestRun| should be invoked after tracing is started
19 // to continue blink perf test.
20 testRunner.isWaitingForTracingStart = false;
21
22 testRunner.startTracing = function(tracingCategories, scheduleTestRun) {
23 this.tracingCategories = tracingCategories;
24 this.scheduleTestRun = scheduleTestRun;
25 this.isWaitingForTracingStart = true;
26 }
27
28 testRunner.stopTracingAndMeasure = function(traceEventsToMeasure, callback) {
29 testRunner.traceEventsToMeasure = traceEventsToMeasure;
Xianzhu 2017/04/24 22:46:04 Nit: s/testRunner/this/ to be consistent with star
30 callback();
31 }
32
15 window.GCController = {}; 33 window.GCController = {};
16 34
17 GCController.collect = function() { 35 GCController.collect = function() {
18 gc(); 36 gc();
19 }; 37 };
20 GCController.collectAll = function() { 38 GCController.collectAll = function() {
21 for (var i = 0; i < 7; ++i) 39 for (var i = 0; i < 7; ++i)
22 gc(); 40 gc();
23 }; 41 };
24 })(); 42 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698