1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/metro/base/tests/mochiperf/browser_firstx.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +"use strict"; 1.8 + 1.9 +function test() { 1.10 + runTests(); 1.11 +} 1.12 + 1.13 +gTests.push({ 1.14 + desc: "first x metrics", 1.15 + run: function run() { 1.16 + PerfTest.declareTest("5F2A456E-2BB2-4073-A751-936F222FEAE0", 1.17 + "startup perf metrics", "browser", "ux", 1.18 + "Tracks various metrics reported by nsIAppStartup.getStartupInfo(). Values are in msec."); 1.19 + 1.20 + let startup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup).getStartupInfo(); 1.21 + PerfTest.declareNumericalResults([ 1.22 + { value: startup['start'] - startup.process, desc: "start" }, 1.23 + { value: startup['main'] - startup.process, desc: "main", shareAxis: 0 }, 1.24 + { value: startup['startupCrashDetectionBegin'] - startup.process, desc: "startupCrashDetectionBegin", shareAxis: 0 }, 1.25 + { value: startup['firstPaint'] - startup.process, desc: "firstPaint", shareAxis: 0 }, 1.26 + { value: startup['sessionRestored'] - startup.process, desc: "sessionRestored", shareAxis: 0 }, 1.27 + { value: startup['createTopLevelWindow'] - startup.process, desc: "createTopLevelWindow", shareAxis: 0 }, 1.28 + { value: startup['firstLoadURI'] - startup.process, desc: "firstLoadURI", shareAxis: 0 }, 1.29 + ]); 1.30 + } 1.31 +}); 1.32 +