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

Side by Side Diff: webrtc/system_wrappers/include/metrics.h

Issue 2986893002: Piggybacking simulcast id and ALR experiment id into video content type extension. (Closed)
Patch Set: Created 3 years, 4 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
OLDNEW
1 // 1 //
2 // Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 // Copyright (c) 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 #define RTC_HISTOGRAMS_ENUMERATION(index, name, sample, boundary) \ 182 #define RTC_HISTOGRAMS_ENUMERATION(index, name, sample, boundary) \
183 RTC_HISTOGRAMS_COMMON(index, name, sample, \ 183 RTC_HISTOGRAMS_COMMON(index, name, sample, \
184 RTC_HISTOGRAM_ENUMERATION(name, sample, boundary)) 184 RTC_HISTOGRAM_ENUMERATION(name, sample, boundary))
185 185
186 #define RTC_HISTOGRAMS_PERCENTAGE(index, name, sample) \ 186 #define RTC_HISTOGRAMS_PERCENTAGE(index, name, sample) \
187 RTC_HISTOGRAMS_COMMON(index, name, sample, \ 187 RTC_HISTOGRAMS_COMMON(index, name, sample, \
188 RTC_HISTOGRAM_PERCENTAGE(name, sample)) 188 RTC_HISTOGRAM_PERCENTAGE(name, sample))
189 189
190 #define RTC_HISTOGRAMS_COMMON(index, name, sample, macro_invocation) \ 190 #define RTC_HISTOGRAMS_COMMON(index, name, sample, macro_invocation) \
191 do { \ 191 do { \
192 switch (index) { \ 192 switch (index) { \
193 case 0: \ 193 case 0: \
194 macro_invocation; \ 194 macro_invocation; \
195 break; \ 195 break; \
196 case 1: \ 196 case 1: \
197 macro_invocation; \ 197 macro_invocation; \
198 break; \ 198 break; \
199 case 2: \ 199 case 2: \
200 macro_invocation; \ 200 macro_invocation; \
201 break; \ 201 break; \
202 default: \ 202 case 3: \
203 RTC_NOTREACHED(); \ 203 macro_invocation; \
204 } \ 204 break; \
205 case 4: \
206 macro_invocation; \
207 break; \
208 case 5: \
209 macro_invocation; \
210 break; \
211 case 6: \
212 macro_invocation; \
213 break; \
214 case 7: \
215 macro_invocation; \
216 break; \
217 default: \
218 RTC_NOTREACHED(); \
219 } \
205 } while (0) 220 } while (0)
206 221
207
208 namespace webrtc { 222 namespace webrtc {
209 namespace metrics { 223 namespace metrics {
210 224
211 // Time that should have elapsed for stats that are gathered once per call. 225 // Time that should have elapsed for stats that are gathered once per call.
212 enum { kMinRunTimeInSeconds = 10 }; 226 enum { kMinRunTimeInSeconds = 10 };
213 227
214 class Histogram; 228 class Histogram;
215 229
216 // Functions for getting pointer to histogram (constructs or finds the named 230 // Functions for getting pointer to histogram (constructs or finds the named
217 // histogram). 231 // histogram).
(...skipping 16 matching lines...) Expand all
234 // Returns name of the histogram. 248 // Returns name of the histogram.
235 const std::string& GetHistogramName(Histogram* histogram_pointer); 249 const std::string& GetHistogramName(Histogram* histogram_pointer);
236 250
237 // Function for adding a |sample| to a histogram. 251 // Function for adding a |sample| to a histogram.
238 void HistogramAdd(Histogram* histogram_pointer, int sample); 252 void HistogramAdd(Histogram* histogram_pointer, int sample);
239 253
240 } // namespace metrics 254 } // namespace metrics
241 } // namespace webrtc 255 } // namespace webrtc
242 256
243 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_ 257 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698