mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 891016 - Add a perf test that tracks nsIAppStartup's getStartupInfo data. r=bbondy
This commit is contained in:
parent
cde6db13c3
commit
a067ef9573
@ -20,6 +20,7 @@ PERF_TEST_FILES = \
|
||||
browser_msgmgr_01.js \
|
||||
msgmanagerecho.js \
|
||||
browser_layers_01.js \
|
||||
browser_firstx.js \
|
||||
$(NULL)
|
||||
|
||||
PERF_RESOURCE_FILES = \
|
||||
|
29
browser/metro/base/tests/mochiperf/browser_firstx.js
Normal file
29
browser/metro/base/tests/mochiperf/browser_firstx.js
Normal file
@ -0,0 +1,29 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function test() {
|
||||
let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
|
||||
Services.scriptloader.loadSubScript(testDir + "/perfhelpers.js", this);
|
||||
runTests();
|
||||
}
|
||||
|
||||
gTests.push({
|
||||
desc: "first x metrics",
|
||||
run: function run() {
|
||||
PerfTest.declareTest("5F2A456E-2BB2-4073-A751-936F222FEAE0",
|
||||
"startup perf metrics", "browser", "ux",
|
||||
"Tracks various metrics reported by nsIAppStartup.getStartupInfo(). Values are in msec.");
|
||||
|
||||
let startup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup).getStartupInfo();
|
||||
PerfTest.declareNumericalResults([
|
||||
{ value: startup['start'] - startup.process, desc: "start" },
|
||||
{ value: startup['main'] - startup.process, desc: "main" },
|
||||
{ value: startup['startupCrashDetectionBegin'] - startup.process, desc: "startupCrashDetectionBegin" },
|
||||
{ value: startup['firstPaint'] - startup.process, desc: "firstPaint" },
|
||||
{ value: startup['sessionRestored'] - startup.process, desc: "sessionRestored" },
|
||||
{ value: startup['createTopLevelWindow'] - startup.process, desc: "createTopLevelWindow" },
|
||||
{ value: startup['firstLoadURI'] - startup.process, desc: "firstLoadURI" },
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user