зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 02fddd4b2fe1 (bug 1322523) for bustage in telemtry. r=backout
This commit is contained in:
Родитель
0818e4ae84
Коммит
53a08c5a24
|
@ -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"],
|
||||
|
|
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче