browser/metro/base/tests/mochiperf/browser_firstx.js

changeset 2
7e26c7da4463
equal deleted inserted replaced
-1:000000000000 0:fc028052ed80
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
3
4 "use strict";
5
6 function test() {
7 runTests();
8 }
9
10 gTests.push({
11 desc: "first x metrics",
12 run: function run() {
13 PerfTest.declareTest("5F2A456E-2BB2-4073-A751-936F222FEAE0",
14 "startup perf metrics", "browser", "ux",
15 "Tracks various metrics reported by nsIAppStartup.getStartupInfo(). Values are in msec.");
16
17 let startup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup).getStartupInfo();
18 PerfTest.declareNumericalResults([
19 { value: startup['start'] - startup.process, desc: "start" },
20 { value: startup['main'] - startup.process, desc: "main", shareAxis: 0 },
21 { value: startup['startupCrashDetectionBegin'] - startup.process, desc: "startupCrashDetectionBegin", shareAxis: 0 },
22 { value: startup['firstPaint'] - startup.process, desc: "firstPaint", shareAxis: 0 },
23 { value: startup['sessionRestored'] - startup.process, desc: "sessionRestored", shareAxis: 0 },
24 { value: startup['createTopLevelWindow'] - startup.process, desc: "createTopLevelWindow", shareAxis: 0 },
25 { value: startup['firstLoadURI'] - startup.process, desc: "firstLoadURI", shareAxis: 0 },
26 ]);
27 }
28 });
29

mercurial