Bug 811461. Switch IMAGE_DECODE_LATENCY to microseconds. r=taras
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 13 Nov 2012 15:38:54 -0800
changeset 117795 6f434302bff32b1fb1bd7bb6d6e91e1d1749a3e8
parent 117794 2fd71029eaa2e5a402b22d3f7d8169594c5dd644
child 117796 cc210f0643e120dff0c4d5a6f9e24a80d52c843a
push idunknown
push userunknown
push dateunknown
reviewerstaras
bugs811461
milestone19.0a1
Bug 811461. Switch IMAGE_DECODE_LATENCY to microseconds. r=taras Currently this is recording in ms when we expect all of the values to be <5ms I believe this was just a typo.
image/src/RasterImage.cpp
toolkit/components/telemetry/Histograms.json
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -3388,18 +3388,18 @@ RasterImage::DecodeWorker::Run()
 
   } while ((TimeStamp::Now() - eventStart).ToMilliseconds() <= gMaxMSBeforeYield);
 
   // If decode requests are pending, re-post ourself to the event loop.
   if (!mASAPDecodeRequests.isEmpty() || !mNormalDecodeRequests.isEmpty()) {
     EnsurePendingInEventLoop();
   }
 
-  Telemetry::Accumulate(Telemetry::IMAGE_DECODE_LATENCY,
-                        uint32_t((TimeStamp::Now() - eventStart).ToMilliseconds()));
+  Telemetry::Accumulate(Telemetry::IMAGE_DECODE_LATENCY_US,
+                        uint32_t((TimeStamp::Now() - eventStart).ToMicroseconds()));
 
   return NS_OK;
 }
 
 nsresult
 RasterImage::DecodeWorker::DecodeUntilSizeAvailable(RasterImage* aImg)
 {
   return DecodeSomeOfImage(aImg, DECODE_TYPE_UNTIL_SIZE);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -452,17 +452,17 @@
   "BAD_FALLBACK_FONT": {
     "kind": "boolean",
     "description": "system fallback font can't be used"
   },
   "SHUTDOWN_OK": {
     "kind": "boolean",
     "description": "Did the browser start after a successful shutdown"
   },
-  "IMAGE_DECODE_LATENCY": {
+  "IMAGE_DECODE_LATENCY_US": {
     "kind": "exponential",
     "low": 50,
     "high": "5000000",
     "n_buckets": 100,
     "description": "Time spent decoding an image chunk (us)"
   },
   "IMAGE_DECODE_TIME": {
     "kind": "exponential",