зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1253633 - Don't put the TELEMETRY_TEST_* histograms into the Telemetry payload outside of tests; r=gfritzsche
MozReview-Commit-ID: FX5BsR2cUBh --HG-- extra : rebase_source : 47ac0d0537e06f5474ccc8cc08c9e1ee7612e672
This commit is contained in:
Родитель
266aebcf54
Коммит
41543f1dac
|
@ -703,6 +703,7 @@ var Impl = {
|
|||
_childrenToHearFrom: null,
|
||||
// monotonically-increasing id for USS reports
|
||||
_nextTotalMemoryId: 1,
|
||||
_testing: false,
|
||||
|
||||
|
||||
get _log() {
|
||||
|
@ -887,7 +888,12 @@ var Impl = {
|
|||
for (let name of registered) {
|
||||
for (let n of [name, "STARTUP_" + name]) {
|
||||
if (n in hls) {
|
||||
ret[n] = this.packHistogram(hls[n]);
|
||||
// Omit telemetry test histograms outside of tests.
|
||||
if (n.startsWith('TELEMETRY_TEST_') && this._testing == false) {
|
||||
this._log.trace("getHistograms - Skipping test histogram: " + n);
|
||||
} else {
|
||||
ret[n] = this.packHistogram(hls[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -922,6 +928,11 @@ var Impl = {
|
|||
let ret = {};
|
||||
|
||||
for (let id of registered) {
|
||||
// Omit telemetry test histograms outside of tests.
|
||||
if (id.startsWith('TELEMETRY_TEST_') && this._testing == false) {
|
||||
this._log.trace("getKeyedHistograms - Skipping test histogram: " + id);
|
||||
continue;
|
||||
}
|
||||
ret[id] = {};
|
||||
let keyed = Telemetry.getKeyedHistogramById(id);
|
||||
let snapshot = null;
|
||||
|
@ -1340,6 +1351,7 @@ var Impl = {
|
|||
setupChromeProcess: function setupChromeProcess(testing) {
|
||||
this._initStarted = true;
|
||||
this._log.trace("setupChromeProcess");
|
||||
this._testing = testing;
|
||||
|
||||
if (this._delayedInitTask) {
|
||||
this._log.error("setupChromeProcess - init task already running");
|
||||
|
@ -1450,6 +1462,7 @@ var Impl = {
|
|||
*/
|
||||
setupContentProcess: function setupContentProcess(testing) {
|
||||
this._log.trace("setupContentProcess");
|
||||
this._testing = testing;
|
||||
|
||||
if (!Telemetry.canRecordBase) {
|
||||
this._log.trace("setupContentProcess - base recording is disabled, not initializing");
|
||||
|
|
Загрузка…
Ссылка в новой задаче