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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 2884643004: Add traces for some video receive statistics. (Closed)
Patch Set: Created 3 years, 7 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/video/receive_statistics_proxy.cc
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc
index 308424054b2eaf34e0535ac3c35d3d98cb04c311..61b2ad13987aae3afb41f7aed304480b07e9b81f 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -16,6 +16,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
+#include "webrtc/base/trace_event.h"
#include "webrtc/modules/video_coding/include/video_codec_interface.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/system_wrappers/include/field_trial.h"
@@ -413,6 +414,22 @@ void ReceiveStatisticsProxy::OnFrameBufferTimingsUpdated(
// Network delay (rtt/2) + target_delay_ms (jitter delay + decode time +
// render delay).
delay_counter_.Add(target_delay_ms + avg_rtt_ms_ / 2);
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.DecodeTimeInMs",
+ "decode_ms", decode_ms, "ssrc", stats_.ssrc);
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.MaxDecodeTimeInMs",
+ "max_decode_ms", max_decode_ms, "ssrc", stats_.ssrc);
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.CurrentDelayInMs",
+ "current_delay_ms", current_delay_ms,
+ "ssrc", stats_.ssrc);
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.TargetDelayInMs",
+ "target_delay_ms", target_delay_ms,
+ "ssrc", stats_.ssrc);
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.JitterBufferDelayInMs",
+ "jitter_buffer_ms", jitter_buffer_ms,
+ "ssrc", stats_.ssrc);
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.RenderDelayInMs",
+ "render_delay_ms", render_delay_ms,
+ "ssrc", stats_.ssrc);
}
void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated(
@@ -437,6 +454,10 @@ void ReceiveStatisticsProxy::StatisticsUpdated(
if (first_report_block_time_ms_ == -1)
first_report_block_time_ms_ = clock_->TimeInMilliseconds();
+
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.PacketsLost",
+ "packets_lost", statistics.cumulative_lost,
+ "ssrc", stats_.ssrc);
}
void ReceiveStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) {
@@ -527,6 +548,13 @@ void ReceiveStatisticsProxy::OnRenderedFrame(const VideoFrame& frame) {
}
}
}
+
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.ReceivedWidthInPixels",
+ "width", width, "ssrc", stats_.ssrc);
+ TRACE_EVENT_INSTANT2("webrtc_stats", "WebRTC.Video.ReceivedHeightInPixels",
+ "height", height, "ssrc", stats_.ssrc);
+ TRACE_EVENT_INSTANT1("webrtc_stats", "WebRTC.Video.OnRenderedFrame",
+ "ssrc", stats_.ssrc);
}
void ReceiveStatisticsProxy::OnSyncOffsetUpdated(int64_t sync_offset_ms,
« 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