Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: webrtc/pc/rtcstatscollector.cc

Issue 2975793002: Trace stats in RTCStatsCollector. (Closed)
Patch Set: Address Henrik's comments. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/rtcstatscollector.cc
diff --git a/webrtc/pc/rtcstatscollector.cc b/webrtc/pc/rtcstatscollector.cc
index f5b8c8a936c1b569826ff20d98741e62ddb5e550..229213c63ac4f68d2a550d2c5b031a1079337be8 100644
--- a/webrtc/pc/rtcstatscollector.cc
+++ b/webrtc/pc/rtcstatscollector.cc
@@ -25,6 +25,7 @@
#include "webrtc/pc/webrtcsession.h"
#include "webrtc/rtc_base/checks.h"
#include "webrtc/rtc_base/timeutils.h"
+#include "webrtc/rtc_base/trace_event.h"
namespace webrtc {
@@ -751,6 +752,15 @@ void RTCStatsCollector::AddPartialResults_s(
channel_name_pairs_.reset();
track_media_info_map_.reset();
track_to_id_.clear();
+ for (const RTCStats& stats : *cached_report_) {
+ for (const RTCStatsMemberInterface* member : stats.Members()) {
+ if (member->is_defined()) {
+ TRACE_EVENT_INSTANT2("webrtc_stats", member->name(),
+ "value", member->ValueToString(),
+ stats.type(), stats.id());
hbos 2017/07/12 11:26:51 I think stats name might be wrong to have as trace
ehmaldonado_webrtc 2017/07/12 12:45:51 Right. Done.
+ }
+ }
+ }
DeliverCachedReport();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698