Bug 1230265 - Add VP9 benchmark telemetry; r=bsmedberg a=ritu
authorAnthony Jones <ajones@mozilla.com>
Thu, 03 Mar 2016 16:23:19 +1300
changeset 325617 8ea687a1945c262c544522477d866232862f2ae1
parent 325616 4e5aa8d948fc7ea01db1b3d1fd5b0bf96c155978
child 325618 921e6142e8b9f40fd475efa934dc5136fa39faf0
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, ritu
bugs1230265
milestone47.0a2
Bug 1230265 - Add VP9 benchmark telemetry; r=bsmedberg a=ritu MozReview-Commit-ID: 6ofvNqvkg0U
dom/media/Benchmark.cpp
toolkit/components/telemetry/Histograms.json
--- a/dom/media/Benchmark.cpp
+++ b/dom/media/Benchmark.cpp
@@ -6,16 +6,17 @@
 
 #include "Benchmark.h"
 #include "DecoderTraits.h"
 #include "PDMFactory.h"
 #include "WebMDemuxer.h"
 #include "BufferMediaResource.h"
 #include "WebMSample.h"
 #include "mozilla/Preferences.h"
+#include "mozilla/Telemetry.h"
 
 namespace mozilla {
 
 const char* Benchmark::sBenchmarkFpsPref = "media.benchmark.fps";
 bool Benchmark::sHasRunTest = false;
 
 const uint32_t BenchmarkDecoder::sStartupFrames = 1;
 
@@ -56,16 +57,17 @@ Benchmark::Benchmark()
 }
 
 void
 Benchmark::SaveResult(uint32_t aDecodeFps)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   Preferences::SetUint(sBenchmarkFpsPref, aDecodeFps);
+  Telemetry::Accumulate(Telemetry::ID::VIDEO_VP9_BENCHMARK_FPS, aDecodeFps);
 }
 
 void
 Benchmark::Drain(RefPtr<MediaDataDecoder> aDecoder)
 {
   RefPtr<Benchmark> self = this;
   mPlaybackState.Dispatch(NS_NewRunnableFunction([self, aDecoder]() {
     self->mPlaybackState.Drain(aDecoder);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -8755,16 +8755,26 @@
   "VIDEO_OPENH264_GMP_MISSING_FILES": {
     "alert_emails": ["cpearce@mozilla.com", "rjesup@mozilla.com"],
     "expires_in_version": "50",
     "kind": "enumerated",
     "n_values" : 4,
     "description": "OpenH264 GMP files missing (0=none, or sum of: 1=library, 2=info)",
     "releaseChannelCollection": "opt-out"
   },
+  "VIDEO_VP9_BENCHMARK_FPS": {
+    "alert_emails": ["ajones@mozilla.com"],
+    "expires_in_version": "50",
+    "bug_numbers": [1230265],
+    "kind": "linear",
+    "high": 1000,
+    "n_buckets": 100,
+    "description": "720p VP9 decode benchmark measurement in frames per second",
+    "releaseChannelCollection": "opt-out"
+  },
   "MEDIA_CODEC_USED": {
     "alert_emails": ["cpearce@mozilla.com"],
     "expires_in_version": "never",
     "keyed": true,
     "kind": "count",
     "description": "Count of use of audio/video codecs in HTMLMediaElements and WebAudio. Those with 'resource' prefix are approximate; report based on HTTP ContentType or sniffing. Those with 'webaudio' prefix are for WebAudio."
   },
   "FX_SANITIZE_TOTAL": {