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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 1669623004: Use CallStats for RTT in Call, rather than VideoSendStream::GetRtt() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comment, rebase Created 4 years, 10 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 | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/video_send_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index bd0d5186e1d4baf87e361b2bf70636aed8330c36..11dd241afaa05c41f90133f5917d7eb0476afdc0 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -89,7 +89,8 @@ SendStatisticsProxy::UmaSamplesContainer::UmaSamplesContainer(
max_sent_width_per_timestamp_(0),
max_sent_height_per_timestamp_(0),
input_frame_rate_tracker_(100u, 10u),
- sent_frame_rate_tracker_(100u, 10u) {}
+ sent_frame_rate_tracker_(100u, 10u),
+ first_rtcp_stats_time_ms_(-1) {}
SendStatisticsProxy::UmaSamplesContainer::~UmaSamplesContainer() {
UpdateHistograms();
@@ -166,6 +167,16 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms() {
RTC_HISTOGRAMS_COUNTS_100000(kIndex, uma_prefix_ + "SendSideDelayMaxInMs",
max_delay_ms);
}
+ int fraction_lost = report_block_stats_.FractionLostInPercent();
+ if (first_rtcp_stats_time_ms_ != -1) {
+ int64_t elapsed_time_ms = Clock::GetRealTimeClock()->TimeInMilliseconds() -
+ first_rtcp_stats_time_ms_;
+ if (elapsed_time_ms / 1000 >= metrics::kMinRunTimeInSeconds &&
+ fraction_lost != -1) {
+ RTC_HISTOGRAMS_PERCENTAGE(
+ kIndex, uma_prefix_ + "SentPacketsLostInPercent", fraction_lost);
+ }
+ }
}
void SendStatisticsProxy::SetContentType(
@@ -354,6 +365,9 @@ void SendStatisticsProxy::StatisticsUpdated(const RtcpStatistics& statistics,
return;
stats->rtcp_stats = statistics;
+ uma_container_->report_block_stats_.Store(statistics, 0, ssrc);
+ if (uma_container_->first_rtcp_stats_time_ms_ == -1)
+ uma_container_->first_rtcp_stats_time_ms_ = clock_->TimeInMilliseconds();
}
void SendStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) {}
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/video_send_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698