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

Unified Diff: webrtc/video/vie_channel.cc

Issue 1616153005: Switch to use new implementation in metrics.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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.cc ('k') | webrtc/video/vie_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_channel.cc
diff --git a/webrtc/video/vie_channel.cc b/webrtc/video/vie_channel.cc
index 7b350dea4cafd51b6418879c53a6fadb5ca9be07..d8d8c31226c4c87a79dd22dedd2bfdde98ac1834 100644
--- a/webrtc/video/vie_channel.cc
+++ b/webrtc/video/vie_channel.cc
@@ -201,7 +201,7 @@ void ViEChannel::UpdateHistograms() {
if (time_of_first_rtt_ms_ != -1 && num_rtts_ > 0 &&
elapsed_sec > metrics::kMinRunTimeInSeconds) {
int64_t avg_rtt_ms = (rtt_sum_ms_ + num_rtts_ / 2) / num_rtts_;
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.AverageRoundTripTimeInMilliseconds", avg_rtt_ms);
}
}
@@ -211,24 +211,21 @@ void ViEChannel::UpdateHistograms() {
GetSendRtcpPacketTypeCounter(&rtcp_counter);
int64_t elapsed_sec = rtcp_counter.TimeSinceFirstPacketInMs(now) / 1000;
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
- "WebRTC.Video.NackPacketsReceivedPerMinute",
- rtcp_counter.nack_packets * 60 / elapsed_sec);
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
- "WebRTC.Video.FirPacketsReceivedPerMinute",
- rtcp_counter.fir_packets * 60 / elapsed_sec);
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
- "WebRTC.Video.PliPacketsReceivedPerMinute",
- rtcp_counter.pli_packets * 60 / elapsed_sec);
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsReceivedPerMinute",
+ rtcp_counter.nack_packets * 60 / elapsed_sec);
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsReceivedPerMinute",
+ rtcp_counter.fir_packets * 60 / elapsed_sec);
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsReceivedPerMinute",
+ rtcp_counter.pli_packets * 60 / elapsed_sec);
if (rtcp_counter.nack_requests > 0) {
- RTC_HISTOGRAM_PERCENTAGE_SPARSE(
+ RTC_HISTOGRAM_PERCENTAGE(
"WebRTC.Video.UniqueNackRequestsReceivedInPercent",
rtcp_counter.UniqueNackRequestsInPercent());
}
int fraction_lost = report_block_stats_sender_->FractionLostInPercent();
if (fraction_lost != -1) {
- RTC_HISTOGRAM_PERCENTAGE_SPARSE("WebRTC.Video.SentPacketsLostInPercent",
- fraction_lost);
+ RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.SentPacketsLostInPercent",
+ fraction_lost);
}
}
@@ -241,23 +238,23 @@ void ViEChannel::UpdateHistograms() {
Clock::GetRealTimeClock()->TimeInMilliseconds()) /
1000;
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
- RTC_HISTOGRAM_COUNTS_SPARSE_100000(
+ RTC_HISTOGRAM_COUNTS_100000(
"WebRTC.Video.BitrateSentInKbps",
static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
1000));
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.MediaBitrateSentInKbps",
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.PaddingBitrateSentInKbps",
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
1000));
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.RetransmittedBitrateSentInKbps",
static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
elapsed_sec / 1000));
if (rtp_rtcp_modules_[0]->RtxSendStatus() != kRtxOff) {
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.RtxBitrateSentInKbps",
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
1000));
@@ -268,10 +265,9 @@ void ViEChannel::UpdateHistograms() {
rtp_rtcp_modules_[0]->GenericFECStatus(&fec_enabled, &pltype_red,
&pltype_fec);
if (fec_enabled) {
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
- "WebRTC.Video.FecBitrateSentInKbps",
- static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec /
- 1000));
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateSentInKbps",
+ static_cast<int>(rtp_rtx.fec.TotalBytes() *
+ 8 / elapsed_sec / 1000));
}
}
} else if (vie_receiver_.GetRemoteSsrc() > 0) {
@@ -281,19 +277,15 @@ void ViEChannel::UpdateHistograms() {
GetReceiveRtcpPacketTypeCounter(&rtcp_counter);
int64_t elapsed_sec = rtcp_counter.TimeSinceFirstPacketInMs(now) / 1000;
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
- "WebRTC.Video.NackPacketsSentPerMinute",
- rtcp_counter.nack_packets * 60 / elapsed_sec);
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
- "WebRTC.Video.FirPacketsSentPerMinute",
- rtcp_counter.fir_packets * 60 / elapsed_sec);
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
- "WebRTC.Video.PliPacketsSentPerMinute",
- rtcp_counter.pli_packets * 60 / elapsed_sec);
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsSentPerMinute",
+ rtcp_counter.nack_packets * 60 / elapsed_sec);
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsSentPerMinute",
+ rtcp_counter.fir_packets * 60 / elapsed_sec);
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsSentPerMinute",
+ rtcp_counter.pli_packets * 60 / elapsed_sec);
if (rtcp_counter.nack_requests > 0) {
- RTC_HISTOGRAM_PERCENTAGE_SPARSE(
- "WebRTC.Video.UniqueNackRequestsSentInPercent",
- rtcp_counter.UniqueNackRequestsInPercent());
+ RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.UniqueNackRequestsSentInPercent",
+ rtcp_counter.UniqueNackRequestsInPercent());
}
}
@@ -304,33 +296,32 @@ void ViEChannel::UpdateHistograms() {
rtp_rtx.Add(rtx);
elapsed_sec = rtp_rtx.TimeSinceFirstPacketInMs(now) / 1000;
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.BitrateReceivedInKbps",
static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
1000));
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.MediaBitrateReceivedInKbps",
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.PaddingBitrateReceivedInKbps",
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
1000));
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.RetransmittedBitrateReceivedInKbps",
static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
elapsed_sec / 1000));
uint32_t ssrc = 0;
if (vie_receiver_.GetRtxSsrc(&ssrc)) {
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
+ RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.RtxBitrateReceivedInKbps",
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
1000));
}
if (vie_receiver_.IsFecEnabled()) {
- RTC_HISTOGRAM_COUNTS_SPARSE_10000(
- "WebRTC.Video.FecBitrateReceivedInKbps",
- static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec /
- 1000));
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateReceivedInKbps",
+ static_cast<int>(rtp_rtx.fec.TotalBytes() *
+ 8 / elapsed_sec / 1000));
}
}
}
« no previous file with comments | « webrtc/video/send_statistics_proxy.cc ('k') | webrtc/video/vie_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698