Bug 1124392 - Telemetry: Record the number of passwords per hostname. r=MattN

--HG--
extra : rebase_source : 16de4b58ca570ed7ad328ddc5806eba0a509d9e7
This commit is contained in:
Chenxia Liu 2015-02-02 12:51:48 -08:00
Родитель b81485ebec
Коммит 92399a3f06
2 изменённых файлов: 16 добавлений и 0 удалений

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

@ -253,9 +253,13 @@ LoginManager.prototype = {
let usernamePresentHistogram = clearAndGetHistogram("PWMGR_USERNAME_PRESENT");
let loginLastUsedDaysHistogram = clearAndGetHistogram("PWMGR_LOGIN_LAST_USED_DAYS");
let hostnameCount = new Map();
for (let login of logins) {
usernamePresentHistogram.add(!!login.username);
let hostname = login.hostname;
hostnameCount.set(hostname, (hostnameCount.get(hostname) || 0 ) + 1);
login.QueryInterface(Ci.nsILoginMetaInfo);
let timeLastUsedAgeMs = referenceTimeMs - login.timeLastUsed;
if (timeLastUsedAgeMs > 0) {
@ -264,6 +268,11 @@ LoginManager.prototype = {
);
}
}
let passwordsCountHistogram = clearAndGetHistogram("PWMGR_NUM_PASSWORDS_PER_HOSTNAME");
for (let count of hostnameCount.values()) {
passwordsCountHistogram.add(count);
}
},

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

@ -7288,6 +7288,13 @@
"extended_statistics_ok": true,
"description": "The number of sites for which the user has explicitly rejected saving logins"
},
"PWMGR_NUM_PASSWORDS_PER_HOSTNAME": {
"expires_in_version": "never",
"kind": "linear",
"high": 21,
"n_buckets" : 20,
"description": "The number of passwords per hostname"
},
"PWMGR_NUM_SAVED_PASSWORDS": {
"expires_in_version": "never",
"kind": "exponential",