[webrtc-internals] Allow multiple calculated metrics in StatsReport.

Calculated metrics are metrics added in chrome://webrtc-internals/ that
did not exist in the original RTCStatsReport. For example, the original
report contains "framesReceived", but will have the associated
calculated metrics "[framesReceived/s]". The association between the
original and the derived metric allows chrome://webrtc-internals/ to
list the calculated metrics of the Stats Tables and Stats Graphs next to
the original metric (for readability).

Prior to this CL, a metric could have at most one associated calculated
metric. After this CL, a metric can have a list of associated calculated
metrics.

This unblocks adding "[framesReceived-framesDecoded]" (in addition to
"[framesReceived/s]") in a follow-up CL.

// Already reviewed by kron@
TBR=guidou@chromium.org

Bug: chromium:990318
Change-Id: Ie210211fd355513ec7978eea7829780d6daa977a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1755743
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687597}
1 file changed