diff --git a/talk/app/webrtc/statscollector.cc b/talk/app/webrtc/statscollector.cc index 1f6114e42..b87f45b4c 100644 --- a/talk/app/webrtc/statscollector.cc +++ b/talk/app/webrtc/statscollector.cc @@ -279,6 +279,8 @@ void ExtractStats(const cricket::VoiceSenderInfo& info, StatsReport* report) { info.bytes_sent); report->AddValue(StatsReport::kStatsValueNamePacketsSent, info.packets_sent); + report->AddValue(StatsReport::kStatsValueNamePacketsLost, + info.packets_lost); report->AddValue(StatsReport::kStatsValueNameJitterReceived, info.jitter_ms); report->AddValue(StatsReport::kStatsValueNameRtt, info.rtt_ms); @@ -343,6 +345,8 @@ void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { info.bytes_sent); report->AddValue(StatsReport::kStatsValueNamePacketsSent, info.packets_sent); + report->AddValue(StatsReport::kStatsValueNamePacketsLost, + info.packets_lost); report->AddValue(StatsReport::kStatsValueNameFirsReceived, info.firs_rcvd); diff --git a/talk/app/webrtc/statscollector_unittest.cc b/talk/app/webrtc/statscollector_unittest.cc index 4cfdcb9de..24be20af1 100644 --- a/talk/app/webrtc/statscollector_unittest.cc +++ b/talk/app/webrtc/statscollector_unittest.cc @@ -275,6 +275,9 @@ void VerifyVoiceSenderInfoReport(const StatsReport* report, EXPECT_TRUE(GetValue( report, StatsReport::kStatsValueNamePacketsSent, &value_in_report)); EXPECT_EQ(talk_base::ToString(sinfo.packets_sent), value_in_report); + EXPECT_TRUE(GetValue( + report, StatsReport::kStatsValueNamePacketsLost, &value_in_report)); + EXPECT_EQ(talk_base::ToString(sinfo.packets_lost), value_in_report); EXPECT_TRUE(GetValue( report, StatsReport::kStatsValueNameRtt, &value_in_report)); EXPECT_EQ(talk_base::ToString(sinfo.rtt_ms), value_in_report);