Bug 1238420 - Report mp4parse-rust errors via Telemetry. r=rillian,vladan
authorMatthew Gregan <kinetik@flim.org>
Sun, 10 Jan 2016 20:54:00 +1300
changeset 280340 33b4a7fd0c53d0034fbc00306fd460207e1ca094
parent 280339 6dd565cb21a224657b2211efaea485ec8df7819c
child 280341 10e7bf5884cf0f6d5e0036711c1716ed26c9cd30
push id70402
push usermgregan@mozilla.com
push dateSun, 17 Jan 2016 22:49:41 +0000
treeherdermozilla-inbound@33b4a7fd0c53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian, vladan
bugs1238420
milestone46.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 1238420 - Report mp4parse-rust errors via Telemetry. r=rillian,vladan
media/libstagefright/binding/MP4Metadata.cpp
toolkit/components/telemetry/Histograms.json
--- a/media/libstagefright/binding/MP4Metadata.cpp
+++ b/media/libstagefright/binding/MP4Metadata.cpp
@@ -138,16 +138,20 @@ MP4Metadata::GetNumberTracks(mozilla::Tr
 {
 #ifdef MOZ_RUST_MP4PARSE
   static LazyLogModule sLog("MP4Metadata");
   // Try in rust first.
   mRustState.reset(mp4parse_new());
   int32_t rust_mp4parse_success = try_rust(mRustState, mSource);
   Telemetry::Accumulate(Telemetry::MEDIA_RUST_MP4PARSE_SUCCESS,
                         rust_mp4parse_success == 0);
+  if (rust_mp4parse_success < 0) {
+    Telemetry::Accumulate(Telemetry::MEDIA_RUST_MP4PARSE_ERROR_CODE,
+                          -rust_mp4parse_success);
+  }
   uint32_t rust_tracks = mp4parse_get_track_count(mRustState.get());
   MOZ_LOG(sLog, LogLevel::Info, ("rust parser found %u tracks", rust_tracks));
 #endif
   size_t tracks = mPrivate->mMetadataExtractor->countTracks();
   uint32_t total = 0;
   for (size_t i = 0; i < tracks; i++) {
     sp<MetaData> metaData = mPrivate->mMetadataExtractor->getTrackMetaData(i);
 
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -6027,21 +6027,32 @@
   "DEVTOOLS_DEBUGGER_RDP_REMOTE_RECONFIGURETHREAD_MS": {
     "expires_in_version": "never",
     "kind": "exponential",
     "high": "10000",
     "n_buckets": "1000",
     "description": "The time (in milliseconds) that it took a 'reconfigure thread' request to go round trip."
   },
   "MEDIA_RUST_MP4PARSE_SUCCESS": {
+    "alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
     "expires_in_version": "50",
     "kind": "boolean",
+    "bug_numbers": [1220885],
     "description": "(Bug 1220885) Whether the rust mp4 demuxer successfully parsed a stream segment.",
     "cpp_guard": "MOZ_RUST_MP4PARSE"
   },
+  "MEDIA_RUST_MP4PARSE_ERROR_CODE": {
+    "alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
+    "expires_in_version": "50",
+    "kind": "enumerated",
+    "n_values": 32,
+    "bug_numbers": [1238420],
+    "description": "The error code reported when an MP4 parse attempt has failed.",
+    "cpp_guard": "MOZ_RUST_MP4PARSE"
+  },
   "MEDIA_RUST_MP4PARSE_TRACK_MATCH_AUDIO": {
     "alert_emails": ["giles@mozilla.com", "kinetik@flim.org"],
     "expires_in_version": "50",
     "kind": "boolean",
     "bug_numbers": [1231169],
     "description": "Whether rust and stagefight mp4 parser audio track results match.",
     "cpp_guard": "MOZ_RUST_MP4PARSE"
   },