Bug 1030217 - Slight decrease in Telemetry submission rate on nightly channel. r=Yoric
authorRoberto A. Vitillo <rvitillo@mozilla.com>
Tue, 08 Jul 2014 10:59:00 +0200
changeset 193271 18ed7626a49b5ef1293d6b327967eadaf956ea04
parent 193270 ab7e8e8c1e0002266998619f9b950293e406a003
child 193272 6e9f72bdd32ed5533d1f90b75b39ac6dafaf2bb8
child 193362 cd1a690a248d39bdfb0b6daa39ad4ab9aac4abf0
push id27112
push usercbook@mozilla.com
push dateThu, 10 Jul 2014 12:47:23 +0000
treeherdermozilla-central@6e9f72bdd32e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs1030217
milestone33.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 1030217 - Slight decrease in Telemetry submission rate on nightly channel. r=Yoric
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/TelemetryFile.jsm
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -4147,16 +4147,22 @@
   "TOTAL_COUNT_LOW_ERRORS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "3000",
     "n_buckets": 10,
     "extended_statistics_ok": true,
     "description": "Number of histograms with total count low errors"
   },
+  "TELEMETRY_FILES_EVICTED": {
+    "expires_in_version": "36",
+    "kind": "enumerated",
+    "n_values": 30,
+    "description": "Number of telemetry pings evicted at startup"
+  },
   "TELEMETRY_TEST_FLAG": {
     "expires_in_version": "never",
     "kind": "flag",
     "description": "a testing histogram; not meant to be touched"
   },
   "STARTUP_CRASH_DETECTED": {
     "expires_in_version": "never",
     "kind": "flag",
--- a/toolkit/components/telemetry/TelemetryFile.jsm
+++ b/toolkit/components/telemetry/TelemetryFile.jsm
@@ -174,16 +174,19 @@ this.TelemetryFile = {
         }
 
         for (let i = MAX_LRU_PINGS; i < sortedEntries.length; i++) {
           let entry = sortedEntries[i].entry;
           OS.File.remove(entry.path);
         }
 
         yield Promise.all(result);
+
+        Services.telemetry.getHistogramById('TELEMETRY_FILES_EVICTED').
+          add(sortedEntries.length - MAX_LRU_PINGS);
       }
 
       yield iter.close();
     }.bind(this));
   },
 
   /**
    * Load the histograms from a file.