Bug 1272066 - Add telemetry for sync worker runnables, r=bkelly
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 25 Oct 2016 15:39:30 +0200
changeset 362246 5a794352cf9c04ef8e2cd2aeb8c6589c9f4082e6
parent 362245 70934a19312e01a66f2087fde2ed51cd552a523c
child 362247 4b670be24e6d913c728752578dfab3e198c5de23
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1272066
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1272066 - Add telemetry for sync worker runnables, r=bkelly
dom/workers/WorkerRunnable.cpp
--- a/dom/workers/WorkerRunnable.cpp
+++ b/dom/workers/WorkerRunnable.cpp
@@ -582,20 +582,19 @@ WorkerMainThreadRunnable::Dispatch(Error
   DebugOnly<nsresult> rv = mWorkerPrivate->DispatchToMainThread(this);
   MOZ_ASSERT(NS_SUCCEEDED(rv),
              "Should only fail after xpcom-shutdown-threads and we're gone by then");
 
   if (!syncLoop.Run()) {
     aRv.ThrowUncatchableException();
   }
 
-  // Telemetry is apparently not threadsafe
-  // Telemetry::Accumulate(Telemetry::SYNC_WORKER_OPERATION, mTelemetryKey,
-  //                       static_cast<uint32_t>((TimeStamp::NowLoRes() - startTime)
-  //                                               .ToMilliseconds()));
+  Telemetry::Accumulate(Telemetry::SYNC_WORKER_OPERATION, mTelemetryKey,
+                        static_cast<uint32_t>((TimeStamp::NowLoRes() - startTime)
+                                                .ToMilliseconds()));
   Unused << startTime; // Shut the compiler up.
 }
 
 NS_IMETHODIMP
 WorkerMainThreadRunnable::Run()
 {
   AssertIsOnMainThread();