Bug 1336865 - Add telemetry to measure time spent on constructing variable-length prefix set. r=francois

MozReview-Commit-ID: CNhfYdH1ryA

--HG--
extra : rebase_source : 717724804d24d1396c8bd3d212e01c8a8a807be1
This commit is contained in:
dimi 2017-02-07 16:14:58 +08:00
parent 6aef23a1fd
commit d2bf537dff
2 changed files with 11 additions and 0 deletions

View File

@ -4034,6 +4034,15 @@
"bug_numbers": [1283007],
"description": "Time spent fallocating Variable-Length PrefixSet (ms)"
},
"URLCLASSIFIER_VLPS_CONSTRUCT_TIME": {
"alert_emails": ["safebrowsing-telemetry@mozilla.org"],
"expires_in_version": "60",
"kind": "exponential",
"high": 5000,
"n_buckets": 15,
"bug_numbers": [1336865],
"description": "Time spent constructing Variable-Length PrefixSet from file (ms)"
},
"URLCLASSIFIER_VLPS_LOAD_CORRUPT": {
"alert_emails": ["safebrowsing-telemetry@mozilla.org"],
"expires_in_version": "58",

View File

@ -120,6 +120,8 @@ LookupCacheV4::IsHashEntryConfirmed(const Completion& aEntry,
nsresult
LookupCacheV4::Build(PrefixStringMap& aPrefixMap)
{
Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_VLPS_CONSTRUCT_TIME> timer;
return mVLPrefixSet->SetPrefixes(aPrefixMap);
}