Rename discarded_primary_packets to packets_discarded.
This it what it is called in the spec: https://w3c.github.io/webrtc-stats/#dom-rtcreceivedrtpstreamstats-packetsdiscarded Also log the metric in neteq_rtpplay. Bug: webrtc:8199 Change-Id: Ie0262d17b913eb6949daa703844d90327eee0aa4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263725 Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37063}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
c4b5f4da97
commit
1a5a81340d
@ -179,37 +179,28 @@ TEST(StatisticsCalculator, InterruptionCounterDoNotLogBeforeDecoding) {
|
||||
EXPECT_EQ(1, lts.interruption_count);
|
||||
}
|
||||
|
||||
// Test that |discarded_primary_packets| as reported from
|
||||
// |GetOperationsAndState| always matches the arguments to |PacketsDiscarded|
|
||||
// accumulated.
|
||||
TEST(StatisticsCalculator, DiscardedPackets) {
|
||||
StatisticsCalculator statistics_calculator;
|
||||
EXPECT_EQ(
|
||||
0u,
|
||||
statistics_calculator.GetOperationsAndState().discarded_primary_packets);
|
||||
EXPECT_EQ(0u,
|
||||
statistics_calculator.GetLifetimeStatistics().packets_discarded);
|
||||
|
||||
statistics_calculator.PacketsDiscarded(1);
|
||||
EXPECT_EQ(
|
||||
1u,
|
||||
statistics_calculator.GetOperationsAndState().discarded_primary_packets);
|
||||
EXPECT_EQ(1u,
|
||||
statistics_calculator.GetLifetimeStatistics().packets_discarded);
|
||||
|
||||
statistics_calculator.PacketsDiscarded(10);
|
||||
EXPECT_EQ(
|
||||
11u,
|
||||
statistics_calculator.GetOperationsAndState().discarded_primary_packets);
|
||||
EXPECT_EQ(11u,
|
||||
statistics_calculator.GetLifetimeStatistics().packets_discarded);
|
||||
|
||||
// Calling |SecondaryPacketsDiscarded| does not modify
|
||||
// |discarded_primary_packets|.
|
||||
// Calling `SecondaryPacketsDiscarded` does not modify `packets_discarded`.
|
||||
statistics_calculator.SecondaryPacketsDiscarded(1);
|
||||
EXPECT_EQ(
|
||||
11u,
|
||||
statistics_calculator.GetOperationsAndState().discarded_primary_packets);
|
||||
EXPECT_EQ(11u,
|
||||
statistics_calculator.GetLifetimeStatistics().packets_discarded);
|
||||
|
||||
// Calling |FlushedPacketBuffer| does not modify |discarded_primary_packets|.
|
||||
// Calling `FlushedPacketBuffer` does not modify `packets_discarded`.
|
||||
statistics_calculator.FlushedPacketBuffer();
|
||||
EXPECT_EQ(
|
||||
11u,
|
||||
statistics_calculator.GetOperationsAndState().discarded_primary_packets);
|
||||
EXPECT_EQ(11u,
|
||||
statistics_calculator.GetLifetimeStatistics().packets_discarded);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user