Revert "Piping audio interruption metrics to API layer"
This reverts commit 299c4e68461f1c4428b2a919913b161115025dff. Reason for revert: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Win10%20Tester/2753 ../../chrome/browser/media/webrtc/webrtc_browsertest_base.cc(539): error: Expected equality of these values: "ok-got-stats" ExecuteJavascript("verifyLegacyStatsGenerated()", tab) Which is: "Test failed: Error: \"googInterruptionCount\" is not a whitelisted stat. Exposing new metrics in the legacy getStats() API is not allowed. Please follow the standardization process: https://docs.google.com/document/d/1q1CJVUqJ6YW9NNRc0tENkLNny8AHrKZfqjy3SL89zjc/edit?usp=sharing\n at failTest (http://127.0.0.1:50650/webrtc/test_functions.js:46:15)\n at http://127.0.0.1:50650/webrtc/peerconnection.js:481:19" With diff: @@ -1,1 +1,3 @@ -ok-got-stats +Test failed: Error: \"googInterruptionCount\" is not a whitelisted stat. Exposing new metrics in the legacy getStats() API is not allowed. Please follow the standardization process: https://docs.google.com/document/d/1q1CJVUqJ6YW9NNRc0tENkLNny8AHrKZfqjy3SL89zjc/edit?usp=sharing + at failTest (http://127.0.0.1:50650/webrtc/test_functions.js:46:15) + at http://127.0.0.1:50650/webrtc/peerconnection.js:481:19 Original change's description: > Piping audio interruption metrics to API layer > > Bug: webrtc:10549 > Change-Id: Ie6abe5819c5b73dc5f5f89bdc375bad77f44ce97 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134303 > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org> > Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#27788} TBR=henrik.lundin@webrtc.org,kwiberg@webrtc.org,ivoc@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:10549 Change-Id: I345306ba9758c0a3b1597724fa860d3e3fdb8995 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134464 Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27802}
This commit is contained in:
committed by
Commit Bot
parent
98499d5a20
commit
fc02a793c2
@ -259,9 +259,6 @@ void AcmReceiver::GetNetworkStatistics(NetworkStatistics* acm_stat) {
|
||||
neteq_lifetime_stat.delayed_packet_outage_samples;
|
||||
acm_stat->relativePacketArrivalDelayMs =
|
||||
neteq_lifetime_stat.relative_packet_arrival_delay_ms;
|
||||
acm_stat->interruptionCount = neteq_lifetime_stat.interruption_count;
|
||||
acm_stat->totalInterruptionDurationMs =
|
||||
neteq_lifetime_stat.total_interruption_duration_ms;
|
||||
|
||||
NetEqOperationsAndState neteq_operations_and_state =
|
||||
neteq_->GetOperationsAndState();
|
||||
|
||||
@ -130,10 +130,6 @@ struct NetworkStatistics {
|
||||
uint64_t delayedPacketOutageSamples;
|
||||
// arrival delay of incoming packets
|
||||
uint64_t relativePacketArrivalDelayMs;
|
||||
// number of audio interruptions
|
||||
int32_t interruptionCount;
|
||||
// total duration of audio interruptions
|
||||
int32_t totalInterruptionDurationMs;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -90,8 +90,8 @@ struct NetEqLifetimeStatistics {
|
||||
// An interruption is a loss-concealment event lasting at least 150 ms. The
|
||||
// two stats below count the number os such events and the total duration of
|
||||
// these events.
|
||||
int32_t interruption_count = 0;
|
||||
int32_t total_interruption_duration_ms = 0;
|
||||
uint64_t interruption_count = 0;
|
||||
uint64_t total_interruption_duration_ms = 0;
|
||||
};
|
||||
|
||||
// Metrics that describe the operations performed in NetEq, and the internal
|
||||
|
||||
@ -745,7 +745,7 @@ TEST_F(NetEqImplTest, NoAudioInterruptionLoggedBeforeFirstDecode) {
|
||||
}
|
||||
|
||||
auto lifetime_stats = neteq_->GetLifetimeStatistics();
|
||||
EXPECT_EQ(0, lifetime_stats.interruption_count);
|
||||
EXPECT_EQ(0u, lifetime_stats.interruption_count);
|
||||
}
|
||||
|
||||
// This test verifies that NetEq can handle comfort noise and enters/quits codec
|
||||
|
||||
@ -135,31 +135,31 @@ TEST(StatisticsCalculator, InterruptionCounter) {
|
||||
stats.DecodedOutputPlayed();
|
||||
stats.EndExpandEvent(fs_hz);
|
||||
auto lts = stats.GetLifetimeStatistics();
|
||||
EXPECT_EQ(0, lts.interruption_count);
|
||||
EXPECT_EQ(0, lts.total_interruption_duration_ms);
|
||||
EXPECT_EQ(0u, lts.interruption_count);
|
||||
EXPECT_EQ(0u, lts.total_interruption_duration_ms);
|
||||
|
||||
// Add an event that is shorter than 150 ms. Should not be logged.
|
||||
stats.ExpandedVoiceSamples(10 * fs_khz, false); // 10 ms.
|
||||
stats.ExpandedNoiseSamples(139 * fs_khz, false); // 139 ms.
|
||||
stats.EndExpandEvent(fs_hz);
|
||||
lts = stats.GetLifetimeStatistics();
|
||||
EXPECT_EQ(0, lts.interruption_count);
|
||||
EXPECT_EQ(0u, lts.interruption_count);
|
||||
|
||||
// Add an event that is longer than 150 ms. Should be logged.
|
||||
stats.ExpandedVoiceSamples(140 * fs_khz, false); // 140 ms.
|
||||
stats.ExpandedNoiseSamples(11 * fs_khz, false); // 11 ms.
|
||||
stats.EndExpandEvent(fs_hz);
|
||||
lts = stats.GetLifetimeStatistics();
|
||||
EXPECT_EQ(1, lts.interruption_count);
|
||||
EXPECT_EQ(151, lts.total_interruption_duration_ms);
|
||||
EXPECT_EQ(1u, lts.interruption_count);
|
||||
EXPECT_EQ(151u, lts.total_interruption_duration_ms);
|
||||
|
||||
// Add one more long event.
|
||||
stats.ExpandedVoiceSamples(100 * fs_khz, false); // 100 ms.
|
||||
stats.ExpandedNoiseSamples(5000 * fs_khz, false); // 5000 ms.
|
||||
stats.EndExpandEvent(fs_hz);
|
||||
lts = stats.GetLifetimeStatistics();
|
||||
EXPECT_EQ(2, lts.interruption_count);
|
||||
EXPECT_EQ(5100 + 151, lts.total_interruption_duration_ms);
|
||||
EXPECT_EQ(2u, lts.interruption_count);
|
||||
EXPECT_EQ(5100u + 151u, lts.total_interruption_duration_ms);
|
||||
}
|
||||
|
||||
TEST(StatisticsCalculator, InterruptionCounterDoNotLogBeforeDecoding) {
|
||||
@ -172,7 +172,7 @@ TEST(StatisticsCalculator, InterruptionCounterDoNotLogBeforeDecoding) {
|
||||
stats.ExpandedVoiceSamples(151 * fs_khz, false); // 151 ms.
|
||||
stats.EndExpandEvent(fs_hz);
|
||||
auto lts = stats.GetLifetimeStatistics();
|
||||
EXPECT_EQ(0, lts.interruption_count);
|
||||
EXPECT_EQ(0u, lts.interruption_count);
|
||||
|
||||
// Call DecodedOutputPlayed(). Logging should happen after this.
|
||||
stats.DecodedOutputPlayed();
|
||||
@ -181,7 +181,7 @@ TEST(StatisticsCalculator, InterruptionCounterDoNotLogBeforeDecoding) {
|
||||
stats.ExpandedVoiceSamples(151 * fs_khz, false); // 151 ms.
|
||||
stats.EndExpandEvent(fs_hz);
|
||||
lts = stats.GetLifetimeStatistics();
|
||||
EXPECT_EQ(1, lts.interruption_count);
|
||||
EXPECT_EQ(1u, lts.interruption_count);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -79,8 +79,9 @@ void NetEqStatsPlotter::SimulationEnded(int64_t simulation_time_ms) {
|
||||
const auto lifetime_stats_vector = stats_getter_->lifetime_stats();
|
||||
if (!lifetime_stats_vector->empty()) {
|
||||
auto lifetime_stats = lifetime_stats_vector->back().second;
|
||||
printf(" num_interruptions: %d\n", lifetime_stats.interruption_count);
|
||||
printf(" sum_interruption_length_ms: %d ms\n",
|
||||
printf(" num_interruptions: %" PRId64 "\n",
|
||||
lifetime_stats.interruption_count);
|
||||
printf(" sum_interruption_length_ms: %" PRId64 " ms\n",
|
||||
lifetime_stats.total_interruption_duration_ms);
|
||||
printf(" interruption ratio: %f%%\n",
|
||||
100.0 * lifetime_stats.total_interruption_duration_ms /
|
||||
|
||||
Reference in New Issue
Block a user