added WebRTC-QuickPerfTest to RampUpTests and CallPerfTests
BUG=webrtc:7153 Review-Url: https://codereview.webrtc.org/2708723002 Cr-Commit-Position: refs/heads/master@{#16743}
This commit is contained in:
parent
24899e58ec
commit
5328b9eb32
@ -288,7 +288,11 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
|
||||
VoiceEngine::Delete(voice_engine);
|
||||
|
||||
observer.PrintResults();
|
||||
EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.AVSyncOffsetInMs"));
|
||||
|
||||
// In quick test synchronization may not be achieved in time.
|
||||
if (field_trial::FindFullName("WebRTC-QuickPerfTest") != "Enabled") {
|
||||
EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.AVSyncOffsetInMs"));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSyncWithVideoNtpDrift) {
|
||||
|
||||
@ -12,15 +12,20 @@
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/test/testsupport/perf_test.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
#include "webrtc/system_wrappers/include/field_trial.h"
|
||||
|
||||
// Runs a test with 10% packet losses and 10% clock drift, to exercise
|
||||
// both loss concealment and time-stretching code.
|
||||
TEST(NetEqPerformanceTest, Run) {
|
||||
const int kSimulationTimeMs = 10000000;
|
||||
const int kQuickSimulationTimeMs = 100000;
|
||||
const int kLossPeriod = 10; // Drop every 10th packet.
|
||||
const double kDriftFactor = 0.1;
|
||||
int64_t runtime = webrtc::test::NetEqPerformanceTest::Run(
|
||||
kSimulationTimeMs, kLossPeriod, kDriftFactor);
|
||||
webrtc::field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled"
|
||||
? kQuickSimulationTimeMs
|
||||
: kSimulationTimeMs,
|
||||
kLossPeriod, kDriftFactor);
|
||||
ASSERT_GT(runtime, 0);
|
||||
webrtc::test::PrintResult(
|
||||
"neteq_performance", "", "10_pl_10_drift", runtime, "ms", true);
|
||||
@ -31,10 +36,14 @@ TEST(NetEqPerformanceTest, Run) {
|
||||
// more lightweight.
|
||||
TEST(NetEqPerformanceTest, RunClean) {
|
||||
const int kSimulationTimeMs = 10000000;
|
||||
const int kQuickSimulationTimeMs = 100000;
|
||||
const int kLossPeriod = 0; // No losses.
|
||||
const double kDriftFactor = 0.0; // No clock drift.
|
||||
int64_t runtime = webrtc::test::NetEqPerformanceTest::Run(
|
||||
kSimulationTimeMs, kLossPeriod, kDriftFactor);
|
||||
webrtc::field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled"
|
||||
? kQuickSimulationTimeMs
|
||||
: kSimulationTimeMs,
|
||||
kLossPeriod, kDriftFactor);
|
||||
ASSERT_GT(runtime, 0);
|
||||
webrtc::test::PrintResult(
|
||||
"neteq_performance", "", "0_pl_0_drift", runtime, "ms", true);
|
||||
|
||||
@ -20,10 +20,15 @@
|
||||
#include "webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h"
|
||||
#include "webrtc/modules/remote_bitrate_estimator/test/packet_sender.h"
|
||||
#include "webrtc/system_wrappers/include/clock.h"
|
||||
#include "webrtc/system_wrappers/include/field_trial.h"
|
||||
#include "webrtc/test/testsupport/perf_test.h"
|
||||
|
||||
using std::vector;
|
||||
|
||||
namespace {
|
||||
const int kQuickTestTimeoutMs = 500;
|
||||
}
|
||||
|
||||
namespace webrtc {
|
||||
namespace testing {
|
||||
namespace bwe {
|
||||
@ -160,6 +165,11 @@ void BweTest::VerboseLogging(bool enable) {
|
||||
void BweTest::RunFor(int64_t time_ms) {
|
||||
// Set simulation interval from first packet sender.
|
||||
// TODO(holmer): Support different feedback intervals for different flows.
|
||||
|
||||
// For quick perf tests ignore passed timeout
|
||||
if (field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled") {
|
||||
time_ms = kQuickTestTimeoutMs;
|
||||
}
|
||||
if (!uplink_.senders().empty()) {
|
||||
simulation_interval_ms_ = uplink_.senders()[0]->GetFeedbackIntervalMs();
|
||||
} else if (!downlink_.senders().empty()) {
|
||||
@ -370,21 +380,23 @@ void BweTest::RunFairnessTest(BandwidthEstimatorType bwe_type,
|
||||
PrintResults(capacity_kbps, total_utilization.GetBitrateStats(),
|
||||
flow_delay_ms, flow_throughput_kbps);
|
||||
|
||||
for (int i : all_flow_ids) {
|
||||
metric_recorders[i]->PlotThroughputHistogram(
|
||||
title, flow_name, static_cast<int>(num_media_flows), 0);
|
||||
if (field_trial::FindFullName("WebRTC-QuickPerfTest") != "Enabled") {
|
||||
for (int i : all_flow_ids) {
|
||||
metric_recorders[i]->PlotThroughputHistogram(
|
||||
title, flow_name, static_cast<int>(num_media_flows), 0);
|
||||
|
||||
metric_recorders[i]->PlotLossHistogram(title, flow_name,
|
||||
static_cast<int>(num_media_flows),
|
||||
receivers[i]->GlobalPacketLoss());
|
||||
}
|
||||
metric_recorders[i]->PlotLossHistogram(title, flow_name,
|
||||
static_cast<int>(num_media_flows),
|
||||
receivers[i]->GlobalPacketLoss());
|
||||
}
|
||||
|
||||
// Pointless to show delay histogram for TCP flow.
|
||||
for (int i : media_flow_ids) {
|
||||
metric_recorders[i]->PlotDelayHistogram(title, bwe_names[bwe_type],
|
||||
static_cast<int>(num_media_flows),
|
||||
one_way_delay_ms);
|
||||
BWE_TEST_LOGGING_BASELINEBAR(5, bwe_names[bwe_type], one_way_delay_ms, i);
|
||||
// Pointless to show delay histogram for TCP flow.
|
||||
for (int i : media_flow_ids) {
|
||||
metric_recorders[i]->PlotDelayHistogram(title, bwe_names[bwe_type],
|
||||
static_cast<int>(num_media_flows),
|
||||
one_way_delay_ms);
|
||||
BWE_TEST_LOGGING_BASELINEBAR(5, bwe_names[bwe_type], one_way_delay_ms, i);
|
||||
}
|
||||
}
|
||||
|
||||
for (VideoSource* source : sources)
|
||||
|
||||
@ -17,12 +17,17 @@
|
||||
#include "webrtc/base/criticalsection.h"
|
||||
#include "webrtc/base/event.h"
|
||||
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
|
||||
#include "webrtc/system_wrappers/include/field_trial.h"
|
||||
#include "webrtc/test/constants.h"
|
||||
#include "webrtc/test/direct_transport.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
#include "webrtc/video_send_stream.h"
|
||||
|
||||
namespace {
|
||||
const int kShortTimeoutMs = 500;
|
||||
}
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
@ -37,7 +42,13 @@ class RtpRtcpObserver {
|
||||
|
||||
virtual ~RtpRtcpObserver() {}
|
||||
|
||||
virtual bool Wait() { return observation_complete_.Wait(timeout_ms_); }
|
||||
virtual bool Wait() {
|
||||
if (field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled") {
|
||||
observation_complete_.Wait(kShortTimeoutMs);
|
||||
return true;
|
||||
}
|
||||
return observation_complete_.Wait(timeout_ms_);
|
||||
}
|
||||
|
||||
virtual Action OnSendRtp(const uint8_t* packet, size_t length) {
|
||||
return SEND_PACKET;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user