From a1aea10af2926290cdad55f97b4f6e6a4298082e Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Fri, 16 Jan 2015 13:52:52 +0000 Subject: [PATCH] Revert r8076 "Add UMA stats for tracking the time it takes to reach a BWE of 500, 1000 and 2000 kbps." TBR=perkj@webrtc.org Review URL: https://webrtc-codereview.appspot.com/37629004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8085 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../send_side_bandwidth_estimation.cc | 32 +++---------------- .../send_side_bandwidth_estimation.h | 1 - 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc index 46fc1c920..a08e12300 100644 --- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc +++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc @@ -25,18 +25,6 @@ enum { kAvgPacketSizeBytes = 1000 }; enum { kStartPhaseMs = 2000 }; enum { kBweConverganceTimeMs = 20000 }; -struct UmaRampUpMetric { - std::string metric_name; - int bitrate_kbps; -}; - -const UmaRampUpMetric kUmaRampupMetrics[] = { - {"WebRTC.BWE.RampUpTimeTo500kbpsInMs", 500}, - {"WebRTC.BWE.RampUpTimeTo1000kbpsInMs", 1000}, - {"WebRTC.BWE.RampUpTimeTo2000kbpsInMs", 2000}}; -const size_t kNumUmaRampupMetrics = - sizeof(kUmaRampupMetrics) / sizeof(kUmaRampupMetrics[0]); - // Calculate the rate that TCP-Friendly Rate Control (TFRC) would apply. // The formula in RFC 3448, Section 3.1, is used. uint32_t CalcTfrcBps(int64_t rtt, uint8_t loss) { @@ -62,7 +50,6 @@ uint32_t CalcTfrcBps(int64_t rtt, uint8_t loss) { } } - SendSideBandwidthEstimation::SendSideBandwidthEstimation() : accumulate_lost_packets_Q8_(0), accumulate_expected_packets_(0), @@ -77,8 +64,7 @@ SendSideBandwidthEstimation::SendSideBandwidthEstimation() first_report_time_ms_(-1), initially_lost_packets_(0), bitrate_at_2_seconds_kbps_(0), - uma_update_state_(kNoUpdate), - rampup_uma_stats_updated_(kNumUmaRampupMetrics, false) { + uma_update_state_(kNoUpdate) { } SendSideBandwidthEstimation::~SendSideBandwidthEstimation() {} @@ -153,20 +139,11 @@ void SendSideBandwidthEstimation::UpdateReceiverBlock(uint8_t fraction_loss, void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms, int64_t rtt, int lost_packets) { - int bitrate_kbps = static_cast((bitrate_ + 500) / 1000); - for (size_t i = 0; i < kNumUmaRampupMetrics; ++i) { - if (!rampup_uma_stats_updated_[i] && - bitrate_kbps >= kUmaRampupMetrics[i].bitrate_kbps) { - RTC_HISTOGRAM_COUNTS_100000(kUmaRampupMetrics[i].metric_name, - now_ms - first_report_time_ms_); - rampup_uma_stats_updated_[i] = true; - } - } if (IsInStartPhase(now_ms)) { initially_lost_packets_ += lost_packets; } else if (uma_update_state_ == kNoUpdate) { uma_update_state_ = kFirstDone; - bitrate_at_2_seconds_kbps_ = bitrate_kbps; + bitrate_at_2_seconds_kbps_ = (bitrate_ + 500) / 1000; RTC_HISTOGRAM_COUNTS( "WebRTC.BWE.InitiallyLostPackets", initially_lost_packets_, 0, 100, 50); RTC_HISTOGRAM_COUNTS( @@ -179,8 +156,9 @@ void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms, } 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); + int bitrate_diff_kbps = std::max( + bitrate_at_2_seconds_kbps_ - static_cast((bitrate_ + 500) / 1000), + 0); RTC_HISTOGRAM_COUNTS( "WebRTC.BWE.InitialVsConvergedDiff", bitrate_diff_kbps, 0, 2000, 50); } diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h index 427909b3e..20ce5ee3a 100644 --- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h +++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h @@ -81,7 +81,6 @@ class SendSideBandwidthEstimation { int initially_lost_packets_; int bitrate_at_2_seconds_kbps_; UmaState uma_update_state_; - std::vector rampup_uma_stats_updated_; }; } // namespace webrtc #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_SEND_SIDE_BANDWIDTH_ESTIMATION_H_