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

Unified Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.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_single_stream.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
index d97bb4178423b6b8ed8b54dfae8cc337fb2ee0d9..b1e478f1f3cd1fc93885989753391e5f41ac86f6 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
@@ -21,6 +21,7 @@
#include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
+#include "webrtc/system_wrappers/include/metrics.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -54,7 +55,8 @@ RemoteBitrateEstimatorSingleStream::RemoteBitrateEstimatorSingleStream(
observer_(observer),
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
last_process_time_(-1),
- process_interval_ms_(kProcessIntervalMs) {
+ process_interval_ms_(kProcessIntervalMs),
+ uma_recorded_(false) {
assert(observer_);
LOG(LS_INFO) << "RemoteBitrateEstimatorSingleStream: Instantiating.";
}
@@ -71,6 +73,14 @@ void RemoteBitrateEstimatorSingleStream::IncomingPacket(
int64_t arrival_time_ms,
size_t payload_size,
const RTPHeader& header) {
+ if (!uma_recorded_) {
+ BweNames type = BweNames::kReceiverTOffset;
+ if (!header.extension.hasTransmissionTimeOffset)
+ type = BweNames::kReceiverNoExtension;
+ RTC_LOGGED_HISTOGRAM_ENUMERATION(
+ kBweTypeHistogram, type, BweNames::kBweNamesMax);
+ uma_recorded_ = true;
+ }
uint32_t ssrc = header.ssrc;
uint32_t rtp_timestamp = header.timestamp +
header.extension.transmissionTimeOffset;

Powered by Google App Engine
This is Rietveld 408576698