From 53a08c5a24e3cb445d8eba9e1af2bfe7f69fdc1c Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Sat, 13 May 2017 19:24:39 +0200 Subject: [PATCH] Backed out changeset 02fddd4b2fe1 (bug 1322523) for bustage in telemtry. r=backout --- toolkit/components/telemetry/Histograms.json | 8 -------- toolkit/components/url-classifier/HashStore.cpp | 15 ++------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 9476719ce125..fa5bde52d19a 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -4817,14 +4817,6 @@ "bug_numbers": [1305581], "description": "Whether or not a variable-length prefix set loaded from disk is corrupted (true = file corrupted)." }, - "URLCLASSIFIER_VLPS_LONG_PREFIXES": { - "alert_emails": ["safebrowsing-telemetry@mozilla.org"], - "expires_in_version": "61", - "kind": "enumerated", - "n_values": 32, - "bug_numbers": [1322523], - "description": "Length of the first 20 long prefixes (> 4 bytes) received in a Safe Browsing V4 table during an update." - }, "URLCLASSIFIER_LC_PREFIXES": { "record_in_processes": ["main", "content"], "alert_emails": ["safebrowsing-telemetry@mozilla.org"], diff --git a/toolkit/components/url-classifier/HashStore.cpp b/toolkit/components/url-classifier/HashStore.cpp index 7d926c7cd8c4..69013cf31344 100644 --- a/toolkit/components/url-classifier/HashStore.cpp +++ b/toolkit/components/url-classifier/HashStore.cpp @@ -42,7 +42,6 @@ #include "zlib.h" #include "Classifier.h" #include "nsUrlClassifierDBService.h" -#include "mozilla/Telemetry.h" // Main store for SafeBrowsing protocol data. We store // known add/sub chunks, prefixes and completions in memory @@ -153,21 +152,11 @@ TableUpdateV2::NewSubComplete(uint32_t aAddChunk, const Completion& aHash, uint3 void TableUpdateV4::NewPrefixes(int32_t aSize, std::string& aPrefixes) { - NS_ENSURE_TRUE_VOID(aSize >= 4 && aSize <= COMPLETE_SIZE); NS_ENSURE_TRUE_VOID(aPrefixes.size() % aSize == 0); NS_ENSURE_TRUE_VOID(!mPrefixesMap.Get(aSize)); - int numOfPrefixes = aPrefixes.size() / aSize; - - if (aSize > 4) { - // TODO Bug 1364043 we may have a better API to record multiple samples into - // histograms with one call -#ifdef NIGHTLY_BUILD - for (int i = 0; i < std::min(20, numOfPrefixes); i++) { - Telemetry::Accumulate(Telemetry::URLCLASSIFIER_VLPS_LONG_PREFIXES, aSize); - } -#endif - } else if (LOG_ENABLED()) { + if (LOG_ENABLED() && 4 == aSize) { + int numOfPrefixes = aPrefixes.size() / 4; uint32_t* p = (uint32_t*)aPrefixes.c_str(); // Dump the first/last 10 fixed-length prefixes for debugging.