Adding two new stats to StatsReport.
A follow up of r8415. This is to post the data to the StatsReport. BUG=3867 TEST=chromium + netem + apprtc + chrome://webrtc-internals R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/38139004 Cr-Commit-Position: refs/heads/master@{#8423} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8423 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a744a28b92
commit
652bc37a07
@ -113,6 +113,10 @@ void ExtractStats(const cricket::VoiceReceiverInfo& info, StatsReport* report) {
|
||||
info.delay_estimate_ms);
|
||||
report->AddValue(StatsReport::kStatsValueNameExpandRate,
|
||||
rtc::ToString<float>(info.expand_rate));
|
||||
report->AddValue(StatsReport::kStatsValueNameSpeechExpandRate,
|
||||
rtc::ToString<float>(info.speech_expand_rate));
|
||||
report->AddValue(StatsReport::kStatsValueNameSecondaryDecodedRate,
|
||||
rtc::ToString<float>(info.secondary_decoded_rate));
|
||||
report->AddValue(StatsReport::kStatsValueNamePacketsReceived,
|
||||
info.packets_rcvd);
|
||||
report->AddValue(StatsReport::kStatsValueNamePacketsLost,
|
||||
|
@ -320,6 +320,12 @@ void VerifyVoiceReceiverInfoReport(
|
||||
EXPECT_TRUE(GetValue(
|
||||
report, StatsReport::kStatsValueNameExpandRate, &value_in_report));
|
||||
EXPECT_EQ(rtc::ToString<float>(info.expand_rate), value_in_report);
|
||||
EXPECT_TRUE(GetValue(
|
||||
report, StatsReport::kStatsValueNameSpeechExpandRate, &value_in_report));
|
||||
EXPECT_EQ(rtc::ToString<float>(info.speech_expand_rate), value_in_report);
|
||||
EXPECT_TRUE(GetValue(report, StatsReport::kStatsValueNameSecondaryDecodedRate,
|
||||
&value_in_report));
|
||||
EXPECT_EQ(rtc::ToString<float>(info.secondary_decoded_rate), value_in_report);
|
||||
EXPECT_TRUE(GetValue(
|
||||
report, StatsReport::kStatsValueNamePacketsReceived, &value_in_report));
|
||||
EXPECT_EQ(rtc::ToString<int>(info.packets_rcvd), value_in_report);
|
||||
@ -453,6 +459,8 @@ void InitVoiceReceiverInfo(cricket::VoiceReceiverInfo* voice_receiver_info) {
|
||||
voice_receiver_info->delay_estimate_ms = 119;
|
||||
voice_receiver_info->audio_level = 120;
|
||||
voice_receiver_info->expand_rate = 121;
|
||||
voice_receiver_info->speech_expand_rate = 122;
|
||||
voice_receiver_info->secondary_decoded_rate = 123;
|
||||
}
|
||||
|
||||
class StatsCollectorForTest : public webrtc::StatsCollector {
|
||||
|
@ -416,8 +416,12 @@ const char* StatsReport::Value::display_name() const {
|
||||
return "googRetransmitBitrate";
|
||||
case kStatsValueNameRtt:
|
||||
return "googRtt";
|
||||
case kStatsValueNameSecondaryDecodedRate:
|
||||
return "googSecondaryDecodedRate";
|
||||
case kStatsValueNameSendPacketsDiscarded:
|
||||
return "packetsDiscardedOnSend";
|
||||
case kStatsValueNameSpeechExpandRate:
|
||||
return "googSpeechExpandRate";
|
||||
case kStatsValueNameTargetEncBitrate:
|
||||
return "googTargetEncBitrate";
|
||||
case kStatsValueNameTransmitBitrate:
|
||||
|
@ -208,7 +208,9 @@ class StatsReport {
|
||||
kStatsValueNameRenderDelayMs,
|
||||
kStatsValueNameRetransmitBitrate,
|
||||
kStatsValueNameRtt,
|
||||
kStatsValueNameSecondaryDecodedRate,
|
||||
kStatsValueNameSendPacketsDiscarded,
|
||||
kStatsValueNameSpeechExpandRate,
|
||||
kStatsValueNameTargetDelayMs,
|
||||
kStatsValueNameTargetEncBitrate,
|
||||
kStatsValueNameTrackId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user