Bug 1515103 - add low end machine information to graphics section of telemetry environment, r=chutten
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 08 Jan 2019 16:12:25 +0000
changeset 510034 d935455eb6414ff8132d2abf47b74aed1d27df35
parent 510033 0ea91341d00e8606a1de231709f0570da2957fd6
child 510035 8d44d6ba5863f5b12d053196e20532a78796f8e3
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1515103
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1515103 - add low end machine information to graphics section of telemetry environment, r=chutten Depends on D15844 Differential Revision: https://phabricator.services.mozilla.com/D15940
toolkit/components/telemetry/app/TelemetryEnvironment.jsm
toolkit/components/telemetry/docs/data/environment.rst
toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
--- a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm
@@ -1690,16 +1690,17 @@ EnvironmentCache.prototype = {
    * Get the GFX information.
    * @return Object containing the GFX data.
    */
   _getGFXData() {
     let gfxData = {
       D2DEnabled: getGfxField("D2DEnabled", null),
       DWriteEnabled: getGfxField("DWriteEnabled", null),
       ContentBackend: getGfxField("ContentBackend", null),
+      LowEndMachine: getGfxField("LowEndMachine", false),
       // The following line is disabled due to main thread jank and will be enabled
       // again as part of bug 1154500.
       // DWriteVersion: getGfxField("DWriteVersion", null),
       adapters: [],
       monitors: [],
       features: {},
     };
 
--- a/toolkit/components/telemetry/docs/data/environment.rst
+++ b/toolkit/components/telemetry/docs/data/environment.rst
@@ -138,16 +138,17 @@ Structure:
           system:  { // hdd where the system files are located
               model: <string>, // windows only or null on failure
               revision: <string>, // windows only or null on failure
           },
         },
         gfx: {
             D2DEnabled: <bool>, // null on failure
             DWriteEnabled: <bool>, // null on failure
+            LowEndMachine: <bool>, // whether we're adjusting to being on low-spec hardware
             //DWriteVersion: <string>, // temporarily removed, pending bug 1154500
             adapters: [
               {
                 description: <string>, // e.g. "Intel(R) HD Graphics 4600", null on failure
                 vendorID: <string>, // null on failure
                 deviceID: <string>, // null on failure
                 subsysID: <string>, // null on failure
                 RAM: <number>, // in MB, null on failure
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -589,16 +589,17 @@ function checkSystemSection(data) {
   for (let disk of EXPECTED_HDD_FIELDS) {
     Assert.ok(check(data.system.hdd[disk].model));
     Assert.ok(check(data.system.hdd[disk].revision));
   }
 
   let gfxData = data.system.gfx;
   Assert.ok("D2DEnabled" in gfxData);
   Assert.ok("DWriteEnabled" in gfxData);
+  Assert.equal(typeof gfxData.LowEndMachine, "boolean");
   // DWriteVersion is disabled due to main thread jank and will be enabled
   // again as part of bug 1154500.
   // Assert.ok("DWriteVersion" in gfxData);
   if (gIsWindows) {
     Assert.equal(typeof gfxData.D2DEnabled, "boolean");
     Assert.equal(typeof gfxData.DWriteEnabled, "boolean");
     // As above, will be enabled again as part of bug 1154500.
     // Assert.ok(checkString(gfxData.DWriteVersion));