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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 "use strict";
     6 function test() {
     7   runTests();
     8 }
    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.");
    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 });

mercurial