Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | "use strict"; |
michael@0 | 5 | |
michael@0 | 6 | function test() { |
michael@0 | 7 | runTests(); |
michael@0 | 8 | } |
michael@0 | 9 | |
michael@0 | 10 | gTests.push({ |
michael@0 | 11 | desc: "first x metrics", |
michael@0 | 12 | run: function run() { |
michael@0 | 13 | PerfTest.declareTest("5F2A456E-2BB2-4073-A751-936F222FEAE0", |
michael@0 | 14 | "startup perf metrics", "browser", "ux", |
michael@0 | 15 | "Tracks various metrics reported by nsIAppStartup.getStartupInfo(). Values are in msec."); |
michael@0 | 16 | |
michael@0 | 17 | let startup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup).getStartupInfo(); |
michael@0 | 18 | PerfTest.declareNumericalResults([ |
michael@0 | 19 | { value: startup['start'] - startup.process, desc: "start" }, |
michael@0 | 20 | { value: startup['main'] - startup.process, desc: "main", shareAxis: 0 }, |
michael@0 | 21 | { value: startup['startupCrashDetectionBegin'] - startup.process, desc: "startupCrashDetectionBegin", shareAxis: 0 }, |
michael@0 | 22 | { value: startup['firstPaint'] - startup.process, desc: "firstPaint", shareAxis: 0 }, |
michael@0 | 23 | { value: startup['sessionRestored'] - startup.process, desc: "sessionRestored", shareAxis: 0 }, |
michael@0 | 24 | { value: startup['createTopLevelWindow'] - startup.process, desc: "createTopLevelWindow", shareAxis: 0 }, |
michael@0 | 25 | { value: startup['firstLoadURI'] - startup.process, desc: "firstLoadURI", shareAxis: 0 }, |
michael@0 | 26 | ]); |
michael@0 | 27 | } |
michael@0 | 28 | }); |
michael@0 | 29 |