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

Unified Diff: remoting/test/protocol_perftest.cc

Issue 2369243002: Report network stats in the scroll performance tests (Closed)
Patch Set: . Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/test/fake_socket_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/protocol_perftest.cc
diff --git a/remoting/test/protocol_perftest.cc b/remoting/test/protocol_perftest.cc
index 6b451bb65212680054e38b893c8fa18984e29163..4497e3201b40e1c0c0a9f6cb9300b10e586b1e77 100644
--- a/remoting/test/protocol_perftest.cc
+++ b/remoting/test/protocol_perftest.cc
@@ -311,6 +311,7 @@ class ProtocolPerfTest
std::unique_ptr<FakePortAllocatorFactory> port_allocator_factory(
new FakePortAllocatorFactory(fake_network_dispatcher_));
+ client_socket_factory_ = port_allocator_factory->socket_factory();
port_allocator_factory->socket_factory()->SetBandwidth(
GetParam().bandwidth, GetParam().max_buffers);
port_allocator_factory->socket_factory()->SetLatency(
@@ -368,6 +369,8 @@ class ProtocolPerfTest
std::unique_ptr<SoftwareVideoRenderer> video_renderer_;
std::unique_ptr<ChromotingClient> client_;
+ FakePacketSocketFactory* client_socket_factory_;
+
std::unique_ptr<base::RunLoop> connecting_loop_;
std::unique_ptr<base::RunLoop> waiting_frames_loop_;
@@ -554,6 +557,8 @@ void ProtocolPerfTest::MeasureScrollPerformance(bool use_webrtc) {
++warm_up_frames;
}
+ client_socket_factory_->ResetStats();
+
// Run the test for 2 seconds.
const base::TimeDelta kTestTime = base::TimeDelta::FromSeconds(2);
@@ -584,6 +589,12 @@ void ProtocolPerfTest::MeasureScrollPerformance(bool use_webrtc) {
VLOG(0) << "Bandwidth utilization: "
<< 100 * total_size / (total_time.InSecondsF() * GetParam().bandwidth)
<< "%";
+ VLOG(0) << "Network buffer delay (bufferbloat), average: "
+ << client_socket_factory_->average_buffer_delay().InMilliseconds()
+ << " ms, max:"
+ << client_socket_factory_->max_buffer_delay().InMilliseconds()
+ << " ms";
+ VLOG(0) << "Packet drop rate: " << client_socket_factory_->drop_rate();
}
TEST_P(ProtocolPerfTest, ScrollPerformanceIce) {
« no previous file with comments | « remoting/test/fake_socket_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698