Commit 7e153bfe authored by Philipp Hancke's avatar Philipp Hancke Committed by Commit Bot

webrtc-internals: mark non-standard stats with an asterisk

webrtc-internals shows some of the the provisional stats which are not exposed
to getStats. This is confusing when comparing the results, hence mark them and
explain how they are marked. Drive-by: explain that [] are calculated.

BUG=chromium:678292

Change-Id: Ide9d3b24fec6c8b57f2f982e42f93800c209f3e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461339Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#815595}
parent 0c262f75
......@@ -146,6 +146,13 @@ function createStatsSelectionOptionElements() {
p.appendChild(document.createTextNode('Read Stats From: '));
p.appendChild(selectElement);
const statsDocumentation = document.createElement('p');
statsDocumentation.appendChild(
document.createTextNode('Note: computed stats are in []. ' +
'Experimental stats are marked with an * at the end.'));
p.appendChild(statsDocumentation);
return p;
}
......
......@@ -618,7 +618,10 @@ class InternalStandardStatsObserver : public webrtc::RTCStatsCollectorCallback {
for (const auto* member : stats.Members()) {
if (!member->is_defined())
continue;
name_value_pairs->AppendString(member->name());
// Non-standardized / provisional stats which are not exposed
// to Javascript are postfixed with an asterisk.
std::string postfix = member->is_standardized() ? "" : "*";
name_value_pairs->AppendString(member->name() + postfix);
name_value_pairs->Append(MemberToValue(*member));
}
stats_subdictionary->Set("values", std::move(name_value_pairs));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment