Remove all C++ Telemetry Accumulation calls.

This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables).
Stub resolution/removal should be a follow-up to this.
This commit is contained in:
wolfbeast 2018-09-03 10:11:38 +02:00 • committed by Roy Tam
commit 8c8145e620
186 changed files with 48 additions and 2957 deletions

View file

@ -30,7 +30,6 @@
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/Atomics.h"
#include "mozilla/CycleCollectedJSContext.h"
#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/asmjscache/AsmJSCache.h"
#include "mozilla/dom/AtomList.h"
@ -1534,7 +1533,6 @@ RuntimeService::RegisterWorker(WorkerPrivate* aWorkerPrivate)
const bool isDedicatedWorker = aWorkerPrivate->IsDedicatedWorker();
if (isServiceWorker) {
AssertIsOnMainThread();
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_SPAWN_ATTEMPTS, 1);
}
nsCString sharedWorkerScriptSpec;
@ -1586,14 +1584,6 @@ RuntimeService::RegisterWorker(WorkerPrivate* aWorkerPrivate)
// Worker spawn gets queued due to hitting max workers per domain
// limit so let's log a warning.
WorkerPrivate::ReportErrorToConsole("HittingMaxWorkersPerDomain2");
if (isServiceWorker) {
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_SPAWN_GETS_QUEUED, 1);
} else if (isSharedWorker) {
Telemetry::Accumulate(Telemetry::SHARED_WORKER_SPAWN_GETS_QUEUED, 1);
} else if (isDedicatedWorker) {
Telemetry::Accumulate(Telemetry::DEDICATED_WORKER_SPAWN_GETS_QUEUED, 1);
}
}
else if (parent) {
domainInfo->mChildWorkerCount++;
@ -1669,7 +1659,6 @@ RuntimeService::RegisterWorker(WorkerPrivate* aWorkerPrivate)
if (isServiceWorker) {
AssertIsOnMainThread();
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_WAS_SPAWNED, 1);
}
return true;
}
@ -1766,8 +1755,6 @@ RuntimeService::UnregisterWorker(WorkerPrivate* aWorkerPrivate)
if (aWorkerPrivate->IsServiceWorker()) {
AssertIsOnMainThread();
Telemetry::AccumulateTimeDelta(Telemetry::SERVICE_WORKER_LIFE_TIME,
aWorkerPrivate->CreationTimeStamp());
}
if (aWorkerPrivate->IsSharedWorker() ||

View file

@ -33,7 +33,6 @@
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/ErrorNames.h"
#include "mozilla/LoadContext.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/DOMError.h"
@ -676,7 +675,6 @@ ServiceWorkerManager::Register(mozIDOMWindow* aWindow,
queue->ScheduleJob(job);
AssertIsOnMainThread();
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_REGISTRATIONS, 1);
promise.forget(aPromise);
return NS_OK;
@ -2180,7 +2178,6 @@ ServiceWorkerManager::StartControllingADocument(ServiceWorkerRegistrationInfo* a
if (!aDocumentId.IsEmpty()) {
aDoc->SetId(aDocumentId);
}
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1);
}
void

View file

@ -135,9 +135,6 @@ ServiceWorkerRegistrar::GetRegistrations(
if (firstTime) {
firstTime = false;
Telemetry::AccumulateTimeDelta(
Telemetry::SERVICE_WORKER_REGISTRATION_LOADING,
startTime);
}
}

View file

@ -408,8 +408,6 @@ ServiceWorkerUpdateJob::ComparisonResult(nsresult aStatus,
return;
}
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_UPDATED, 1);
// Begin step 7 of the Update algorithm to evaluate the new script.
RefPtr<ServiceWorkerInfo> sw =

View file

@ -12,7 +12,6 @@
#include "mozilla/Preferences.h"
#include "mozilla/dom/MessagePort.h"
#include "mozilla/dom/SharedWorkerBinding.h"
#include "mozilla/Telemetry.h"
#include "nsContentUtils.h"
#include "nsIClassInfoImpl.h"
#include "nsIDOMEvent.h"
@ -73,8 +72,6 @@ SharedWorker::Constructor(const GlobalObject& aGlobal, JSContext* aCx,
return nullptr;
}
Telemetry::Accumulate(Telemetry::SHARED_WORKER_COUNT, 1);
return sharedWorker.forget();
}

View file

@ -15,7 +15,6 @@
#include "mozilla/DebugOnly.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/Telemetry.h"
#include "js/RootingAPI.h"
#include "js/Value.h"
@ -572,8 +571,6 @@ WorkerMainThreadRunnable::Dispatch(Status aFailStatus, ErrorResult& aRv)
{
mWorkerPrivate->AssertIsOnWorkerThread();
TimeStamp startTime = TimeStamp::NowLoRes();
AutoSyncLoopHolder syncLoop(mWorkerPrivate, aFailStatus);
mSyncLoopTarget = syncLoop.GetEventTarget();
@ -590,11 +587,6 @@ WorkerMainThreadRunnable::Dispatch(Status aFailStatus, ErrorResult& aRv)
if (!syncLoop.Run()) {
aRv.ThrowUncatchableException();
}
Telemetry::Accumulate(Telemetry::SYNC_WORKER_OPERATION, mTelemetryKey,
static_cast<uint32_t>((TimeStamp::NowLoRes() - startTime)
.ToMilliseconds()));
Unused << startTime; // Shut the compiler up.
}
NS_IMETHODIMP