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

Unified Diff: webrtc/pc/statscollector_unittest.cc

Issue 3007243002: Add and modify a few ANA stats. (Closed)
Patch Set: Rebase. Created 3 years, 3 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
« no previous file with comments | « webrtc/pc/statscollector.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/statscollector_unittest.cc
diff --git a/webrtc/pc/statscollector_unittest.cc b/webrtc/pc/statscollector_unittest.cc
index 57346760e7fd2a9dc3ae961e6edc28031afb841a..6597e95779ff73770d2562c332339efc9abbd34d 100644
--- a/webrtc/pc/statscollector_unittest.cc
+++ b/webrtc/pc/statscollector_unittest.cc
@@ -454,13 +454,27 @@ void VerifyVoiceSenderInfoReport(const StatsReport* report,
ASSERT_TRUE(sinfo.ana_statistics.fec_action_counter);
EXPECT_EQ(rtc::ToString<uint32_t>(*sinfo.ana_statistics.fec_action_counter),
value_in_report);
- EXPECT_TRUE(GetValue(report,
- StatsReport::kStatsValueNameAnaFrameLengthActionCounter,
- &value_in_report));
- ASSERT_TRUE(sinfo.ana_statistics.frame_length_action_counter);
+ EXPECT_TRUE(GetValue(
+ report, StatsReport::kStatsValueNameAnaFrameLengthIncreaseCounter,
+ &value_in_report));
+ ASSERT_TRUE(sinfo.ana_statistics.frame_length_increase_counter);
+ EXPECT_EQ(rtc::ToString<uint32_t>(
+ *sinfo.ana_statistics.frame_length_increase_counter),
+ value_in_report);
+ EXPECT_TRUE(GetValue(
+ report, StatsReport::kStatsValueNameAnaFrameLengthDecreaseCounter,
+ &value_in_report));
+ ASSERT_TRUE(sinfo.ana_statistics.frame_length_decrease_counter);
EXPECT_EQ(rtc::ToString<uint32_t>(
- *sinfo.ana_statistics.frame_length_action_counter),
+ *sinfo.ana_statistics.frame_length_decrease_counter),
value_in_report);
+ EXPECT_TRUE(GetValue(report,
+ StatsReport::kStatsValueNameAnaUplinkPacketLossFraction,
+ &value_in_report));
+ ASSERT_TRUE(sinfo.ana_statistics.uplink_packet_loss_fraction);
+ EXPECT_EQ(
+ rtc::ToString<float>(*sinfo.ana_statistics.uplink_packet_loss_fraction),
+ value_in_report);
}
// Helper methods to avoid duplication of code.
@@ -489,8 +503,12 @@ void InitVoiceSenderInfo(cricket::VoiceSenderInfo* voice_sender_info) {
rtc::Optional<uint32_t>(115);
voice_sender_info->ana_statistics.fec_action_counter =
rtc::Optional<uint32_t>(116);
- voice_sender_info->ana_statistics.frame_length_action_counter =
+ voice_sender_info->ana_statistics.frame_length_increase_counter =
rtc::Optional<uint32_t>(117);
+ voice_sender_info->ana_statistics.frame_length_decrease_counter =
+ rtc::Optional<uint32_t>(118);
+ voice_sender_info->ana_statistics.uplink_packet_loss_fraction =
+ rtc::Optional<float>(119.0);
}
void UpdateVoiceSenderInfoFromAudioTrack(
« no previous file with comments | « webrtc/pc/statscollector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698