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

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc

Issue 2708723002: added WebRTC-QuickPerfTest to RampUpTests and CallPerfTests (Closed)
Patch Set: added QuickPerfTest field-trial to NetEq and VideoSender/BWE tests Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.h" 11 #include "webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.h"
12 12
13 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" 13 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h"
14 #include "webrtc/base/checks.h" 14 #include "webrtc/base/checks.h"
15 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h" 15 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h"
16 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" 16 #include "webrtc/modules/audio_coding/neteq/include/neteq.h"
17 #include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h" 17 #include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
18 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h" 18 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
19 #include "webrtc/modules/include/module_common_types.h" 19 #include "webrtc/modules/include/module_common_types.h"
20 #include "webrtc/system_wrappers/include/clock.h" 20 #include "webrtc/system_wrappers/include/clock.h"
21 #include "webrtc/system_wrappers/include/field_trial.h"
21 #include "webrtc/test/testsupport/fileutils.h" 22 #include "webrtc/test/testsupport/fileutils.h"
22 #include "webrtc/typedefs.h" 23 #include "webrtc/typedefs.h"
23 24
24 using webrtc::NetEq; 25 using webrtc::NetEq;
25 using webrtc::test::AudioLoop; 26 using webrtc::test::AudioLoop;
26 using webrtc::test::RtpGenerator; 27 using webrtc::test::RtpGenerator;
27 using webrtc::WebRtcRTPHeader; 28 using webrtc::WebRtcRTPHeader;
28 29
30 namespace {
31 const int kQuickTestTimeoutMs = 100000;
stefan-webrtc 2017/02/21 09:35:46 Sounds like a lot to have 100 seconds for a quick
ilnik 2017/02/21 09:46:08 The variable is named runtime_ms, but it is not a
stefan-webrtc 2017/02/21 10:26:03 Ok I would prefer if you moved this to where the
hlundin-webrtc 2017/02/21 10:35:04 Yes, agree with Stefan. This is an unexpected over
32 }
33
29 namespace webrtc { 34 namespace webrtc {
30 namespace test { 35 namespace test {
31 36
32 int64_t NetEqPerformanceTest::Run(int runtime_ms, 37 int64_t NetEqPerformanceTest::Run(int runtime_ms,
33 int lossrate, 38 int lossrate,
34 double drift_factor) { 39 double drift_factor) {
40 if (field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled") {
41 runtime_ms = kQuickTestTimeoutMs;
42 }
35 const std::string kInputFileName = 43 const std::string kInputFileName =
36 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"); 44 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
37 const int kSampRateHz = 32000; 45 const int kSampRateHz = 32000;
38 const webrtc::NetEqDecoder kDecoderType = 46 const webrtc::NetEqDecoder kDecoderType =
39 webrtc::NetEqDecoder::kDecoderPCM16Bswb32kHz; 47 webrtc::NetEqDecoder::kDecoderPCM16Bswb32kHz;
40 const std::string kDecoderName = "pcm16-swb32"; 48 const std::string kDecoderName = "pcm16-swb32";
41 const int kPayloadType = 95; 49 const int kPayloadType = 95;
42 50
43 // Initialize NetEq instance. 51 // Initialize NetEq instance.
44 NetEq::Config config; 52 NetEq::Config config;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 drift_flipped = true; 132 drift_flipped = true;
125 } 133 }
126 } 134 }
127 int64_t end_time_ms = clock->TimeInMilliseconds(); 135 int64_t end_time_ms = clock->TimeInMilliseconds();
128 delete neteq; 136 delete neteq;
129 return end_time_ms - start_time_ms; 137 return end_time_ms - start_time_ms;
130 } 138 }
131 139
132 } // namespace test 140 } // namespace test
133 } // namespace webrtc 141 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/call_perf_tests.cc ('k') | webrtc/modules/remote_bitrate_estimator/test/bwe_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698