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

Unified Diff: webrtc/pc/rtcstatscollector.cc

Issue 2975793002: Trace stats in RTCStatsCollector. (Closed)
Patch Set: Include dict name in the trace name. 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..4aa7ecb48ef255b1d675be3217998dce0bbe2208 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,17 @@ 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()) {
+ std::ostringstream trace_name;
+ trace_name << stats.type() << '.' << member->ValueToString();
hbos 2017/07/12 13:01:15 If you place this in a helper function that is onl
ehmaldonado_webrtc 2017/07/12 13:23:30 Done. I don't know how it's decided, there are sev
+ TRACE_EVENT_INSTANT2("webrtc_stats", trace_name.str().c_str(),
+ "value", member->ValueToString(),
+ "id", stats.id());
hbos 2017/07/12 13:01:15 Does the order of "value" and "id" matter? I just
ehmaldonado_webrtc 2017/07/12 13:23:30 The order doesn't matter. The timestamp is not of
+ }
+ }
+ }
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