Bug 770874 - Removed the STARTUP_USING_PRELOAD_TRIAL telemetry histogram code. r=taras

This commit is contained in:
Brian R. Bondy 2012-07-08 21:54:10 -04:00
parent 8e0eba9784
commit 32f868ff3d
2 changed files with 4 additions and 37 deletions

View File

@ -240,40 +240,13 @@ int main(int argc, char* argv[])
struct rusage initialRUsage;
gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage);
#elif defined(XP_WIN)
// Don't change the order of these enumeration constants, the order matters
// for reporting telemetry data. If new values are added adjust the
// STARTUP_USING_PRELOAD_TRIAL histogram.
enum PreloadType{ PREFETCH_PRELOAD,
PREFETCH_NO_PRELOAD,
NO_PREFETCH_PRELOAD,
NO_PREFETCH_NO_PRELOAD };
PreloadType preloadType;
IO_COUNTERS ioCounters;
gotCounters = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
srand(time(NULL));
bool shouldUsePreload = rand() % 2 == 0;
if (IsPrefetchDisabledViaService()) {
if (shouldUsePreload) {
preloadType = NO_PREFETCH_PRELOAD;
} else {
preloadType = NO_PREFETCH_NO_PRELOAD;
}
} else {
if (shouldUsePreload) {
preloadType = PREFETCH_PRELOAD;
} else {
preloadType = PREFETCH_NO_PRELOAD;
}
}
if (shouldUsePreload)
#endif
{
XPCOMGlueEnablePreload();
}
#if !defined(XP_WIN)
XPCOMGlueEnablePreload();
#endif
rv = XPCOMGlueStartup(exePath);
if (NS_FAILED(rv)) {
@ -295,11 +268,6 @@ int main(int argc, char* argv[])
XRE_SetupDllBlocklist();
#endif
#if defined(XP_WIN)
XRE_TelemetryAccumulate(mozilla::Telemetry::STARTUP_USING_PRELOAD_TRIAL,
preloadType);
#endif
if (gotCounters) {
#if defined(XP_WIN)
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_OPS,

View File

@ -85,7 +85,6 @@ HISTOGRAM(EARLY_GLUESTARTUP_READ_OPS, 1, 100, 12, LINEAR, "ProcessIoCounters.Rea
HISTOGRAM(EARLY_GLUESTARTUP_READ_TRANSFER, 1, 50 * 1024, 12, EXPONENTIAL, "ProcessIoCounters.ReadTransferCount before glue startup (KB)")
HISTOGRAM(GLUESTARTUP_READ_OPS, 1, 100, 12, LINEAR, "ProcessIoCounters.ReadOperationCount after glue startup")
HISTOGRAM(GLUESTARTUP_READ_TRANSFER, 1, 50 * 1024, 12, EXPONENTIAL, "ProcessIoCounters.ReadTransferCount after glue startup (KB)")
HISTOGRAM(STARTUP_USING_PRELOAD_TRIAL, 1, 3, 4, LINEAR, "Preload heuristic. 0: prefetch, preload, 1: prefetch, no preload, 2: no prefetch, preload, 3: no prefetch, no preload")
#elif defined(XP_UNIX)
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")