Remove RTC_LOGGED_* macro.
BUG= Review-Url: https://codereview.webrtc.org/2326843003 Cr-Commit-Position: refs/heads/master@{#14174}
This commit is contained in:
parent
d5fff5040c
commit
1d02d3e5e6
@ -59,8 +59,8 @@ BitrateAllocator::BitrateAllocator(LimitObserver* limit_observer)
|
||||
}
|
||||
|
||||
BitrateAllocator::~BitrateAllocator() {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100("WebRTC.Call.NumberOfPauseEvents",
|
||||
num_pause_events_);
|
||||
RTC_HISTOGRAM_COUNTS_100("WebRTC.Call.NumberOfPauseEvents",
|
||||
num_pause_events_);
|
||||
}
|
||||
|
||||
void BitrateAllocator::OnNetworkChanged(uint32_t target_bitrate_bps,
|
||||
|
||||
@ -312,7 +312,7 @@ Call::~Call() {
|
||||
}
|
||||
|
||||
void Call::UpdateHistograms() {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000(
|
||||
RTC_HISTOGRAM_COUNTS_100000(
|
||||
"WebRTC.Call.LifetimeInSeconds",
|
||||
(clock_->TimeInMilliseconds() - start_ms_) / 1000);
|
||||
}
|
||||
@ -328,14 +328,14 @@ void Call::UpdateSendHistograms() {
|
||||
AggregatedStats send_bitrate_stats =
|
||||
estimated_send_bitrate_kbps_counter_.ProcessAndGetStats();
|
||||
if (send_bitrate_stats.num_samples > kMinRequiredPeriodicSamples) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000("WebRTC.Call.EstimatedSendBitrateInKbps",
|
||||
send_bitrate_stats.average);
|
||||
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.EstimatedSendBitrateInKbps",
|
||||
send_bitrate_stats.average);
|
||||
}
|
||||
AggregatedStats pacer_bitrate_stats =
|
||||
pacer_bitrate_kbps_counter_.ProcessAndGetStats();
|
||||
if (pacer_bitrate_stats.num_samples > kMinRequiredPeriodicSamples) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000("WebRTC.Call.PacerBitrateInKbps",
|
||||
pacer_bitrate_stats.average);
|
||||
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.PacerBitrateInKbps",
|
||||
pacer_bitrate_stats.average);
|
||||
}
|
||||
}
|
||||
|
||||
@ -344,26 +344,26 @@ void Call::UpdateReceiveHistograms() {
|
||||
AggregatedStats video_bytes_per_sec =
|
||||
received_video_bytes_per_second_counter_.GetStats();
|
||||
if (video_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000("WebRTC.Call.VideoBitrateReceivedInKbps",
|
||||
video_bytes_per_sec.average * 8 / 1000);
|
||||
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.VideoBitrateReceivedInKbps",
|
||||
video_bytes_per_sec.average * 8 / 1000);
|
||||
}
|
||||
AggregatedStats audio_bytes_per_sec =
|
||||
received_audio_bytes_per_second_counter_.GetStats();
|
||||
if (audio_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000("WebRTC.Call.AudioBitrateReceivedInKbps",
|
||||
audio_bytes_per_sec.average * 8 / 1000);
|
||||
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.AudioBitrateReceivedInKbps",
|
||||
audio_bytes_per_sec.average * 8 / 1000);
|
||||
}
|
||||
AggregatedStats rtcp_bytes_per_sec =
|
||||
received_rtcp_bytes_per_second_counter_.GetStats();
|
||||
if (rtcp_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000("WebRTC.Call.RtcpBitrateReceivedInBps",
|
||||
rtcp_bytes_per_sec.average * 8);
|
||||
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.RtcpBitrateReceivedInBps",
|
||||
rtcp_bytes_per_sec.average * 8);
|
||||
}
|
||||
AggregatedStats recv_bytes_per_sec =
|
||||
received_bytes_per_second_counter_.GetStats();
|
||||
if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps",
|
||||
recv_bytes_per_sec.average * 8 / 1000);
|
||||
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps",
|
||||
recv_bytes_per_sec.average * 8 / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1628,9 +1628,8 @@ WebRtcVideoChannel2::WebRtcVideoSendStream::~WebRtcVideoSendStream() {
|
||||
void WebRtcVideoChannel2::WebRtcVideoSendStream::UpdateHistograms() const {
|
||||
const int kMinRequiredFrames = 200;
|
||||
if (frame_count_ > kMinRequiredFrames) {
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE(
|
||||
"WebRTC.Video.CpuLimitedResolutionInPercent",
|
||||
cpu_restricted_frame_count_ * 100 / frame_count_);
|
||||
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.CpuLimitedResolutionInPercent",
|
||||
cpu_restricted_frame_count_ * 100 / frame_count_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ AudioDeviceBuffer::~AudioDeviceBuffer() {
|
||||
// I am avoiding use of the task queue here since we are under destruction
|
||||
// and reading these members on the creating thread feels safe.
|
||||
if (rec_callbacks_ > 0 && num_stat_reports_ > 0) {
|
||||
RTC_LOGGED_HISTOGRAM_BOOLEAN("WebRTC.Audio.RecordedOnlyZeros",
|
||||
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.RecordedOnlyZeros",
|
||||
static_cast<int>(num_stat_reports_ == num_rec_level_is_zero_));
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,8 +168,8 @@ void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms,
|
||||
for (size_t i = 0; i < kNumUmaRampupMetrics; ++i) {
|
||||
if (!rampup_uma_stats_updated_[i] &&
|
||||
bitrate_kbps >= kUmaRampupMetrics[i].bitrate_kbps) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_100000(i, kUmaRampupMetrics[i].metric_name,
|
||||
now_ms - first_report_time_ms_);
|
||||
RTC_HISTOGRAMS_COUNTS_100000(i, kUmaRampupMetrics[i].metric_name,
|
||||
now_ms - first_report_time_ms_);
|
||||
rampup_uma_stats_updated_[i] = true;
|
||||
}
|
||||
}
|
||||
@ -178,19 +178,19 @@ void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms,
|
||||
} else if (uma_update_state_ == kNoUpdate) {
|
||||
uma_update_state_ = kFirstDone;
|
||||
bitrate_at_2_seconds_kbps_ = bitrate_kbps;
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS("WebRTC.BWE.InitiallyLostPackets",
|
||||
initially_lost_packets_, 0, 100, 50);
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS("WebRTC.BWE.InitialRtt", static_cast<int>(rtt),
|
||||
0, 2000, 50);
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS("WebRTC.BWE.InitialBandwidthEstimate",
|
||||
bitrate_at_2_seconds_kbps_, 0, 2000, 50);
|
||||
RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitiallyLostPackets",
|
||||
initially_lost_packets_, 0, 100, 50);
|
||||
RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitialRtt", static_cast<int>(rtt), 0,
|
||||
2000, 50);
|
||||
RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitialBandwidthEstimate",
|
||||
bitrate_at_2_seconds_kbps_, 0, 2000, 50);
|
||||
} else if (uma_update_state_ == kFirstDone &&
|
||||
now_ms - first_report_time_ms_ >= kBweConverganceTimeMs) {
|
||||
uma_update_state_ = kDone;
|
||||
int bitrate_diff_kbps =
|
||||
std::max(bitrate_at_2_seconds_kbps_ - bitrate_kbps, 0);
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS("WebRTC.BWE.InitialVsConvergedDiff",
|
||||
bitrate_diff_kbps, 0, 2000, 50);
|
||||
RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitialVsConvergedDiff", bitrate_diff_kbps,
|
||||
0, 2000, 50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,6 @@ constexpr int kInterArrivalShift =
|
||||
kAbsSendTimeFraction + kAbsSendTimeInterArrivalUpshift;
|
||||
constexpr double kTimestampToMs =
|
||||
1000.0 / static_cast<double>(1 << kInterArrivalShift);
|
||||
|
||||
// This ssrc is used to fulfill the current API but will be removed
|
||||
// after the API has been changed.
|
||||
constexpr uint32_t kFixedSsrc = 0;
|
||||
@ -59,9 +58,9 @@ void DelayBasedBwe::IncomingPacketFeedbackVector(
|
||||
const std::vector<PacketInfo>& packet_feedback_vector) {
|
||||
RTC_DCHECK(network_thread_.CalledOnValidThread());
|
||||
if (!uma_recorded_) {
|
||||
RTC_LOGGED_HISTOGRAM_ENUMERATION(kBweTypeHistogram,
|
||||
BweNames::kSendSideTransportSeqNum,
|
||||
BweNames::kBweNamesMax);
|
||||
RTC_HISTOGRAM_ENUMERATION(kBweTypeHistogram,
|
||||
BweNames::kSendSideTransportSeqNum,
|
||||
BweNames::kBweNamesMax);
|
||||
uma_recorded_ = true;
|
||||
}
|
||||
for (const auto& packet_info : packet_feedback_vector) {
|
||||
|
||||
@ -239,9 +239,8 @@ void RemoteBitrateEstimatorAbsSendTime::IncomingPacketInfo(
|
||||
uint32_t ssrc) {
|
||||
RTC_CHECK(send_time_24bits < (1ul << 24));
|
||||
if (!uma_recorded_) {
|
||||
RTC_LOGGED_HISTOGRAM_ENUMERATION(kBweTypeHistogram,
|
||||
BweNames::kReceiverAbsSendTime,
|
||||
BweNames::kBweNamesMax);
|
||||
RTC_HISTOGRAM_ENUMERATION(kBweTypeHistogram, BweNames::kReceiverAbsSendTime,
|
||||
BweNames::kBweNamesMax);
|
||||
uma_recorded_ = true;
|
||||
}
|
||||
// Shift up send time to use the full 32 bits that inter_arrival works with,
|
||||
|
||||
@ -77,8 +77,7 @@ void RemoteBitrateEstimatorSingleStream::IncomingPacket(
|
||||
BweNames type = BweNames::kReceiverTOffset;
|
||||
if (!header.extension.hasTransmissionTimeOffset)
|
||||
type = BweNames::kReceiverNoExtension;
|
||||
RTC_LOGGED_HISTOGRAM_ENUMERATION(
|
||||
kBweTypeHistogram, type, BweNames::kBweNamesMax);
|
||||
RTC_HISTOGRAM_ENUMERATION(kBweTypeHistogram, type, BweNames::kBweNamesMax);
|
||||
uma_recorded_ = true;
|
||||
}
|
||||
uint32_t ssrc = header.ssrc;
|
||||
|
||||
@ -285,18 +285,18 @@ void VCMJitterBuffer::UpdateHistograms() {
|
||||
return;
|
||||
}
|
||||
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE("WebRTC.Video.DiscardedPacketsInPercent",
|
||||
num_discarded_packets_ * 100 / num_packets_);
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE("WebRTC.Video.DuplicatedPacketsInPercent",
|
||||
num_duplicated_packets_ * 100 / num_packets_);
|
||||
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.DiscardedPacketsInPercent",
|
||||
num_discarded_packets_ * 100 / num_packets_);
|
||||
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.DuplicatedPacketsInPercent",
|
||||
num_duplicated_packets_ * 100 / num_packets_);
|
||||
|
||||
int total_frames =
|
||||
receive_statistics_.key_frames + receive_statistics_.delta_frames;
|
||||
if (total_frames > 0) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100(
|
||||
RTC_HISTOGRAM_COUNTS_100(
|
||||
"WebRTC.Video.CompleteFramesReceivedPerSecond",
|
||||
static_cast<int>((total_frames / elapsed_sec) + 0.5f));
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_1000(
|
||||
RTC_HISTOGRAM_COUNTS_1000(
|
||||
"WebRTC.Video.KeyFramesReceivedInPermille",
|
||||
static_cast<int>(
|
||||
(receive_statistics_.key_frames * 1000.0f / total_frames) + 0.5f));
|
||||
|
||||
@ -63,14 +63,14 @@ void VCMTiming::UpdateHistograms() const {
|
||||
if (elapsed_sec < metrics::kMinRunTimeInSeconds) {
|
||||
return;
|
||||
}
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100(
|
||||
RTC_HISTOGRAM_COUNTS_100(
|
||||
"WebRTC.Video.DecodedFramesPerSecond",
|
||||
static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f));
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE(
|
||||
RTC_HISTOGRAM_PERCENTAGE(
|
||||
"WebRTC.Video.DelayedFramesToRenderer",
|
||||
num_delayed_decoded_frames_ * 100 / num_decoded_frames_);
|
||||
if (num_delayed_decoded_frames_ > 0) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_1000(
|
||||
RTC_HISTOGRAM_COUNTS_1000(
|
||||
"WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs",
|
||||
sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_);
|
||||
}
|
||||
|
||||
@ -82,30 +82,7 @@
|
||||
RTC_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50)
|
||||
|
||||
#define RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \
|
||||
RTC_HISTOGRAM_COMMON_BLOCK(name, sample, false, \
|
||||
webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count))
|
||||
|
||||
// RTC_HISTOGRAM_COUNTS with logging.
|
||||
#define RTC_LOGGED_HISTOGRAM_COUNTS_100(name, sample) \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 100, 50)
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAM_COUNTS_200(name, sample) \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 200, 50)
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAM_COUNTS_500(name, sample) \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 500, 50)
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAM_COUNTS_1000(name, sample) \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 1000, 50)
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAM_COUNTS_10000(name, sample) \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 10000, 50)
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAM_COUNTS_100000(name, sample) \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50)
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \
|
||||
RTC_HISTOGRAM_COMMON_BLOCK(name, sample, true, \
|
||||
RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \
|
||||
webrtc::metrics::HistogramFactoryGetCounts(name, min, max, bucket_count))
|
||||
|
||||
// Deprecated.
|
||||
@ -121,37 +98,21 @@
|
||||
#define RTC_HISTOGRAM_PERCENTAGE(name, sample) \
|
||||
RTC_HISTOGRAM_ENUMERATION(name, sample, 101)
|
||||
|
||||
// RTC_HISTOGRAM_PERCENTAGE with logging.
|
||||
#define RTC_LOGGED_HISTOGRAM_PERCENTAGE(name, sample) \
|
||||
RTC_LOGGED_HISTOGRAM_ENUMERATION(name, sample, 101)
|
||||
|
||||
// Histogram for booleans.
|
||||
#define RTC_HISTOGRAM_BOOLEAN(name, sample) \
|
||||
RTC_HISTOGRAM_ENUMERATION(name, sample, 2)
|
||||
|
||||
// RTC_HISTOGRAM_BOOLEAN with logging.
|
||||
#define RTC_LOGGED_HISTOGRAM_BOOLEAN(name, sample) \
|
||||
RTC_LOGGED_HISTOGRAM_ENUMERATION(name, sample, 2)
|
||||
|
||||
// Histogram for enumerators (evenly spaced buckets).
|
||||
// |boundary| should be above the max enumerator sample.
|
||||
#define RTC_HISTOGRAM_ENUMERATION(name, sample, boundary) \
|
||||
RTC_HISTOGRAM_COMMON_BLOCK(name, sample, false, \
|
||||
webrtc::metrics::HistogramFactoryGetEnumeration(name, boundary))
|
||||
|
||||
// RTC_HISTOGRAM_ENUMERATION with logging.
|
||||
#define RTC_LOGGED_HISTOGRAM_ENUMERATION(name, sample, boundary) \
|
||||
RTC_HISTOGRAM_COMMON_BLOCK(name, sample, true, \
|
||||
RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \
|
||||
webrtc::metrics::HistogramFactoryGetEnumeration(name, boundary))
|
||||
|
||||
// The name of the histogram should not vary.
|
||||
// TODO(asapersson): Consider changing string to const char*.
|
||||
#define RTC_HISTOGRAM_COMMON_BLOCK(constant_name, sample, log, \
|
||||
#define RTC_HISTOGRAM_COMMON_BLOCK(constant_name, sample, \
|
||||
factory_get_invocation) \
|
||||
do { \
|
||||
if (log) { \
|
||||
LOG(LS_INFO) << constant_name << " " << sample; \
|
||||
} \
|
||||
static webrtc::metrics::Histogram* atomic_histogram_pointer = nullptr; \
|
||||
webrtc::metrics::Histogram* histogram_pointer = \
|
||||
rtc::AtomicOps::AcquireLoadPtr(&atomic_histogram_pointer); \
|
||||
@ -213,39 +174,6 @@
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_HISTOGRAM_PERCENTAGE(name, sample))
|
||||
|
||||
// RTC_HISTOGRAMS_COUNTS with logging.
|
||||
#define RTC_LOGGED_HISTOGRAMS_COUNTS_100(index, name, sample) \
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 100, 50))
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAMS_COUNTS_200(index, name, sample) \
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 200, 50))
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAMS_COUNTS_500(index, name, sample) \
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 500, 50))
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAMS_COUNTS_1000(index, name, sample) \
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 1000, 50))
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAMS_COUNTS_10000(index, name, sample) \
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 10000, 50))
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAMS_COUNTS_100000(index, name, sample) \
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS(name, sample, 1, 100000, 50))
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAMS_ENUMERATION(index, name, sample, boundary) \
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_LOGGED_HISTOGRAM_ENUMERATION(name, sample, boundary))
|
||||
|
||||
#define RTC_LOGGED_HISTOGRAMS_PERCENTAGE(index, name, sample) \
|
||||
RTC_HISTOGRAMS_COMMON(index, name, sample, \
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE(name, sample))
|
||||
|
||||
#define RTC_HISTOGRAMS_COMMON(index, name, sample, macro_invocation) \
|
||||
do { \
|
||||
switch (index) { \
|
||||
|
||||
@ -181,7 +181,7 @@ void CallStats::UpdateHistograms() {
|
||||
(clock_->TimeInMilliseconds() - time_of_first_rtt_ms_) / 1000;
|
||||
if (elapsed_sec >= metrics::kMinRunTimeInSeconds) {
|
||||
int64_t avg_rtt_ms = (sum_avg_rtt_ms_ + num_avg_rtt_ / 2) / num_avg_rtt_;
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000(
|
||||
RTC_HISTOGRAM_COUNTS_10000(
|
||||
"WebRTC.Video.AverageRoundTripTimeInMilliseconds", avg_rtt_ms);
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,69 +40,64 @@ ReceiveStatisticsProxy::~ReceiveStatisticsProxy() {
|
||||
}
|
||||
|
||||
void ReceiveStatisticsProxy::UpdateHistograms() {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000(
|
||||
RTC_HISTOGRAM_COUNTS_100000(
|
||||
"WebRTC.Video.ReceiveStreamLifetimeInSeconds",
|
||||
(clock_->TimeInMilliseconds() - start_ms_) / 1000);
|
||||
|
||||
int fraction_lost = report_block_stats_.FractionLostInPercent();
|
||||
if (fraction_lost != -1) {
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE("WebRTC.Video.ReceivedPacketsLostInPercent",
|
||||
fraction_lost);
|
||||
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.ReceivedPacketsLostInPercent",
|
||||
fraction_lost);
|
||||
}
|
||||
const int kMinRequiredSamples = 200;
|
||||
int samples = static_cast<int>(render_fps_tracker_.TotalSampleCount());
|
||||
if (samples > kMinRequiredSamples) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100(
|
||||
"WebRTC.Video.RenderFramesPerSecond",
|
||||
round(render_fps_tracker_.ComputeTotalRate()));
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000(
|
||||
RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.RenderFramesPerSecond",
|
||||
round(render_fps_tracker_.ComputeTotalRate()));
|
||||
RTC_HISTOGRAM_COUNTS_100000(
|
||||
"WebRTC.Video.RenderSqrtPixelsPerSecond",
|
||||
round(render_pixel_tracker_.ComputeTotalRate()));
|
||||
}
|
||||
int width = render_width_counter_.Avg(kMinRequiredSamples);
|
||||
int height = render_height_counter_.Avg(kMinRequiredSamples);
|
||||
if (width != -1) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedWidthInPixels",
|
||||
width);
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedHeightInPixels",
|
||||
height);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedWidthInPixels", width);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedHeightInPixels", height);
|
||||
}
|
||||
int sync_offset_ms = sync_offset_counter_.Avg(kMinRequiredSamples);
|
||||
if (sync_offset_ms != -1) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.AVSyncOffsetInMs",
|
||||
sync_offset_ms);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.AVSyncOffsetInMs", sync_offset_ms);
|
||||
}
|
||||
|
||||
int qp = qp_counters_.vp8.Avg(kMinRequiredSamples);
|
||||
if (qp != -1)
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_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
|
||||
// not per frame. Change decode time to include every frame.
|
||||
const int kMinRequiredDecodeSamples = 5;
|
||||
int decode_ms = decode_time_counter_.Avg(kMinRequiredDecodeSamples);
|
||||
if (decode_ms != -1)
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
|
||||
RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
|
||||
|
||||
int jb_delay_ms = jitter_buffer_delay_counter_.Avg(kMinRequiredDecodeSamples);
|
||||
if (jb_delay_ms != -1) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.JitterBufferDelayInMs",
|
||||
jb_delay_ms);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.JitterBufferDelayInMs",
|
||||
jb_delay_ms);
|
||||
}
|
||||
int target_delay_ms = target_delay_counter_.Avg(kMinRequiredDecodeSamples);
|
||||
if (target_delay_ms != -1) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.TargetDelayInMs",
|
||||
target_delay_ms);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.TargetDelayInMs", target_delay_ms);
|
||||
}
|
||||
int current_delay_ms = current_delay_counter_.Avg(kMinRequiredDecodeSamples);
|
||||
if (current_delay_ms != -1) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.CurrentDelayInMs",
|
||||
current_delay_ms);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.CurrentDelayInMs",
|
||||
current_delay_ms);
|
||||
}
|
||||
|
||||
int delay_ms = delay_counter_.Avg(kMinRequiredDecodeSamples);
|
||||
if (delay_ms != -1)
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms);
|
||||
|
||||
StreamDataCounters rtp = stats_.rtp_stats;
|
||||
StreamDataCounters rtx;
|
||||
@ -113,43 +108,41 @@ void ReceiveStatisticsProxy::UpdateHistograms() {
|
||||
int64_t elapsed_sec =
|
||||
rtp_rtx.TimeSinceFirstPacketInMs(clock_->TimeInMilliseconds()) / 1000;
|
||||
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000(
|
||||
RTC_HISTOGRAM_COUNTS_10000(
|
||||
"WebRTC.Video.BitrateReceivedInKbps",
|
||||
static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
||||
1000));
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000(
|
||||
RTC_HISTOGRAM_COUNTS_10000(
|
||||
"WebRTC.Video.MediaBitrateReceivedInKbps",
|
||||
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000(
|
||||
RTC_HISTOGRAM_COUNTS_10000(
|
||||
"WebRTC.Video.PaddingBitrateReceivedInKbps",
|
||||
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
|
||||
1000));
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000(
|
||||
RTC_HISTOGRAM_COUNTS_10000(
|
||||
"WebRTC.Video.RetransmittedBitrateReceivedInKbps",
|
||||
static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 / elapsed_sec /
|
||||
1000));
|
||||
if (!rtx_stats_.empty()) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000(
|
||||
"WebRTC.Video.RtxBitrateReceivedInKbps",
|
||||
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
||||
1000));
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RtxBitrateReceivedInKbps",
|
||||
static_cast<int>(rtx.transmitted.TotalBytes() *
|
||||
8 / elapsed_sec / 1000));
|
||||
}
|
||||
if (config_.rtp.fec.ulpfec_payload_type != -1) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000(
|
||||
RTC_HISTOGRAM_COUNTS_10000(
|
||||
"WebRTC.Video.FecBitrateReceivedInKbps",
|
||||
static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec / 1000));
|
||||
}
|
||||
const RtcpPacketTypeCounter& counters = stats_.rtcp_packet_type_counts;
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsSentPerMinute",
|
||||
counters.nack_packets * 60 / elapsed_sec);
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsSentPerMinute",
|
||||
counters.fir_packets * 60 / elapsed_sec);
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsSentPerMinute",
|
||||
counters.pli_packets * 60 / elapsed_sec);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsSentPerMinute",
|
||||
counters.nack_packets * 60 / elapsed_sec);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsSentPerMinute",
|
||||
counters.fir_packets * 60 / elapsed_sec);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsSentPerMinute",
|
||||
counters.pli_packets * 60 / elapsed_sec);
|
||||
if (counters.nack_requests > 0) {
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE(
|
||||
"WebRTC.Video.UniqueNackRequestsSentInPercent",
|
||||
counters.UniqueNackRequestsInPercent());
|
||||
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.UniqueNackRequestsSentInPercent",
|
||||
counters.UniqueNackRequestsInPercent());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -522,15 +522,14 @@ bool RtpStreamReceiver::IsPacketRetransmitted(const RTPHeader& header,
|
||||
void RtpStreamReceiver::UpdateHistograms() {
|
||||
FecPacketCounter counter = fec_receiver_->GetPacketCounter();
|
||||
if (counter.num_packets > 0) {
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE(
|
||||
RTC_HISTOGRAM_PERCENTAGE(
|
||||
"WebRTC.Video.ReceivedFecPacketsInPercent",
|
||||
static_cast<int>(counter.num_fec_packets * 100 / counter.num_packets));
|
||||
}
|
||||
if (counter.num_fec_packets > 0) {
|
||||
RTC_LOGGED_HISTOGRAM_PERCENTAGE(
|
||||
"WebRTC.Video.RecoveredMediaPacketsInPercentOfFec",
|
||||
static_cast<int>(counter.num_recovered_packets * 100 /
|
||||
counter.num_fec_packets));
|
||||
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.RecoveredMediaPacketsInPercentOfFec",
|
||||
static_cast<int>(counter.num_recovered_packets *
|
||||
100 / counter.num_fec_packets));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -44,8 +44,7 @@ void SendDelayStats::UpdateHistograms() {
|
||||
for (const auto& it : send_delay_counters_) {
|
||||
AggregatedStats stats = it.second->GetStats();
|
||||
if (stats.num_samples >= kMinRequiredPeriodicSamples) {
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_10000("WebRTC.Video.SendDelayInMs",
|
||||
stats.average);
|
||||
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.SendDelayInMs", stats.average);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,8 +90,8 @@ SendStatisticsProxy::~SendStatisticsProxy() {
|
||||
uma_container_->UpdateHistograms(rtp_config_, stats_);
|
||||
|
||||
int64_t elapsed_sec = (clock_->TimeInMilliseconds() - start_ms_) / 1000;
|
||||
RTC_LOGGED_HISTOGRAM_COUNTS_100000("WebRTC.Video.SendStreamLifetimeInSeconds",
|
||||
elapsed_sec);
|
||||
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.SendStreamLifetimeInSeconds",
|
||||
elapsed_sec);
|
||||
|
||||
if (elapsed_sec >= metrics::kMinRunTimeInSeconds)
|
||||
UpdateCodecTypeHistogram(payload_name_);
|
||||
@ -137,68 +137,68 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms(
|
||||
int in_height = input_height_counter_.Avg(kMinRequiredSamples);
|
||||
int in_fps = round(input_frame_rate_tracker_.ComputeTotalRate());
|
||||
if (in_width != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "InputWidthInPixels", in_width);
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "InputHeightInPixels", in_height);
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_100(
|
||||
kIndex, uma_prefix_ + "InputFramesPerSecond", in_fps);
|
||||
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "InputWidthInPixels",
|
||||
in_width);
|
||||
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "InputHeightInPixels",
|
||||
in_height);
|
||||
RTC_HISTOGRAMS_COUNTS_100(kIndex, uma_prefix_ + "InputFramesPerSecond",
|
||||
in_fps);
|
||||
}
|
||||
int sent_width = sent_width_counter_.Avg(kMinRequiredSamples);
|
||||
int sent_height = sent_height_counter_.Avg(kMinRequiredSamples);
|
||||
int sent_fps = round(sent_frame_rate_tracker_.ComputeTotalRate());
|
||||
if (sent_width != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "SentWidthInPixels", sent_width);
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "SentHeightInPixels", sent_height);
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_100(
|
||||
kIndex, uma_prefix_ + "SentFramesPerSecond", sent_fps);
|
||||
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "SentWidthInPixels",
|
||||
sent_width);
|
||||
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "SentHeightInPixels",
|
||||
sent_height);
|
||||
RTC_HISTOGRAMS_COUNTS_100(kIndex, uma_prefix_ + "SentFramesPerSecond",
|
||||
sent_fps);
|
||||
}
|
||||
int encode_ms = encode_time_counter_.Avg(kMinRequiredSamples);
|
||||
if (encode_ms != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "EncodeTimeInMs",
|
||||
encode_ms);
|
||||
RTC_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "EncodeTimeInMs",
|
||||
encode_ms);
|
||||
}
|
||||
int key_frames_permille = key_frame_counter_.Permille(kMinRequiredSamples);
|
||||
if (key_frames_permille != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_1000(
|
||||
kIndex, uma_prefix_ + "KeyFramesSentInPermille", key_frames_permille);
|
||||
RTC_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "KeyFramesSentInPermille",
|
||||
key_frames_permille);
|
||||
}
|
||||
int quality_limited =
|
||||
quality_limited_frame_counter_.Percent(kMinRequiredSamples);
|
||||
if (quality_limited != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_PERCENTAGE(
|
||||
kIndex, uma_prefix_ + "QualityLimitedResolutionInPercent",
|
||||
quality_limited);
|
||||
RTC_HISTOGRAMS_PERCENTAGE(kIndex,
|
||||
uma_prefix_ + "QualityLimitedResolutionInPercent",
|
||||
quality_limited);
|
||||
}
|
||||
int downscales = quality_downscales_counter_.Avg(kMinRequiredSamples);
|
||||
if (downscales != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_ENUMERATION(
|
||||
RTC_HISTOGRAMS_ENUMERATION(
|
||||
kIndex, uma_prefix_ + "QualityLimitedResolutionDownscales", downscales,
|
||||
20);
|
||||
}
|
||||
int bw_limited = bw_limited_frame_counter_.Percent(kMinRequiredSamples);
|
||||
if (bw_limited != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_PERCENTAGE(
|
||||
RTC_HISTOGRAMS_PERCENTAGE(
|
||||
kIndex, uma_prefix_ + "BandwidthLimitedResolutionInPercent",
|
||||
bw_limited);
|
||||
}
|
||||
int num_disabled = bw_resolutions_disabled_counter_.Avg(kMinRequiredSamples);
|
||||
if (num_disabled != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_ENUMERATION(
|
||||
RTC_HISTOGRAMS_ENUMERATION(
|
||||
kIndex, uma_prefix_ + "BandwidthLimitedResolutionsDisabled",
|
||||
num_disabled, 10);
|
||||
}
|
||||
int delay_ms = delay_counter_.Avg(kMinRequiredSamples);
|
||||
if (delay_ms != -1)
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_100000(
|
||||
kIndex, uma_prefix_ + "SendSideDelayInMs", delay_ms);
|
||||
RTC_HISTOGRAMS_COUNTS_100000(kIndex, uma_prefix_ + "SendSideDelayInMs",
|
||||
delay_ms);
|
||||
|
||||
int max_delay_ms = max_delay_counter_.Avg(kMinRequiredSamples);
|
||||
if (max_delay_ms != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_100000(
|
||||
kIndex, uma_prefix_ + "SendSideDelayMaxInMs", max_delay_ms);
|
||||
RTC_HISTOGRAMS_COUNTS_100000(kIndex, uma_prefix_ + "SendSideDelayMaxInMs",
|
||||
max_delay_ms);
|
||||
}
|
||||
|
||||
for (const auto& it : qp_counters_) {
|
||||
@ -206,17 +206,17 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms(
|
||||
if (qp_vp8 != -1) {
|
||||
int spatial_idx = it.first;
|
||||
if (spatial_idx == -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_200(kIndex, uma_prefix_ + "Encoded.Qp.Vp8",
|
||||
qp_vp8);
|
||||
RTC_HISTOGRAMS_COUNTS_200(kIndex, uma_prefix_ + "Encoded.Qp.Vp8",
|
||||
qp_vp8);
|
||||
} else if (spatial_idx == 0) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_200(
|
||||
kIndex, uma_prefix_ + "Encoded.Qp.Vp8.S0", qp_vp8);
|
||||
RTC_HISTOGRAMS_COUNTS_200(kIndex, uma_prefix_ + "Encoded.Qp.Vp8.S0",
|
||||
qp_vp8);
|
||||
} else if (spatial_idx == 1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_200(
|
||||
kIndex, uma_prefix_ + "Encoded.Qp.Vp8.S1", qp_vp8);
|
||||
RTC_HISTOGRAMS_COUNTS_200(kIndex, uma_prefix_ + "Encoded.Qp.Vp8.S1",
|
||||
qp_vp8);
|
||||
} else if (spatial_idx == 2) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_200(
|
||||
kIndex, uma_prefix_ + "Encoded.Qp.Vp8.S2", qp_vp8);
|
||||
RTC_HISTOGRAMS_COUNTS_200(kIndex, uma_prefix_ + "Encoded.Qp.Vp8.S2",
|
||||
qp_vp8);
|
||||
} else {
|
||||
LOG(LS_WARNING) << "QP stats not recorded for VP8 spatial idx "
|
||||
<< spatial_idx;
|
||||
@ -226,17 +226,17 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms(
|
||||
if (qp_vp9 != -1) {
|
||||
int spatial_idx = it.first;
|
||||
if (spatial_idx == -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_500(kIndex, uma_prefix_ + "Encoded.Qp.Vp9",
|
||||
qp_vp9);
|
||||
RTC_HISTOGRAMS_COUNTS_500(kIndex, uma_prefix_ + "Encoded.Qp.Vp9",
|
||||
qp_vp9);
|
||||
} else if (spatial_idx == 0) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_500(
|
||||
kIndex, uma_prefix_ + "Encoded.Qp.Vp9.S0", qp_vp9);
|
||||
RTC_HISTOGRAMS_COUNTS_500(kIndex, uma_prefix_ + "Encoded.Qp.Vp9.S0",
|
||||
qp_vp9);
|
||||
} else if (spatial_idx == 1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_500(
|
||||
kIndex, uma_prefix_ + "Encoded.Qp.Vp9.S1", qp_vp9);
|
||||
RTC_HISTOGRAMS_COUNTS_500(kIndex, uma_prefix_ + "Encoded.Qp.Vp9.S1",
|
||||
qp_vp9);
|
||||
} else if (spatial_idx == 2) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_500(
|
||||
kIndex, uma_prefix_ + "Encoded.Qp.Vp9.S2", qp_vp9);
|
||||
RTC_HISTOGRAMS_COUNTS_500(kIndex, uma_prefix_ + "Encoded.Qp.Vp9.S2",
|
||||
qp_vp9);
|
||||
} else {
|
||||
LOG(LS_WARNING) << "QP stats not recorded for VP9 spatial layer "
|
||||
<< spatial_idx;
|
||||
@ -250,7 +250,7 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms(
|
||||
if (elapsed_sec >= metrics::kMinRunTimeInSeconds) {
|
||||
int fraction_lost = report_block_stats_.FractionLostInPercent();
|
||||
if (fraction_lost != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_PERCENTAGE(
|
||||
RTC_HISTOGRAMS_PERCENTAGE(
|
||||
kIndex, uma_prefix_ + "SentPacketsLostInPercent", fraction_lost);
|
||||
}
|
||||
|
||||
@ -275,17 +275,17 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms(
|
||||
|
||||
counters.Add(stream_counters);
|
||||
}
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "NackPacketsReceivedPerMinute",
|
||||
counters.nack_packets * 60 / elapsed_sec);
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "FirPacketsReceivedPerMinute",
|
||||
counters.fir_packets * 60 / elapsed_sec);
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "PliPacketsReceivedPerMinute",
|
||||
counters.pli_packets * 60 / elapsed_sec);
|
||||
RTC_HISTOGRAMS_COUNTS_10000(kIndex,
|
||||
uma_prefix_ + "NackPacketsReceivedPerMinute",
|
||||
counters.nack_packets * 60 / elapsed_sec);
|
||||
RTC_HISTOGRAMS_COUNTS_10000(kIndex,
|
||||
uma_prefix_ + "FirPacketsReceivedPerMinute",
|
||||
counters.fir_packets * 60 / elapsed_sec);
|
||||
RTC_HISTOGRAMS_COUNTS_10000(kIndex,
|
||||
uma_prefix_ + "PliPacketsReceivedPerMinute",
|
||||
counters.pli_packets * 60 / elapsed_sec);
|
||||
if (counters.nack_requests > 0) {
|
||||
RTC_LOGGED_HISTOGRAMS_PERCENTAGE(
|
||||
RTC_HISTOGRAMS_PERCENTAGE(
|
||||
kIndex, uma_prefix_ + "UniqueNackRequestsReceivedInPercent",
|
||||
counters.UniqueNackRequestsInPercent());
|
||||
}
|
||||
@ -308,32 +308,32 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms(
|
||||
StreamDataCounters rtp_rtx = rtp;
|
||||
rtp_rtx.Add(rtx);
|
||||
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
RTC_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "BitrateSentInKbps",
|
||||
static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
||||
1000));
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
RTC_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "MediaBitrateSentInKbps",
|
||||
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
RTC_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "PaddingBitrateSentInKbps",
|
||||
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
|
||||
1000));
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
RTC_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "RetransmittedBitrateSentInKbps",
|
||||
static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
|
||||
elapsed_sec / 1000));
|
||||
if (!rtp_config.rtx.ssrcs.empty()) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
RTC_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "RtxBitrateSentInKbps",
|
||||
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
|
||||
1000));
|
||||
}
|
||||
if (rtp_config.fec.red_payload_type != -1) {
|
||||
RTC_LOGGED_HISTOGRAMS_COUNTS_10000(
|
||||
kIndex, uma_prefix_ + "FecBitrateSentInKbps",
|
||||
static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec /
|
||||
1000));
|
||||
RTC_HISTOGRAMS_COUNTS_10000(kIndex,
|
||||
uma_prefix_ + "FecBitrateSentInKbps",
|
||||
static_cast<int>(rtp_rtx.fec.TotalBytes() *
|
||||
8 / elapsed_sec / 1000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user