OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 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 |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 SessionStats session_stats; | 999 SessionStats session_stats; |
1000 | 1000 |
1001 cricket::ConnectionInfo connection_info; | 1001 cricket::ConnectionInfo connection_info; |
1002 connection_info.local_candidate = *local_candidate.get(); | 1002 connection_info.local_candidate = *local_candidate.get(); |
1003 connection_info.remote_candidate = *remote_candidate.get(); | 1003 connection_info.remote_candidate = *remote_candidate.get(); |
1004 connection_info.writable = true; | 1004 connection_info.writable = true; |
1005 connection_info.sent_total_bytes = 42; | 1005 connection_info.sent_total_bytes = 42; |
1006 connection_info.recv_total_bytes = 1234; | 1006 connection_info.recv_total_bytes = 1234; |
1007 connection_info.rtt = 1337; | 1007 connection_info.rtt = 1337; |
1008 connection_info.recv_ping_requests = 2020; | 1008 connection_info.recv_ping_requests = 2020; |
1009 connection_info.sent_ping_requests_total = 1010; | 1009 connection_info.sent_ping_requests_total = 2020; |
| 1010 connection_info.sent_ping_requests_before_first_response = 2000; |
1010 connection_info.recv_ping_responses = 4321; | 1011 connection_info.recv_ping_responses = 4321; |
1011 connection_info.sent_ping_responses = 1000; | 1012 connection_info.sent_ping_responses = 1000; |
1012 | 1013 |
1013 cricket::TransportChannelStats transport_channel_stats; | 1014 cricket::TransportChannelStats transport_channel_stats; |
1014 transport_channel_stats.component = cricket::ICE_CANDIDATE_COMPONENT_RTP; | 1015 transport_channel_stats.component = cricket::ICE_CANDIDATE_COMPONENT_RTP; |
1015 transport_channel_stats.connection_infos.push_back(connection_info); | 1016 transport_channel_stats.connection_infos.push_back(connection_info); |
1016 session_stats.transport_stats["transport"].transport_name = "transport"; | 1017 session_stats.transport_stats["transport"].transport_name = "transport"; |
1017 session_stats.transport_stats["transport"].channel_stats.push_back( | 1018 session_stats.transport_stats["transport"].channel_stats.push_back( |
1018 transport_channel_stats); | 1019 transport_channel_stats); |
1019 | 1020 |
(...skipping 14 matching lines...) Expand all Loading... |
1034 "RTCTransport_transport_" + | 1035 "RTCTransport_transport_" + |
1035 rtc::ToString<>(cricket::ICE_CANDIDATE_COMPONENT_RTP); | 1036 rtc::ToString<>(cricket::ICE_CANDIDATE_COMPONENT_RTP); |
1036 expected_pair.local_candidate_id = "RTCIceCandidate_" + local_candidate->id(); | 1037 expected_pair.local_candidate_id = "RTCIceCandidate_" + local_candidate->id(); |
1037 expected_pair.remote_candidate_id = | 1038 expected_pair.remote_candidate_id = |
1038 "RTCIceCandidate_" + remote_candidate->id(); | 1039 "RTCIceCandidate_" + remote_candidate->id(); |
1039 expected_pair.writable = true; | 1040 expected_pair.writable = true; |
1040 expected_pair.bytes_sent = 42; | 1041 expected_pair.bytes_sent = 42; |
1041 expected_pair.bytes_received = 1234; | 1042 expected_pair.bytes_received = 1234; |
1042 expected_pair.current_rtt = 1.337; | 1043 expected_pair.current_rtt = 1.337; |
1043 expected_pair.requests_received = 2020; | 1044 expected_pair.requests_received = 2020; |
1044 expected_pair.requests_sent = 1010; | 1045 expected_pair.requests_sent = 2000; |
1045 expected_pair.responses_received = 4321; | 1046 expected_pair.responses_received = 4321; |
1046 expected_pair.responses_sent = 1000; | 1047 expected_pair.responses_sent = 1000; |
| 1048 expected_pair.consent_requests_sent = (2020 - 2000); |
1047 | 1049 |
1048 EXPECT_TRUE(report->Get(expected_pair.id())); | 1050 EXPECT_TRUE(report->Get(expected_pair.id())); |
1049 EXPECT_EQ( | 1051 EXPECT_EQ( |
1050 expected_pair, | 1052 expected_pair, |
1051 report->Get(expected_pair.id())->cast_to<RTCIceCandidatePairStats>()); | 1053 report->Get(expected_pair.id())->cast_to<RTCIceCandidatePairStats>()); |
1052 | 1054 |
1053 EXPECT_TRUE(report->Get(*expected_pair.local_candidate_id)); | 1055 EXPECT_TRUE(report->Get(*expected_pair.local_candidate_id)); |
1054 ExpectReportContainsCandidate(report, connection_info.local_candidate, true); | 1056 ExpectReportContainsCandidate(report, connection_info.local_candidate, true); |
1055 EXPECT_TRUE(report->Get(*expected_pair.remote_candidate_id)); | 1057 EXPECT_TRUE(report->Get(*expected_pair.remote_candidate_id)); |
1056 ExpectReportContainsCandidate(report, connection_info.remote_candidate, | 1058 ExpectReportContainsCandidate(report, connection_info.remote_candidate, |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; | 1754 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; |
1753 }; | 1755 }; |
1754 | 1756 |
1755 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { | 1757 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { |
1756 collector_->VerifyThreadUsageAndResultsMerging(); | 1758 collector_->VerifyThreadUsageAndResultsMerging(); |
1757 } | 1759 } |
1758 | 1760 |
1759 } // namespace | 1761 } // namespace |
1760 | 1762 |
1761 } // namespace webrtc | 1763 } // namespace webrtc |
OLD | NEW |