Bug 666307 - update zip telemetry r=mwu

This commit is contained in:
Taras Glek 2011-06-22 10:24:17 -07:00
parent 49a7ea7d95
commit 50f827a6a6
3 changed files with 7 additions and 12 deletions

View File

@ -71,7 +71,6 @@ XPIDLSRCS = $(MODULES_LIBJAR_LXPIDLSRCS)
EXPORTS = $(MODULES_LIBJAR_LEXPORTS)
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DZLIB_DLL=1

View File

@ -50,7 +50,6 @@
*/
#define READTYPE PRInt32
#include "base/basictypes.h"
#include "zlib.h"
#include "nsISupportsUtils.h"
#include "nsRecyclingAllocator.h"
@ -66,9 +65,7 @@
#if defined(XP_WIN)
#include <windows.h>
#endif
#include "base/histogram.h"
#include "base/logging.h"
#include "mozilla/Telemetry.h"
/**
* Global allocator used with zlib. Destroyed in module shutdown.
@ -1081,12 +1078,10 @@ nsZipItemPtr_base::nsZipItemPtr_base(nsZipArchive *aZip, const char * aEntryName
mAutoBuf = new PRUint8[size];
}
const char kCRCHistogram[] = "nsZipItemPtr CRC Match";
nsZipCursor cursor(item, aZip, mAutoBuf, size, doCRC);
mReturnBuf = cursor.Read(&mReadlen);
if (!mReturnBuf) {
UMA_HISTOGRAM_BOOLEAN(kCRCHistogram, false);
Telemetry::Accumulate(Telemetry::ZIPARCHIVE_CRC, false);
return;
}
@ -1096,5 +1091,5 @@ nsZipItemPtr_base::nsZipItemPtr_base(nsZipArchive *aZip, const char * aEntryName
return;
}
UMA_HISTOGRAM_BOOLEAN(kCRCHistogram, true);
Telemetry::Accumulate(Telemetry::ZIPARCHIVE_CRC, true);
}

View File

@ -37,9 +37,9 @@
* ***** END LICENSE BLOCK ***** */
/**
* This file lists Telemetry histograms collected by Firefox.
* Format is HISTOGRAM(id, histogram name, minium, maximum, bucket count,
* histogram kind, human-readable description for about:telemetry)
* This file lists Telemetry histograms collected by Firefox. Format
* is HISTOGRAM(id, minium, maximum, bucket count, histogram kind,
* human-readable description for about:telemetry)
*/
HISTOGRAM(CYCLE_COLLECTOR, 1, 10000, 50, EXPONENTIAL, "Time(ms) spent on cycle collection")
@ -57,3 +57,4 @@ HISTOGRAM(GLUESTARTUP_READ_TRANSFER, 1, 50 * 1024, 12, EXPONENTIAL, "ProcessIoCo
HISTOGRAM(EARLY_GLUESTARTUP_HARD_FAULTS, 1, 100, 12, LINEAR, "Hard faults count before glue startup")
HISTOGRAM(GLUESTARTUP_HARD_FAULTS, 1, 500, 12, EXPONENTIAL, "Hard faults count after glue startup")
#endif
HISTOGRAM(ZIPARCHIVE_CRC, 0, 1, 2, BOOLEAN, "Zip item CRC check pass")