OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2014 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 case kStatsValueNameAvailableReceiveBandwidth: | 407 case kStatsValueNameAvailableReceiveBandwidth: |
408 return "googAvailableReceiveBandwidth"; | 408 return "googAvailableReceiveBandwidth"; |
409 case kStatsValueNameAvailableSendBandwidth: | 409 case kStatsValueNameAvailableSendBandwidth: |
410 return "googAvailableSendBandwidth"; | 410 return "googAvailableSendBandwidth"; |
411 case kStatsValueNameAvgEncodeMs: | 411 case kStatsValueNameAvgEncodeMs: |
412 return "googAvgEncodeMs"; | 412 return "googAvgEncodeMs"; |
413 case kStatsValueNameBucketDelay: | 413 case kStatsValueNameBucketDelay: |
414 return "googBucketDelay"; | 414 return "googBucketDelay"; |
415 case kStatsValueNameBandwidthLimitedResolution: | 415 case kStatsValueNameBandwidthLimitedResolution: |
416 return "googBandwidthLimitedResolution"; | 416 return "googBandwidthLimitedResolution"; |
| 417 // STUN ping related attributes. |
| 418 // TODO(zhihuang) Rename these stats to follow the standards. |
| 419 case kStatsValueNameSentPingRequestsTotal: |
| 420 return "requestsSent"; |
| 421 case kStatsValueNameSentPingRequestsBeforeFirstResponse: |
| 422 return "consentRequestsSent"; |
| 423 case kStatsValueNameSentPingResponses: |
| 424 return "responsesSent"; |
| 425 case kStatsValueNameRecvPingRequests: |
| 426 return "requestsReceived"; |
| 427 case kStatsValueNameRecvPingResponses: |
| 428 return "responsesReceived"; |
417 | 429 |
418 // Candidate related attributes. Values are taken from | 430 // Candidate related attributes. Values are taken from |
419 // http://w3c.github.io/webrtc-stats/#rtcstatstype-enum*. | 431 // http://w3c.github.io/webrtc-stats/#rtcstatstype-enum*. |
420 case kStatsValueNameCandidateIPAddress: | 432 case kStatsValueNameCandidateIPAddress: |
421 return "ipAddress"; | 433 return "ipAddress"; |
422 case kStatsValueNameCandidateNetworkType: | 434 case kStatsValueNameCandidateNetworkType: |
423 return "networkType"; | 435 return "networkType"; |
424 case kStatsValueNameCandidatePortNumber: | 436 case kStatsValueNameCandidatePortNumber: |
425 return "portNumber"; | 437 return "portNumber"; |
426 case kStatsValueNameCandidatePriority: | 438 case kStatsValueNameCandidatePriority: |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 // Looks for a report with the given |id|. If one is not found, NULL | 770 // Looks for a report with the given |id|. If one is not found, NULL |
759 // will be returned. | 771 // will be returned. |
760 StatsReport* StatsCollection::Find(const StatsReport::Id& id) { | 772 StatsReport* StatsCollection::Find(const StatsReport::Id& id) { |
761 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 773 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
762 Container::iterator it = std::find_if(list_.begin(), list_.end(), | 774 Container::iterator it = std::find_if(list_.begin(), list_.end(), |
763 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); }); | 775 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); }); |
764 return it == list_.end() ? nullptr : *it; | 776 return it == list_.end() ? nullptr : *it; |
765 } | 777 } |
766 | 778 |
767 } // namespace webrtc | 779 } // namespace webrtc |
OLD | NEW |