Switch to use new implementation in metrics.h.
Sparse macro replaced for all video histograms that have a constant name. BUG=webrtc:5283 Review URL: https://codereview.webrtc.org/1616153005 Cr-Commit-Position: refs/heads/master@{#11368}
This commit is contained in:
@ -252,12 +252,12 @@ void Call::UpdateSendHistograms() {
|
|||||||
estimated_send_bitrate_sum_kbits_ / num_bitrate_updates_;
|
estimated_send_bitrate_sum_kbits_ / num_bitrate_updates_;
|
||||||
int pacer_bitrate_kbps = pacer_bitrate_sum_kbits_ / num_bitrate_updates_;
|
int pacer_bitrate_kbps = pacer_bitrate_sum_kbits_ / num_bitrate_updates_;
|
||||||
if (send_bitrate_kbps > 0) {
|
if (send_bitrate_kbps > 0) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100000("WebRTC.Call.EstimatedSendBitrateInKbps",
|
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.EstimatedSendBitrateInKbps",
|
||||||
send_bitrate_kbps);
|
send_bitrate_kbps);
|
||||||
}
|
}
|
||||||
if (pacer_bitrate_kbps > 0) {
|
if (pacer_bitrate_kbps > 0) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100000("WebRTC.Call.PacerBitrateInKbps",
|
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.PacerBitrateInKbps",
|
||||||
pacer_bitrate_kbps);
|
pacer_bitrate_kbps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,18 +272,18 @@ void Call::UpdateReceiveHistograms() {
|
|||||||
int video_bitrate_kbps = received_video_bytes_ * 8 / elapsed_sec / 1000;
|
int video_bitrate_kbps = received_video_bytes_ * 8 / elapsed_sec / 1000;
|
||||||
int rtcp_bitrate_bps = received_rtcp_bytes_ * 8 / elapsed_sec;
|
int rtcp_bitrate_bps = received_rtcp_bytes_ * 8 / elapsed_sec;
|
||||||
if (video_bitrate_kbps > 0) {
|
if (video_bitrate_kbps > 0) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100000("WebRTC.Call.VideoBitrateReceivedInKbps",
|
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.VideoBitrateReceivedInKbps",
|
||||||
video_bitrate_kbps);
|
video_bitrate_kbps);
|
||||||
}
|
}
|
||||||
if (audio_bitrate_kbps > 0) {
|
if (audio_bitrate_kbps > 0) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100000("WebRTC.Call.AudioBitrateReceivedInKbps",
|
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.AudioBitrateReceivedInKbps",
|
||||||
audio_bitrate_kbps);
|
audio_bitrate_kbps);
|
||||||
}
|
}
|
||||||
if (rtcp_bitrate_bps > 0) {
|
if (rtcp_bitrate_bps > 0) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100000("WebRTC.Call.RtcpBitrateReceivedInBps",
|
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.RtcpBitrateReceivedInBps",
|
||||||
rtcp_bitrate_bps);
|
rtcp_bitrate_bps);
|
||||||
}
|
}
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100000(
|
RTC_HISTOGRAM_COUNTS_100000(
|
||||||
"WebRTC.Call.BitrateReceivedInKbps",
|
"WebRTC.Call.BitrateReceivedInKbps",
|
||||||
audio_bitrate_kbps + video_bitrate_kbps + rtcp_bitrate_bps / 1000);
|
audio_bitrate_kbps + video_bitrate_kbps + rtcp_bitrate_bps / 1000);
|
||||||
}
|
}
|
||||||
|
@ -165,19 +165,19 @@ void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms,
|
|||||||
} else if (uma_update_state_ == kNoUpdate) {
|
} else if (uma_update_state_ == kNoUpdate) {
|
||||||
uma_update_state_ = kFirstDone;
|
uma_update_state_ = kFirstDone;
|
||||||
bitrate_at_2_seconds_kbps_ = bitrate_kbps;
|
bitrate_at_2_seconds_kbps_ = bitrate_kbps;
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE("WebRTC.BWE.InitiallyLostPackets",
|
RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitiallyLostPackets",
|
||||||
initially_lost_packets_, 0, 100, 50);
|
initially_lost_packets_, 0, 100, 50);
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE("WebRTC.BWE.InitialRtt", static_cast<int>(rtt),
|
RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitialRtt", static_cast<int>(rtt), 0,
|
||||||
0, 2000, 50);
|
2000, 50);
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE("WebRTC.BWE.InitialBandwidthEstimate",
|
RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitialBandwidthEstimate",
|
||||||
bitrate_at_2_seconds_kbps_, 0, 2000, 50);
|
bitrate_at_2_seconds_kbps_, 0, 2000, 50);
|
||||||
} else if (uma_update_state_ == kFirstDone &&
|
} else if (uma_update_state_ == kFirstDone &&
|
||||||
now_ms - first_report_time_ms_ >= kBweConverganceTimeMs) {
|
now_ms - first_report_time_ms_ >= kBweConverganceTimeMs) {
|
||||||
uma_update_state_ = kDone;
|
uma_update_state_ = kDone;
|
||||||
int bitrate_diff_kbps =
|
int bitrate_diff_kbps =
|
||||||
std::max(bitrate_at_2_seconds_kbps_ - bitrate_kbps, 0);
|
std::max(bitrate_at_2_seconds_kbps_ - bitrate_kbps, 0);
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE("WebRTC.BWE.InitialVsConvergedDiff",
|
RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitialVsConvergedDiff", bitrate_diff_kbps,
|
||||||
bitrate_diff_kbps, 0, 2000, 50);
|
0, 2000, 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,18 +281,18 @@ void VCMJitterBuffer::UpdateHistograms() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE("WebRTC.Video.DiscardedPacketsInPercent",
|
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.DiscardedPacketsInPercent",
|
||||||
num_discarded_packets_ * 100 / num_packets_);
|
num_discarded_packets_ * 100 / num_packets_);
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE("WebRTC.Video.DuplicatedPacketsInPercent",
|
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.DuplicatedPacketsInPercent",
|
||||||
num_duplicated_packets_ * 100 / num_packets_);
|
num_duplicated_packets_ * 100 / num_packets_);
|
||||||
|
|
||||||
int total_frames =
|
int total_frames =
|
||||||
receive_statistics_.key_frames + receive_statistics_.delta_frames;
|
receive_statistics_.key_frames + receive_statistics_.delta_frames;
|
||||||
if (total_frames > 0) {
|
if (total_frames > 0) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100(
|
RTC_HISTOGRAM_COUNTS_100(
|
||||||
"WebRTC.Video.CompleteFramesReceivedPerSecond",
|
"WebRTC.Video.CompleteFramesReceivedPerSecond",
|
||||||
static_cast<int>((total_frames / elapsed_sec) + 0.5f));
|
static_cast<int>((total_frames / elapsed_sec) + 0.5f));
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_1000(
|
RTC_HISTOGRAM_COUNTS_1000(
|
||||||
"WebRTC.Video.KeyFramesReceivedInPermille",
|
"WebRTC.Video.KeyFramesReceivedInPermille",
|
||||||
static_cast<int>(
|
static_cast<int>(
|
||||||
(receive_statistics_.key_frames * 1000.0f / total_frames) + 0.5f));
|
(receive_statistics_.key_frames * 1000.0f / total_frames) + 0.5f));
|
||||||
|
@ -62,14 +62,14 @@ void VCMTiming::UpdateHistograms() const {
|
|||||||
if (elapsed_sec < metrics::kMinRunTimeInSeconds) {
|
if (elapsed_sec < metrics::kMinRunTimeInSeconds) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100(
|
RTC_HISTOGRAM_COUNTS_100(
|
||||||
"WebRTC.Video.DecodedFramesPerSecond",
|
"WebRTC.Video.DecodedFramesPerSecond",
|
||||||
static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f));
|
static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f));
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE(
|
RTC_HISTOGRAM_PERCENTAGE(
|
||||||
"WebRTC.Video.DelayedFramesToRenderer",
|
"WebRTC.Video.DelayedFramesToRenderer",
|
||||||
num_delayed_decoded_frames_ * 100 / num_decoded_frames_);
|
num_delayed_decoded_frames_ * 100 / num_decoded_frames_);
|
||||||
if (num_delayed_decoded_frames_ > 0) {
|
if (num_delayed_decoded_frames_ > 0) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_1000(
|
RTC_HISTOGRAM_COUNTS_1000(
|
||||||
"WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs",
|
"WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs",
|
||||||
sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_);
|
sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_);
|
||||||
}
|
}
|
||||||
|
@ -36,39 +36,38 @@ ReceiveStatisticsProxy::~ReceiveStatisticsProxy() {
|
|||||||
void ReceiveStatisticsProxy::UpdateHistograms() {
|
void ReceiveStatisticsProxy::UpdateHistograms() {
|
||||||
int fraction_lost = report_block_stats_.FractionLostInPercent();
|
int fraction_lost = report_block_stats_.FractionLostInPercent();
|
||||||
if (fraction_lost != -1) {
|
if (fraction_lost != -1) {
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE("WebRTC.Video.ReceivedPacketsLostInPercent",
|
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.ReceivedPacketsLostInPercent",
|
||||||
fraction_lost);
|
fraction_lost);
|
||||||
}
|
}
|
||||||
const int kMinRequiredSamples = 200;
|
const int kMinRequiredSamples = 200;
|
||||||
int samples = static_cast<int>(render_fps_tracker_.TotalSampleCount());
|
int samples = static_cast<int>(render_fps_tracker_.TotalSampleCount());
|
||||||
if (samples > kMinRequiredSamples) {
|
if (samples > kMinRequiredSamples) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100("WebRTC.Video.RenderFramesPerSecond",
|
RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.RenderFramesPerSecond",
|
||||||
round(render_fps_tracker_.ComputeTotalRate()));
|
round(render_fps_tracker_.ComputeTotalRate()));
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100000("WebRTC.Video.RenderSqrtPixelsPerSecond",
|
RTC_HISTOGRAM_COUNTS_100000(
|
||||||
|
"WebRTC.Video.RenderSqrtPixelsPerSecond",
|
||||||
round(render_pixel_tracker_.ComputeTotalRate()));
|
round(render_pixel_tracker_.ComputeTotalRate()));
|
||||||
}
|
}
|
||||||
int width = render_width_counter_.Avg(kMinRequiredSamples);
|
int width = render_width_counter_.Avg(kMinRequiredSamples);
|
||||||
int height = render_height_counter_.Avg(kMinRequiredSamples);
|
int height = render_height_counter_.Avg(kMinRequiredSamples);
|
||||||
if (width != -1) {
|
if (width != -1) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000("WebRTC.Video.ReceivedWidthInPixels",
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedWidthInPixels", width);
|
||||||
width);
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedHeightInPixels", height);
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000("WebRTC.Video.ReceivedHeightInPixels",
|
|
||||||
height);
|
|
||||||
}
|
}
|
||||||
int qp = qp_counters_.vp8.Avg(kMinRequiredSamples);
|
int qp = qp_counters_.vp8.Avg(kMinRequiredSamples);
|
||||||
if (qp != -1)
|
if (qp != -1)
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_200("WebRTC.Video.Decoded.Vp8.Qp", qp);
|
RTC_HISTOGRAM_COUNTS_200("WebRTC.Video.Decoded.Vp8.Qp", qp);
|
||||||
|
|
||||||
// TODO(asapersson): DecoderTiming() is call periodically (each 1000ms) and
|
// TODO(asapersson): DecoderTiming() is call periodically (each 1000ms) and
|
||||||
// not per frame. Change decode time to include every frame.
|
// not per frame. Change decode time to include every frame.
|
||||||
const int kMinRequiredDecodeSamples = 5;
|
const int kMinRequiredDecodeSamples = 5;
|
||||||
int decode_ms = decode_time_counter_.Avg(kMinRequiredDecodeSamples);
|
int decode_ms = decode_time_counter_.Avg(kMinRequiredDecodeSamples);
|
||||||
if (decode_ms != -1)
|
if (decode_ms != -1)
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
|
RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
|
||||||
|
|
||||||
int delay_ms = delay_counter_.Avg(kMinRequiredDecodeSamples);
|
int delay_ms = delay_counter_.Avg(kMinRequiredDecodeSamples);
|
||||||
if (delay_ms != -1)
|
if (delay_ms != -1)
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000("WebRTC.Video.OnewayDelayInMs", delay_ms);
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
|
VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
|
||||||
|
@ -56,8 +56,9 @@ HistogramCodecType PayloadNameToHistogramCodecType(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UpdateCodecTypeHistogram(const std::string& payload_name) {
|
void UpdateCodecTypeHistogram(const std::string& payload_name) {
|
||||||
RTC_HISTOGRAM_ENUMERATION_SPARSE("WebRTC.Video.Encoder.CodecType",
|
RTC_HISTOGRAM_ENUMERATION("WebRTC.Video.Encoder.CodecType",
|
||||||
PayloadNameToHistogramCodecType(payload_name), kVideoMax);
|
PayloadNameToHistogramCodecType(payload_name),
|
||||||
|
kVideoMax);
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ void ViEChannel::UpdateHistograms() {
|
|||||||
if (time_of_first_rtt_ms_ != -1 && num_rtts_ > 0 &&
|
if (time_of_first_rtt_ms_ != -1 && num_rtts_ > 0 &&
|
||||||
elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
||||||
int64_t avg_rtt_ms = (rtt_sum_ms_ + num_rtts_ / 2) / num_rtts_;
|
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);
|
"WebRTC.Video.AverageRoundTripTimeInMilliseconds", avg_rtt_ms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -209,24 +209,21 @@ void ViEChannel::UpdateHistograms() {
|
|||||||
GetSendRtcpPacketTypeCounter(&rtcp_counter);
|
GetSendRtcpPacketTypeCounter(&rtcp_counter);
|
||||||
int64_t elapsed_sec = rtcp_counter.TimeSinceFirstPacketInMs(now) / 1000;
|
int64_t elapsed_sec = rtcp_counter.TimeSinceFirstPacketInMs(now) / 1000;
|
||||||
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsReceivedPerMinute",
|
||||||
"WebRTC.Video.NackPacketsReceivedPerMinute",
|
rtcp_counter.nack_packets * 60 / elapsed_sec);
|
||||||
rtcp_counter.nack_packets * 60 / elapsed_sec);
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsReceivedPerMinute",
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
rtcp_counter.fir_packets * 60 / elapsed_sec);
|
||||||
"WebRTC.Video.FirPacketsReceivedPerMinute",
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsReceivedPerMinute",
|
||||||
rtcp_counter.fir_packets * 60 / elapsed_sec);
|
rtcp_counter.pli_packets * 60 / elapsed_sec);
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
|
||||||
"WebRTC.Video.PliPacketsReceivedPerMinute",
|
|
||||||
rtcp_counter.pli_packets * 60 / elapsed_sec);
|
|
||||||
if (rtcp_counter.nack_requests > 0) {
|
if (rtcp_counter.nack_requests > 0) {
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE(
|
RTC_HISTOGRAM_PERCENTAGE(
|
||||||
"WebRTC.Video.UniqueNackRequestsReceivedInPercent",
|
"WebRTC.Video.UniqueNackRequestsReceivedInPercent",
|
||||||
rtcp_counter.UniqueNackRequestsInPercent());
|
rtcp_counter.UniqueNackRequestsInPercent());
|
||||||
}
|
}
|
||||||
int fraction_lost = report_block_stats_sender_->FractionLostInPercent();
|
int fraction_lost = report_block_stats_sender_->FractionLostInPercent();
|
||||||
if (fraction_lost != -1) {
|
if (fraction_lost != -1) {
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE("WebRTC.Video.SentPacketsLostInPercent",
|
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.SentPacketsLostInPercent",
|
||||||
fraction_lost);
|
fraction_lost);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,23 +236,23 @@ void ViEChannel::UpdateHistograms() {
|
|||||||
Clock::GetRealTimeClock()->TimeInMilliseconds()) /
|
Clock::GetRealTimeClock()->TimeInMilliseconds()) /
|
||||||
1000;
|
1000;
|
||||||
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_100000(
|
RTC_HISTOGRAM_COUNTS_100000(
|
||||||
"WebRTC.Video.BitrateSentInKbps",
|
"WebRTC.Video.BitrateSentInKbps",
|
||||||
static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
||||||
1000));
|
1000));
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.MediaBitrateSentInKbps",
|
"WebRTC.Video.MediaBitrateSentInKbps",
|
||||||
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
|
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.PaddingBitrateSentInKbps",
|
"WebRTC.Video.PaddingBitrateSentInKbps",
|
||||||
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
|
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
|
||||||
1000));
|
1000));
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.RetransmittedBitrateSentInKbps",
|
"WebRTC.Video.RetransmittedBitrateSentInKbps",
|
||||||
static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
|
static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
|
||||||
elapsed_sec / 1000));
|
elapsed_sec / 1000));
|
||||||
if (rtp_rtcp_modules_[0]->RtxSendStatus() != kRtxOff) {
|
if (rtp_rtcp_modules_[0]->RtxSendStatus() != kRtxOff) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.RtxBitrateSentInKbps",
|
"WebRTC.Video.RtxBitrateSentInKbps",
|
||||||
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
||||||
1000));
|
1000));
|
||||||
@ -266,10 +263,9 @@ void ViEChannel::UpdateHistograms() {
|
|||||||
rtp_rtcp_modules_[0]->GenericFECStatus(&fec_enabled, &pltype_red,
|
rtp_rtcp_modules_[0]->GenericFECStatus(&fec_enabled, &pltype_red,
|
||||||
&pltype_fec);
|
&pltype_fec);
|
||||||
if (fec_enabled) {
|
if (fec_enabled) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateSentInKbps",
|
||||||
"WebRTC.Video.FecBitrateSentInKbps",
|
static_cast<int>(rtp_rtx.fec.TotalBytes() *
|
||||||
static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec /
|
8 / elapsed_sec / 1000));
|
||||||
1000));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (vie_receiver_.GetRemoteSsrc() > 0) {
|
} else if (vie_receiver_.GetRemoteSsrc() > 0) {
|
||||||
@ -279,19 +275,15 @@ void ViEChannel::UpdateHistograms() {
|
|||||||
GetReceiveRtcpPacketTypeCounter(&rtcp_counter);
|
GetReceiveRtcpPacketTypeCounter(&rtcp_counter);
|
||||||
int64_t elapsed_sec = rtcp_counter.TimeSinceFirstPacketInMs(now) / 1000;
|
int64_t elapsed_sec = rtcp_counter.TimeSinceFirstPacketInMs(now) / 1000;
|
||||||
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsSentPerMinute",
|
||||||
"WebRTC.Video.NackPacketsSentPerMinute",
|
rtcp_counter.nack_packets * 60 / elapsed_sec);
|
||||||
rtcp_counter.nack_packets * 60 / elapsed_sec);
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsSentPerMinute",
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
rtcp_counter.fir_packets * 60 / elapsed_sec);
|
||||||
"WebRTC.Video.FirPacketsSentPerMinute",
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsSentPerMinute",
|
||||||
rtcp_counter.fir_packets * 60 / elapsed_sec);
|
rtcp_counter.pli_packets * 60 / elapsed_sec);
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
|
||||||
"WebRTC.Video.PliPacketsSentPerMinute",
|
|
||||||
rtcp_counter.pli_packets * 60 / elapsed_sec);
|
|
||||||
if (rtcp_counter.nack_requests > 0) {
|
if (rtcp_counter.nack_requests > 0) {
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE(
|
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.UniqueNackRequestsSentInPercent",
|
||||||
"WebRTC.Video.UniqueNackRequestsSentInPercent",
|
rtcp_counter.UniqueNackRequestsInPercent());
|
||||||
rtcp_counter.UniqueNackRequestsInPercent());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,33 +294,32 @@ void ViEChannel::UpdateHistograms() {
|
|||||||
rtp_rtx.Add(rtx);
|
rtp_rtx.Add(rtx);
|
||||||
elapsed_sec = rtp_rtx.TimeSinceFirstPacketInMs(now) / 1000;
|
elapsed_sec = rtp_rtx.TimeSinceFirstPacketInMs(now) / 1000;
|
||||||
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.BitrateReceivedInKbps",
|
"WebRTC.Video.BitrateReceivedInKbps",
|
||||||
static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
||||||
1000));
|
1000));
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.MediaBitrateReceivedInKbps",
|
"WebRTC.Video.MediaBitrateReceivedInKbps",
|
||||||
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
|
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.PaddingBitrateReceivedInKbps",
|
"WebRTC.Video.PaddingBitrateReceivedInKbps",
|
||||||
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
|
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
|
||||||
1000));
|
1000));
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.RetransmittedBitrateReceivedInKbps",
|
"WebRTC.Video.RetransmittedBitrateReceivedInKbps",
|
||||||
static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
|
static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
|
||||||
elapsed_sec / 1000));
|
elapsed_sec / 1000));
|
||||||
uint32_t ssrc = 0;
|
uint32_t ssrc = 0;
|
||||||
if (vie_receiver_.GetRtxSsrc(&ssrc)) {
|
if (vie_receiver_.GetRtxSsrc(&ssrc)) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000(
|
||||||
"WebRTC.Video.RtxBitrateReceivedInKbps",
|
"WebRTC.Video.RtxBitrateReceivedInKbps",
|
||||||
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
||||||
1000));
|
1000));
|
||||||
}
|
}
|
||||||
if (vie_receiver_.IsFecEnabled()) {
|
if (vie_receiver_.IsFecEnabled()) {
|
||||||
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
|
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateReceivedInKbps",
|
||||||
"WebRTC.Video.FecBitrateReceivedInKbps",
|
static_cast<int>(rtp_rtx.fec.TotalBytes() *
|
||||||
static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec /
|
8 / elapsed_sec / 1000));
|
||||||
1000));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,15 +66,14 @@ ViEReceiver::~ViEReceiver() {
|
|||||||
void ViEReceiver::UpdateHistograms() {
|
void ViEReceiver::UpdateHistograms() {
|
||||||
FecPacketCounter counter = fec_receiver_->GetPacketCounter();
|
FecPacketCounter counter = fec_receiver_->GetPacketCounter();
|
||||||
if (counter.num_packets > 0) {
|
if (counter.num_packets > 0) {
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE(
|
RTC_HISTOGRAM_PERCENTAGE(
|
||||||
"WebRTC.Video.ReceivedFecPacketsInPercent",
|
"WebRTC.Video.ReceivedFecPacketsInPercent",
|
||||||
static_cast<int>(counter.num_fec_packets * 100 / counter.num_packets));
|
static_cast<int>(counter.num_fec_packets * 100 / counter.num_packets));
|
||||||
}
|
}
|
||||||
if (counter.num_fec_packets > 0) {
|
if (counter.num_fec_packets > 0) {
|
||||||
RTC_HISTOGRAM_PERCENTAGE_SPARSE(
|
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.RecoveredMediaPacketsInPercentOfFec",
|
||||||
"WebRTC.Video.RecoveredMediaPacketsInPercentOfFec",
|
static_cast<int>(counter.num_recovered_packets *
|
||||||
static_cast<int>(counter.num_recovered_packets * 100 /
|
100 / counter.num_fec_packets));
|
||||||
counter.num_fec_packets));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user