Bug 1685809 - Removed expired Scalars telemetry.profile_directory_scans and telemetry.profile_directory_scan_date and Histogram PROFILE_DIRECTORY_FILE_AGE. r = chutten r=chutten

Differential Revision: https://phabricator.services.mozilla.com/D103499
This commit is contained in:
Aditi 2021-02-01 14:25:04 +00:00
Родитель 0fc1e1e521
Коммит a3b5444dd8
3 изменённых файлов: 0 добавлений и 73 удалений

Просмотреть файл

@ -15562,17 +15562,6 @@
"keyed": true,
"description": "Permission requests (showing a permission prompt) by whether they were requested from code handling a user input event."
},
"PROFILE_DIRECTORY_FILE_AGE": {
"record_in_processes": ["main"],
"products": ["firefox", "fennec"],
"alert_emails": ["jrediger@mozilla.com", "telemetry-client-dev@mozilla.com"],
"bug_numbers": [1458574],
"expires_in_version": "65",
"high": 1500,
"n_buckets": 20,
"kind": "exponential",
"description": "Age of files scanned in profile directory in days when determining initial profile age."
},
"QUIRKS_MODE": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec"],

Просмотреть файл

@ -3197,40 +3197,6 @@ telemetry:
record_in_processes:
- 'all'
profile_directory_scans:
bug_numbers:
- 1458574
description: >
The number of times a profile directory scan was initiated in ProfileAge.jsm
expires: "65"
kind: uint
notification_emails:
- jrediger@mozilla.com
- telemetry-client-dev@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
- 'fennec'
record_in_processes:
- 'all'
profile_directory_scan_date:
bug_numbers:
- 1466518
description: >
The date of the profile scan to determine the profile creation date from the oldest file, in days since UNIX epoch.
expires: "65"
kind: uint
notification_emails:
- jrediger@mozilla.com
- telemetry-client-dev@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
- 'fennec'
record_in_processes:
- 'main'
data_upload_optin:
bug_numbers:
- 1445921

Просмотреть файл

@ -6,10 +6,6 @@
var EXPORTED_SYMBOLS = ["ProfileAge"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { TelemetryUtils } = ChromeUtils.import(
"resource://gre/modules/TelemetryUtils.jsm"
);
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
const { Log } = ChromeUtils.import("resource://gre/modules/Log.jsm");
const { CommonUtils } = ChromeUtils.import(
@ -18,16 +14,6 @@ const { CommonUtils } = ChromeUtils.import(
const FILE_TIMES = "times.json";
/**
* Calculate how many days passed between two dates.
* @param {Object} aStartDate The starting date.
* @param {Object} aEndDate The ending date.
* @return {Integer} The number of days between the two dates.
*/
function getElapsedTimeInDays(aStartDate, aEndDate) {
return TelemetryUtils.millisecondsToDays(aEndDate - aStartDate);
}
/**
* Traverse the contents of the profile directory, finding the oldest file
* and returning its creation timestamp.
@ -43,11 +29,6 @@ async function getOldestProfileTimestamp(profilePath, log) {
);
}
Services.telemetry.scalarAdd("telemetry.profile_directory_scans", 1);
let histogram = Services.telemetry.getHistogramById(
"PROFILE_DIRECTORY_FILE_AGE"
);
try {
await iterator.forEach(async entry => {
try {
@ -67,11 +48,6 @@ async function getOldestProfileTimestamp(profilePath, log) {
if (date) {
let timestamp = date.getTime();
// Get the age relative to now.
// We don't care about dates in the future.
let age_in_days = Math.max(0, getElapsedTimeInDays(timestamp, start));
histogram.add(age_in_days);
log.debug("Using date: " + entry.path + " = " + date);
if (timestamp < oldest) {
oldest = timestamp;
@ -164,10 +140,6 @@ class ProfileAgeImpl {
async computeAndPersistCreated() {
let oldest = await getOldestProfileTimestamp(this.profilePath, this._log);
this._times.created = oldest;
Services.telemetry.scalarSet(
"telemetry.profile_directory_scan_date",
TelemetryUtils.millisecondsToDays(Date.now())
);
await this.writeTimes();
return oldest;
}