Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/media/webrtc_browsertest_perf.h" | 5 #include "chrome/browser/media/webrtc_browsertest_perf.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "testing/perf/perf_test.h" | 10 #include "testing/perf/perf_test.h" |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 return false; | 29 return false; |
| 30 } | 30 } |
| 31 | 31 |
| 32 EXPECT_TRUE(pc_dict.GetString(Statistic("bytesReceived", ssrc), &value)); | 32 EXPECT_TRUE(pc_dict.GetString(Statistic("bytesReceived", ssrc), &value)); |
| 33 perf_test::PrintResult( | 33 perf_test::PrintResult( |
| 34 "audio_bytes", modifier, "bytes_recv", value, "bytes", false); | 34 "audio_bytes", modifier, "bytes_recv", value, "bytes", false); |
| 35 EXPECT_TRUE(pc_dict.GetString(Statistic("packetsLost", ssrc), &value)); | 35 EXPECT_TRUE(pc_dict.GetString(Statistic("packetsLost", ssrc), &value)); |
| 36 perf_test::PrintResult( | 36 perf_test::PrintResult( |
| 37 "audio_misc", modifier, "packets_lost", value, "frames", false); | 37 "audio_misc", modifier, "packets_lost", value, "frames", false); |
| 38 | 38 |
| 39 EXPECT_TRUE(pc_dict.GetString(Statistic("googExpandRate", ssrc), &value)); | |
|
minyue
2015/03/09 11:56:01
googSpeechExpandRate and googSecondaryDecodedRate
phoglund_chromium
2015/03/09 12:05:12
Nope, apparently not. I made this test a while bac
| |
| 40 perf_test::PrintResult( | |
| 41 "audio_rates", modifier, "goog_expand_rate", value, "%", false); | |
| 42 EXPECT_TRUE( | |
| 43 pc_dict.GetString(Statistic("googSpeechExpandRate", ssrc), &value)); | |
| 44 perf_test::PrintResult( | |
| 45 "audio_rates", modifier, "goog_speech_expand_rate", value, "%", false); | |
| 46 EXPECT_TRUE( | |
| 47 pc_dict.GetString(Statistic("googSecondaryDecodedRate", ssrc), &value)); | |
| 48 perf_test::PrintResult( | |
| 49 "audio_rates", modifier, "goog_secondary_decoded_rate", value, "%", | |
| 50 false); | |
| 51 | |
| 39 return true; | 52 return true; |
| 40 } | 53 } |
| 41 | 54 |
| 42 static bool MaybePrintResultsForAudioSend( | 55 static bool MaybePrintResultsForAudioSend( |
| 43 const std::string& ssrc, const base::DictionaryValue& pc_dict, | 56 const std::string& ssrc, const base::DictionaryValue& pc_dict, |
| 44 const std::string& modifier) { | 57 const std::string& modifier) { |
| 45 std::string value; | 58 std::string value; |
| 46 if (!pc_dict.GetString(Statistic("audioInputLevel", ssrc), &value)) { | 59 if (!pc_dict.GetString(Statistic("audioInputLevel", ssrc), &value)) { |
| 47 // Not an audio send stream. | 60 // Not an audio send stream. |
| 48 return false; | 61 return false; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 242 MaybePrintResultsForAudioSend(ssrc, pc_dict, modifier) || | 255 MaybePrintResultsForAudioSend(ssrc, pc_dict, modifier) || |
| 243 MaybePrintResultsForVideoReceive(ssrc, pc_dict, modifier) || | 256 MaybePrintResultsForVideoReceive(ssrc, pc_dict, modifier) || |
| 244 MaybePrintResultsForVideoSend(ssrc, pc_dict, modifier); | 257 MaybePrintResultsForVideoSend(ssrc, pc_dict, modifier); |
| 245 ASSERT_TRUE(did_recognize_stream_type) << "Failed to figure out which " | 258 ASSERT_TRUE(did_recognize_stream_type) << "Failed to figure out which " |
| 246 "kind of stream SSRC " << ssrc | 259 "kind of stream SSRC " << ssrc |
| 247 << " is. "; | 260 << " is. "; |
| 248 } | 261 } |
| 249 } | 262 } |
| 250 | 263 |
| 251 } // namespace test | 264 } // namespace test |
| OLD | NEW |