Remove expired histograms WebRTC.PeerConnection.Simulcast.NumberOfSendEncodings
Bug: chromium:1508060 Change-Id: I4a66e53d0c59c320e1ca3cb5a7afa3caf1275064 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331840 Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Judith Hemp <hempjudith@google.com> Cr-Commit-Position: refs/heads/main@{#41412}
This commit is contained in:
parent
ca58f0eb9d
commit
e56055220b
@ -87,10 +87,6 @@ namespace webrtc {
|
||||
|
||||
namespace {
|
||||
|
||||
// UMA metric names.
|
||||
const char kSimulcastNumberOfEncodings[] =
|
||||
"WebRTC.PeerConnection.Simulcast.NumberOfSendEncodings";
|
||||
|
||||
static const int REPORT_USAGE_PATTERN_DELAY_MS = 60000;
|
||||
|
||||
uint32_t ConvertIceTransportTypeToCandidateFilter(
|
||||
@ -1100,9 +1096,6 @@ PeerConnection::AddTransceiver(
|
||||
: cricket::MEDIA_TYPE_VIDEO));
|
||||
}
|
||||
|
||||
RTC_HISTOGRAM_COUNTS_LINEAR(kSimulcastNumberOfEncodings,
|
||||
init.send_encodings.size(), 0, 7, 8);
|
||||
|
||||
size_t num_rids = absl::c_count_if(init.send_encodings,
|
||||
[](const RtpEncodingParameters& encoding) {
|
||||
return !encoding.rid.empty();
|
||||
|
||||
@ -102,21 +102,6 @@ std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982)
|
||||
|
||||
} // namespace cricket
|
||||
|
||||
namespace {
|
||||
|
||||
#if RTC_METRICS_ENABLED
|
||||
std::vector<SimulcastLayer> CreateLayers(int num_layers, bool active) {
|
||||
rtc::UniqueStringGenerator rid_generator;
|
||||
std::vector<std::string> rids;
|
||||
for (int i = 0; i < num_layers; ++i) {
|
||||
rids.push_back(rid_generator.GenerateString());
|
||||
}
|
||||
return webrtc::CreateLayers(rids, active);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class PeerConnectionSimulcastTests : public ::testing::Test {
|
||||
@ -214,16 +199,6 @@ class PeerConnectionSimulcastTests : public ::testing::Test {
|
||||
rtc::scoped_refptr<PeerConnectionFactoryInterface> pc_factory_;
|
||||
};
|
||||
|
||||
#if RTC_METRICS_ENABLED
|
||||
// This class is used to test the metrics emitted for simulcast.
|
||||
class PeerConnectionSimulcastMetricsTests
|
||||
: public PeerConnectionSimulcastTests,
|
||||
public ::testing::WithParamInterface<int> {
|
||||
protected:
|
||||
PeerConnectionSimulcastMetricsTests() { metrics::Reset(); }
|
||||
};
|
||||
#endif
|
||||
|
||||
// Validates that RIDs are supported arguments when adding a transceiver.
|
||||
TEST_F(PeerConnectionSimulcastTests, CanCreateTransceiverWithRid) {
|
||||
auto pc = CreatePeerConnectionWrapper();
|
||||
@ -603,27 +578,4 @@ TEST_F(PeerConnectionSimulcastTests, SimulcastSldModificationRejected) {
|
||||
EXPECT_TRUE(modified_offer);
|
||||
EXPECT_TRUE(local->SetLocalDescription(std::move(modified_offer)));
|
||||
}
|
||||
|
||||
#if RTC_METRICS_ENABLED
|
||||
|
||||
const int kMaxLayersInMetricsTest = 8;
|
||||
|
||||
// Checks that the number of send encodings is logged in a metric.
|
||||
TEST_P(PeerConnectionSimulcastMetricsTests, NumberOfSendEncodingsIsLogged) {
|
||||
auto local = CreatePeerConnectionWrapper();
|
||||
auto num_layers = GetParam();
|
||||
auto layers = ::CreateLayers(num_layers, true);
|
||||
AddTransceiver(local.get(), layers);
|
||||
EXPECT_EQ(1, metrics::NumSamples(
|
||||
"WebRTC.PeerConnection.Simulcast.NumberOfSendEncodings"));
|
||||
EXPECT_EQ(1, metrics::NumEvents(
|
||||
"WebRTC.PeerConnection.Simulcast.NumberOfSendEncodings",
|
||||
num_layers));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(NumberOfSendEncodings,
|
||||
PeerConnectionSimulcastMetricsTests,
|
||||
::testing::Range(0, kMaxLayersInMetricsTest));
|
||||
#endif
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user