OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" | 5 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "content/common/media/media_stream_track_metrics_host_messages.h" | 8 #include "content/common/media/media_stream_track_metrics_host_messages.h" |
9 | 9 |
10 // We use a histogram with a maximum bucket of 16 hours to infinity | 10 // We use a histogram with a maximum bucket of 16 hours to infinity |
11 // for track durations. | 11 // for track durations. |
12 #define UMA_HISTOGRAM_TIMES_16H(name, sample) \ | 12 #define UMA_HISTOGRAM_TIMES_16H(name, sample) \ |
13 UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, \ | 13 UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, \ |
14 base::TimeDelta::FromMilliseconds(100), \ | 14 base::TimeDelta::FromMilliseconds(100), \ |
15 base::TimeDelta::FromHours(16), \ | 15 base::TimeDelta::FromHours(16), \ |
16 50); | 16 50); |
17 | 17 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 DVLOG(3) << "WebRTC.SentAudioTrackDuration: " << duration.InSeconds(); | 80 DVLOG(3) << "WebRTC.SentAudioTrackDuration: " << duration.InSeconds(); |
81 UMA_HISTOGRAM_TIMES_16H("WebRTC.SentAudioTrackDuration", duration); | 81 UMA_HISTOGRAM_TIMES_16H("WebRTC.SentAudioTrackDuration", duration); |
82 } else { | 82 } else { |
83 DVLOG(3) << "WebRTC.SentVideoTrackDuration: " << duration.InSeconds(); | 83 DVLOG(3) << "WebRTC.SentVideoTrackDuration: " << duration.InSeconds(); |
84 UMA_HISTOGRAM_TIMES_16H("WebRTC.SentVideoTrackDuration", duration); | 84 UMA_HISTOGRAM_TIMES_16H("WebRTC.SentVideoTrackDuration", duration); |
85 } | 85 } |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 } // namespace content | 89 } // namespace content |
OLD | NEW |