Bug 1443600 - Remove legacy Telemetry component childPayloads r=chutten

This commit is contained in:
Jan-Erik Rediger 2018-04-04 08:06:00 +03:00
parent 71517dfd71
commit 16c5eae5e4
8 changed files with 0 additions and 106 deletions

View File

@ -7205,13 +7205,6 @@
"n_buckets": 29,
"description": "The size (MB) of the ping data submitted to Telemetry exceeding the maximum size"
},
"TELEMETRY_DISCARDED_CONTENT_PINGS_COUNT": {
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"description": "Count of discarded content payloads."
},
"TELEMETRY_COMPRESS": {
"record_in_processes": ["main"],
"alert_emails": ["telemetry-client-dev@mozilla.com"],

View File

@ -51,7 +51,6 @@ const MIN_SUBSESSION_LENGTH_MS = Services.prefs.getIntPref("toolkit.telemetry.mi
const LOGGER_NAME = "Toolkit.Telemetry";
const LOGGER_PREFIX = "TelemetrySession" + (Utils.isContentProcess ? "#content::" : "::");
const MESSAGE_TELEMETRY_PAYLOAD = "Telemetry:Payload";
const MESSAGE_TELEMETRY_USS = "Telemetry:USS";
const MESSAGE_TELEMETRY_GET_CHILD_USS = "Telemetry:GetChildUSS";
@ -59,9 +58,6 @@ const MESSAGE_TELEMETRY_GET_CHILD_USS = "Telemetry:GetChildUSS";
// Changing this pref requires a restart.
const IS_UNIFIED_TELEMETRY = Services.prefs.getBoolPref(TelemetryUtils.Preferences.Unified, false);
// Maximum number of content payloads that we are willing to store.
const MAX_NUM_CONTENT_PAYLOADS = 10;
// Do not gather data more than once a minute (ms)
const TELEMETRY_INTERVAL = 60 * 1000;
// Delay before intializing telemetry (ms)
@ -664,11 +660,6 @@ var Impl = {
// The previous build ID, if this is the first run with a new build.
// Null if this is the first run, or the previous build ID is unknown.
_previousBuildId: null,
// Telemetry payloads sent by child processes.
// Each element is in the format {source: <weak-ref>, payload: <object>},
// where source is a weak reference to the child process,
// and payload is the telemetry payload from that child process.
_childTelemetry: [],
// Unique id that identifies this session so the server can cope with duplicate
// submissions, orphaning and other oddities. The id is shared across subsessions.
_sessionId: null,
@ -1192,10 +1183,6 @@ var Impl = {
Telemetry.getHistogramById(id).add(val);
},
getChildPayloads: function getChildPayloads() {
return this._childTelemetry.map(child => child.payload);
},
/**
* Get the current session's payload using the provided
* simpleMeasurements and info, which are typically obtained by a call
@ -1450,7 +1437,6 @@ var Impl = {
this.attachEarlyObservers();
Services.ppmm.addMessageListener(MESSAGE_TELEMETRY_PAYLOAD, this);
Services.ppmm.addMessageListener(MESSAGE_TELEMETRY_USS, this);
},
@ -1569,24 +1555,6 @@ var Impl = {
receiveMessage: function receiveMessage(message) {
this._log.trace("receiveMessage - Message name " + message.name);
switch (message.name) {
case MESSAGE_TELEMETRY_PAYLOAD:
{
// In parent process, receive Telemetry payload from child
let source = message.data.childUUID;
delete message.data.childUUID;
this._childTelemetry.push({
source,
payload: message.data,
});
if (this._childTelemetry.length == MAX_NUM_CONTENT_PAYLOADS + 1) {
this._childTelemetry.shift();
Telemetry.getHistogramById("TELEMETRY_DISCARDED_CONTENT_PINGS_COUNT").add();
}
break;
}
case MESSAGE_TELEMETRY_USS:
{
// In parent process, receive the USS report from the child
@ -1648,8 +1616,6 @@ var Impl = {
}
},
_processUUID: generateUUID(),
sendContentProcessUSS: function sendContentProcessUSS(aMessageId) {
this._log.trace("sendContentProcessUSS");
@ -1668,14 +1634,6 @@ var Impl = {
);
},
sendContentProcessPing: function sendContentProcessPing(reason) {
this._log.trace("sendContentProcessPing - Reason " + reason);
const isSubsession = !this._isClassicReason(reason);
let payload = this.getSessionPayload(reason, isSubsession);
payload.childUUID = this._processUUID;
Services.cpmm.sendAsyncMessage(MESSAGE_TELEMETRY_PAYLOAD, payload);
},
/**
* On Desktop: Save the "shutdown" ping to disk.
* On Android: Save the "saved-session" ping to disk.

View File

@ -1184,7 +1184,6 @@
"SYSTEM_FONT_FALLBACK_SCRIPT",
"TELEMETRY_COMPRESS",
"TELEMETRY_DISCARDED_ARCHIVED_PINGS_SIZE_MB",
"TELEMETRY_DISCARDED_CONTENT_PINGS_COUNT",
"TELEMETRY_DISCARDED_PENDING_PINGS_SIZE_MB",
"TELEMETRY_DISCARDED_SEND_PINGS_SIZE_MB",
"TELEMETRY_INVALID_PING_TYPE_SUBMITTED",
@ -1687,7 +1686,6 @@
"SUBPROCESS_LAUNCH_FAILURE",
"TELEMETRY_ARCHIVE_SESSION_PING_COUNT",
"TELEMETRY_ASSEMBLE_PAYLOAD_EXCEPTION",
"TELEMETRY_DISCARDED_CONTENT_PINGS_COUNT",
"TELEMETRY_INVALID_PAYLOAD_SUBMITTED",
"TELEMETRY_INVALID_PING_TYPE_SUBMITTED",
"TELEMETRY_PENDING_LOAD_FAILURE_PARSE",

View File

@ -4,8 +4,6 @@ ChromeUtils.import("resource://gre/modules/TelemetrySession.jsm", this);
ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm", this);
ChromeUtils.import("resource://testing-common/ContentTaskUtils.jsm", this);
const MESSAGE_TELEMETRY_PAYLOAD = "Telemetry:Payload";
const MESSAGE_TELEMETRY_GET_CHILD_PAYLOAD = "Telemetry:GetChildPayload";
const MESSAGE_CHILD_TEST_DONE = "ChildTest:Done";
const PLATFORM_VERSION = "1.9.2";

View File

@ -279,8 +279,6 @@ var PingPicker = {
pingPicker.classList.add("hidden");
}
});
document.getElementById("choose-payload")
.addEventListener("change", () => displayPingData(gPingData));
document.getElementById("processes")
.addEventListener("change", () => displayPingData(gPingData));
Array.from(document.querySelectorAll(".change-ping")).forEach(el => {
@ -2372,38 +2370,6 @@ function renderProcessList(ping, selectEl) {
}
}
function renderPayloadList(ping) {
// Rebuild the payload select with options:
// Parent Payload (selected)
// Child Payload 1..ping.payload.childPayloads.length
let listEl = document.getElementById("choose-payload");
removeAllChildNodes(listEl);
let option = document.createElement("option");
let text = bundle.GetStringFromName("parentPayload");
let content = document.createTextNode(text);
let payloadIndex = 0;
option.appendChild(content);
option.setAttribute("value", payloadIndex++);
option.selected = true;
listEl.appendChild(option);
if (!ping.payload.childPayloads) {
listEl.disabled = true;
return;
}
listEl.disabled = false;
for (; payloadIndex <= ping.payload.childPayloads.length; ++payloadIndex) {
option = document.createElement("option");
text = bundle.formatStringFromName("childPayloadN", [payloadIndex], 1);
content = document.createTextNode(text);
option.appendChild(content);
option.setAttribute("value", payloadIndex);
listEl.appendChild(option);
}
}
function togglePingSections(isMainPing) {
// We always show the sections that are "common" to all pings.
let commonSections = new Set(["heading",
@ -2442,7 +2408,6 @@ function displayPingData(ping, updatePayloadList = false) {
function displayRichPingData(ping, updatePayloadList) {
// Update the payload list and process lists
if (updatePayloadList) {
renderPayloadList(ping);
renderProcessList(ping, document.getElementById("processes"));
}
@ -2491,15 +2456,6 @@ function displayRichPingData(ping, updatePayloadList) {
LateWritesSingleton.renderLateWrites(payload.lateWrites);
// Select payload to render
let payloadSelect = document.getElementById("choose-payload");
let payloadOption = payloadSelect.selectedOptions.item(0);
let payloadIndex = payloadOption.getAttribute("value");
if (payloadIndex > 0) {
payload = ping.payload.childPayloads[payloadIndex - 1];
}
// Show chrome hang stacks
ChromeHangs.render(payload.chromeHangs);

View File

@ -124,10 +124,6 @@
</select>
</div>
</div>
<div>
<h4 class="title">&aboutTelemetry.payloadChoiceHeader;</h4>
<select id="choose-payload"></select>
</div>
</div>
<div class="header">

View File

@ -12,7 +12,6 @@
<!ENTITY aboutTelemetry.optionGroupToday "Today">
<!ENTITY aboutTelemetry.optionGroupYesterday "Yesterday">
<!ENTITY aboutTelemetry.optionGroupOlder "Older">
<!ENTITY aboutTelemetry.payloadChoiceHeader "Payload">
<!-- LOCALIZATION NOTE(aboutTelemetry.previousPing, aboutTelemetry.nextPing):
These strings are displayed when selecting Archived pings, and theyre
used to move to the next or previous ping. -->

View File

@ -104,10 +104,6 @@ memoryMapTitle = Memory map:
errorFetchingSymbols = An error occurred while fetching symbols. Check that you are connected to the Internet and try again.
parentPayload = Parent Payload
# LOCALIZATION NOTE(childPayloadN):
# - %1$S is replaced by the number of the child payload (e.g. “1”, “2”)
childPayloadN = Child Payload %1$S
timestampHeader = timestamp
categoryHeader = category
methodHeader = method