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

Side by Side Diff: webrtc/stats/rtcstats_objects.cc

Issue 2408363002: RTCTransportStats added. (Closed)
Patch Set: nits and rebase with master Created 4 years, 2 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
« no previous file with comments | « webrtc/api/stats/rtcstats_objects.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 12 matching lines...) Expand all
23 const char* RTCStatsIceCandidatePairState::kFailed = "failed"; 23 const char* RTCStatsIceCandidatePairState::kFailed = "failed";
24 const char* RTCStatsIceCandidatePairState::kSucceeded = "succeeded"; 24 const char* RTCStatsIceCandidatePairState::kSucceeded = "succeeded";
25 const char* RTCStatsIceCandidatePairState::kCancelled = "cancelled"; 25 const char* RTCStatsIceCandidatePairState::kCancelled = "cancelled";
26 26
27 // Strings defined in https://tools.ietf.org/html/rfc5245. 27 // Strings defined in https://tools.ietf.org/html/rfc5245.
28 const char* RTCIceCandidateType::kHost = "host"; 28 const char* RTCIceCandidateType::kHost = "host";
29 const char* RTCIceCandidateType::kSrflx = "srflx"; 29 const char* RTCIceCandidateType::kSrflx = "srflx";
30 const char* RTCIceCandidateType::kPrflx = "prflx"; 30 const char* RTCIceCandidateType::kPrflx = "prflx";
31 const char* RTCIceCandidateType::kRelay = "relay"; 31 const char* RTCIceCandidateType::kRelay = "relay";
32 32
33 WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
34 &fingerprint,
35 &fingerprint_algorithm,
36 &base64_certificate,
37 &issuer_certificate_id);
38
39 RTCCertificateStats::RTCCertificateStats(
40 const std::string& id, int64_t timestamp_us)
41 : RTCCertificateStats(std::string(id), timestamp_us) {
42 }
43
44 RTCCertificateStats::RTCCertificateStats(
45 std::string&& id, int64_t timestamp_us)
46 : RTCStats(std::move(id), timestamp_us),
47 fingerprint("fingerprint"),
48 fingerprint_algorithm("fingerprintAlgorithm"),
49 base64_certificate("base64Certificate"),
50 issuer_certificate_id("issuerCertificateId") {
51 }
52
53 RTCCertificateStats::RTCCertificateStats(
54 const RTCCertificateStats& other)
55 : RTCStats(other.id(), other.timestamp_us()),
56 fingerprint(other.fingerprint),
57 fingerprint_algorithm(other.fingerprint_algorithm),
58 base64_certificate(other.base64_certificate),
59 issuer_certificate_id(other.issuer_certificate_id) {
60 }
61
62 RTCCertificateStats::~RTCCertificateStats() {
63 }
64
65 WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel",
66 &label,
67 &protocol,
68 &datachannelid,
69 &state,
70 &messages_sent,
71 &bytes_sent,
72 &messages_received,
73 &bytes_received);
74
75 RTCDataChannelStats::RTCDataChannelStats(
76 const std::string& id, int64_t timestamp_us)
77 : RTCDataChannelStats(std::string(id), timestamp_us) {
78 }
79
80 RTCDataChannelStats::RTCDataChannelStats(
81 std::string&& id, int64_t timestamp_us)
82 : RTCStats(std::move(id), timestamp_us),
83 label("label"),
84 protocol("protocol"),
85 datachannelid("datachannelid"),
86 state("state"),
87 messages_sent("messagesSent"),
88 bytes_sent("bytesSent"),
89 messages_received("messagesReceived"),
90 bytes_received("bytesReceived") {
91 }
92
93 RTCDataChannelStats::RTCDataChannelStats(
94 const RTCDataChannelStats& other)
95 : RTCStats(other.id(), other.timestamp_us()),
96 label(other.label),
97 protocol(other.protocol),
98 datachannelid(other.datachannelid),
99 state(other.state),
100 messages_sent(other.messages_sent),
101 bytes_sent(other.bytes_sent),
102 messages_received(other.messages_received),
103 bytes_received(other.bytes_received) {
104 }
105
106 RTCDataChannelStats::~RTCDataChannelStats() {
107 }
108
33 WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair", 109 WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair",
34 &transport_id, 110 &transport_id,
35 &local_candidate_id, 111 &local_candidate_id,
36 &remote_candidate_id, 112 &remote_candidate_id,
37 &state, 113 &state,
38 &priority, 114 &priority,
39 &nominated, 115 &nominated,
40 &writable, 116 &writable,
41 &readable, 117 &readable,
42 &bytes_sent, 118 &bytes_sent,
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 260
185 RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats( 261 RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(
186 std::string&& id, int64_t timestamp_us) 262 std::string&& id, int64_t timestamp_us)
187 : RTCIceCandidateStats(std::move(id), timestamp_us) { 263 : RTCIceCandidateStats(std::move(id), timestamp_us) {
188 } 264 }
189 265
190 const char* RTCRemoteIceCandidateStats::type() const { 266 const char* RTCRemoteIceCandidateStats::type() const {
191 return kType; 267 return kType;
192 } 268 }
193 269
194 WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
195 &fingerprint,
196 &fingerprint_algorithm,
197 &base64_certificate,
198 &issuer_certificate_id);
199
200 RTCCertificateStats::RTCCertificateStats(
201 const std::string& id, int64_t timestamp_us)
202 : RTCCertificateStats(std::string(id), timestamp_us) {
203 }
204
205 RTCCertificateStats::RTCCertificateStats(
206 std::string&& id, int64_t timestamp_us)
207 : RTCStats(std::move(id), timestamp_us),
208 fingerprint("fingerprint"),
209 fingerprint_algorithm("fingerprintAlgorithm"),
210 base64_certificate("base64Certificate"),
211 issuer_certificate_id("issuerCertificateId") {
212 }
213
214 RTCCertificateStats::RTCCertificateStats(
215 const RTCCertificateStats& other)
216 : RTCStats(other.id(), other.timestamp_us()),
217 fingerprint(other.fingerprint),
218 fingerprint_algorithm(other.fingerprint_algorithm),
219 base64_certificate(other.base64_certificate),
220 issuer_certificate_id(other.issuer_certificate_id) {
221 }
222
223 RTCCertificateStats::~RTCCertificateStats() {
224 }
225
226 WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel",
227 &label,
228 &protocol,
229 &datachannelid,
230 &state,
231 &messages_sent,
232 &bytes_sent,
233 &messages_received,
234 &bytes_received);
235
236 RTCDataChannelStats::RTCDataChannelStats(
237 const std::string& id, int64_t timestamp_us)
238 : RTCDataChannelStats(std::string(id), timestamp_us) {
239 }
240
241 RTCDataChannelStats::RTCDataChannelStats(
242 std::string&& id, int64_t timestamp_us)
243 : RTCStats(std::move(id), timestamp_us),
244 label("label"),
245 protocol("protocol"),
246 datachannelid("datachannelid"),
247 state("state"),
248 messages_sent("messagesSent"),
249 bytes_sent("bytesSent"),
250 messages_received("messagesReceived"),
251 bytes_received("bytesReceived") {
252 }
253
254 RTCDataChannelStats::RTCDataChannelStats(
255 const RTCDataChannelStats& other)
256 : RTCStats(other.id(), other.timestamp_us()),
257 label(other.label),
258 protocol(other.protocol),
259 datachannelid(other.datachannelid),
260 state(other.state),
261 messages_sent(other.messages_sent),
262 bytes_sent(other.bytes_sent),
263 messages_received(other.messages_received),
264 bytes_received(other.bytes_received) {
265 }
266
267 RTCDataChannelStats::~RTCDataChannelStats() {
268 }
269
270 WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", 270 WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
271 &data_channels_opened, 271 &data_channels_opened,
272 &data_channels_closed); 272 &data_channels_closed);
273 273
274 RTCPeerConnectionStats::RTCPeerConnectionStats( 274 RTCPeerConnectionStats::RTCPeerConnectionStats(
275 const std::string& id, int64_t timestamp_us) 275 const std::string& id, int64_t timestamp_us)
276 : RTCPeerConnectionStats(std::string(id), timestamp_us) { 276 : RTCPeerConnectionStats(std::string(id), timestamp_us) {
277 } 277 }
278 278
279 RTCPeerConnectionStats::RTCPeerConnectionStats( 279 RTCPeerConnectionStats::RTCPeerConnectionStats(
280 std::string&& id, int64_t timestamp_us) 280 std::string&& id, int64_t timestamp_us)
281 : RTCStats(std::move(id), timestamp_us), 281 : RTCStats(std::move(id), timestamp_us),
282 data_channels_opened("dataChannelsOpened"), 282 data_channels_opened("dataChannelsOpened"),
283 data_channels_closed("dataChannelsClosed") { 283 data_channels_closed("dataChannelsClosed") {
284 } 284 }
285 285
286 RTCPeerConnectionStats::RTCPeerConnectionStats( 286 RTCPeerConnectionStats::RTCPeerConnectionStats(
287 const RTCPeerConnectionStats& other) 287 const RTCPeerConnectionStats& other)
288 : RTCStats(other.id(), other.timestamp_us()), 288 : RTCStats(other.id(), other.timestamp_us()),
289 data_channels_opened(other.data_channels_opened), 289 data_channels_opened(other.data_channels_opened),
290 data_channels_closed(other.data_channels_closed) { 290 data_channels_closed(other.data_channels_closed) {
291 } 291 }
292 292
293 RTCPeerConnectionStats::~RTCPeerConnectionStats() { 293 RTCPeerConnectionStats::~RTCPeerConnectionStats() {
294 } 294 }
295 295
296 WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
297 &bytes_sent,
298 &bytes_received,
299 &rtcp_transport_stats_id,
300 &active_connection,
301 &selected_candidate_pair_id,
302 &local_certificate_id,
303 &remote_certificate_id);
304
305 RTCTransportStats::RTCTransportStats(
306 const std::string& id, int64_t timestamp_us)
307 : RTCTransportStats(std::string(id), timestamp_us) {
308 }
309
310 RTCTransportStats::RTCTransportStats(
311 std::string&& id, int64_t timestamp_us)
312 : RTCStats(std::move(id), timestamp_us),
313 bytes_sent("bytesSent"),
314 bytes_received("bytesReceived"),
315 rtcp_transport_stats_id("rtcpTransportStatsId"),
316 active_connection("activeConnection"),
317 selected_candidate_pair_id("selectedCandidatePairId"),
318 local_certificate_id("localCertificateId"),
319 remote_certificate_id("remoteCertificateId") {
320 }
321
322 RTCTransportStats::RTCTransportStats(
323 const RTCTransportStats& other)
324 : RTCStats(other.id(), other.timestamp_us()),
325 bytes_sent(other.bytes_sent),
326 bytes_received(other.bytes_received),
327 rtcp_transport_stats_id(other.rtcp_transport_stats_id),
328 active_connection(other.active_connection),
329 selected_candidate_pair_id(other.selected_candidate_pair_id),
330 local_certificate_id(other.local_certificate_id),
331 remote_certificate_id(other.remote_certificate_id) {
332 }
333
334 RTCTransportStats::~RTCTransportStats() {
335 }
336
296 } // namespace webrtc 337 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/stats/rtcstats_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698