| Index: remoting/test/fake_socket_factory.h
|
| diff --git a/remoting/test/fake_socket_factory.h b/remoting/test/fake_socket_factory.h
|
| index e75581824816b9c6f57db39173bfd5961fb3096d..c36b2b7acee6bdb703a55bfc69399dabdc03f56d 100644
|
| --- a/remoting/test/fake_socket_factory.h
|
| +++ b/remoting/test/fake_socket_factory.h
|
| @@ -53,6 +53,19 @@ class FakePacketSocketFactory : public rtc::PacketSocketFactory,
|
| out_of_order_rate_ = out_of_order_rate;
|
| }
|
|
|
| + void ResetStats();
|
| +
|
| + base::TimeDelta average_buffer_delay() {
|
| + return total_packets_received_ > 0
|
| + ? (total_buffer_delay_ / total_packets_received_)
|
| + : base::TimeDelta();
|
| + }
|
| + base::TimeDelta max_buffer_delay() { return max_buffer_delay_; }
|
| + double drop_rate() {
|
| + return static_cast<double>(total_packets_dropped_) /
|
| + (total_packets_received_ + total_packets_dropped_);
|
| + }
|
| +
|
| // rtc::PacketSocketFactory interface.
|
| rtc::AsyncPacketSocket* CreateUdpSocket(
|
| const rtc::SocketAddress& local_address,
|
| @@ -119,6 +132,11 @@ class FakePacketSocketFactory : public rtc::PacketSocketFactory,
|
|
|
| std::list<PendingPacket> pending_packets_;
|
|
|
| + int total_packets_received_ = 0;
|
| + int total_packets_dropped_ = 0;
|
| + base::TimeDelta total_buffer_delay_;
|
| + base::TimeDelta max_buffer_delay_;
|
| +
|
| base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory);
|
|
|