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

Unified Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc

Issue 2206583002: Add UMA for tracking which BWE versions are in use. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 4 years, 4 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
Index: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
index 33bbe7d9b3a7cc3117c7d708ac86996345656610..bcd360d88ab34c7ac8fd939069e61c70e8c6e321 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
@@ -21,6 +21,7 @@
#include "webrtc/modules/pacing/paced_sender.h"
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
+#include "webrtc/system_wrappers/include/metrics.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -91,7 +92,7 @@ bool RemoteBitrateEstimatorAbsSendTime::IsWithinClusterBounds(
total_probes_received_(0),
first_packet_time_ms_(-1),
last_update_ms_(-1),
- ssrcs_() {
+ uma_recorded_(false) {
RTC_DCHECK(observer_);
LOG(LS_INFO) << "RemoteBitrateEstimatorAbsSendTime: Instantiating.";
network_thread_.DetachFromThread();
@@ -237,6 +238,12 @@ void RemoteBitrateEstimatorAbsSendTime::IncomingPacketInfo(
size_t payload_size,
uint32_t ssrc) {
RTC_CHECK(send_time_24bits < (1ul << 24));
+ if (!uma_recorded_) {
+ RTC_LOGGED_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,
// so wrapping works properly.
uint32_t timestamp = send_time_24bits << kAbsSendTimeInterArrivalUpshift;

Powered by Google App Engine
This is Rietveld 408576698