[go: up one dir, main page]

webrtc-internals: include blacklisted standard stats in the dump

include RTCIceCandidate and other stats blacklisted for display in the webrtc-internals dump.

Test plan:
- make a call while having webrtc-internals open
- download dump
- search dump for RTCIceCandidate stats
- import on https://fippo.github.io/webrtc-dump-importer/, check reconstructed stats

BUG=968953

(cherry picked from commit 3168f20344e7d3af15cf85c35725e5682b4e3835)

Change-Id: If316774777b073f2c97a3437d01c471e1536efde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639417
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#668792}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663497
Cr-Commit-Position: refs/branch-heads/3809@{#403}
Cr-Branched-From: d82dec1a818f378c464ba307ddd9c92133eac355-refs/heads/master@{#665002}
diff --git a/content/browser/resources/media/stats_graph_helper.js b/content/browser/resources/media/stats_graph_helper.js
index b8e0d3a..46271ff3 100644
--- a/content/browser/resources/media/stats_graph_helper.js
+++ b/content/browser/resources/media/stats_graph_helper.js
@@ -168,9 +168,6 @@
   if (!stats || !stats.values) {
     return;
   }
-  if (!isLegacyReport && isStandardReportBlacklisted(report)) {
-    return;
-  }
 
   const childrenBefore = peerConnectionElement.hasChildNodes() ?
       Array.from(peerConnectionElement.childNodes) :
@@ -178,10 +175,6 @@
 
   for (var i = 0; i < stats.values.length - 1; i = i + 2) {
     var rawLabel = stats.values[i];
-    if (!isLegacyReport && isStandardStatBlacklisted(report, rawLabel)) {
-      continue;
-    }
-
     // Propagation deltas are handled separately.
     if (rawLabel == RECEIVED_PROPAGATION_DELTA_LABEL) {
       drawReceivedPropagationDelta(
@@ -198,7 +191,6 @@
           [stats.values[i + 1]]);
       continue;
     }
-
     var finalDataSeriesId = rawDataSeriesId;
     var finalLabel = rawLabel;
     var finalValue = rawValue;
@@ -223,6 +215,14 @@
         peerConnectionElement, finalDataSeriesId, finalLabel, [stats.timestamp],
         [finalValue]);
 
+    if (!isLegacyReport &&
+        (isStandardReportBlacklisted(report) ||
+         isStandardStatBlacklisted(report, rawLabel))) {
+      // We do not want to draw certain standard reports but still want to
+      // record them in the data series.
+      continue;
+    }
+
     // Updates the graph.
     var graphType =
         bweCompoundGraphConfig[finalLabel] ? 'bweCompound' : finalLabel;