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

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: Fix tests Created 3 years, 3 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 case 8: \
218 macro_invocation; \
219 break; \
220 case 9: \
221 macro_invocation; \
222 break; \
223 case 10: \
224 macro_invocation; \
225 break; \
226 case 11: \
227 macro_invocation; \
228 break; \
229 case 12: \
230 macro_invocation; \
231 break; \
232 case 13: \
233 macro_invocation; \
234 break; \
235 case 14: \
236 macro_invocation; \
237 break; \
238 case 15: \
239 macro_invocation; \
240 break; \
241 default: \
242 RTC_NOTREACHED(); \
243 } \
205 } while (0) 244 } while (0)
206 245
207
208 namespace webrtc { 246 namespace webrtc {
209 namespace metrics { 247 namespace metrics {
210 248
211 // Time that should have elapsed for stats that are gathered once per call. 249 // Time that should have elapsed for stats that are gathered once per call.
212 enum { kMinRunTimeInSeconds = 10 }; 250 enum { kMinRunTimeInSeconds = 10 };
213 251
214 class Histogram; 252 class Histogram;
215 253
216 // Functions for getting pointer to histogram (constructs or finds the named 254 // Functions for getting pointer to histogram (constructs or finds the named
217 // histogram). 255 // histogram).
(...skipping 16 matching lines...) Expand all
234 // Returns name of the histogram. 272 // Returns name of the histogram.
235 const std::string& GetHistogramName(Histogram* histogram_pointer); 273 const std::string& GetHistogramName(Histogram* histogram_pointer);
236 274
237 // Function for adding a |sample| to a histogram. 275 // Function for adding a |sample| to a histogram.
238 void HistogramAdd(Histogram* histogram_pointer, int sample); 276 void HistogramAdd(Histogram* histogram_pointer, int sample);
239 277
240 } // namespace metrics 278 } // namespace metrics
241 } // namespace webrtc 279 } // namespace webrtc
242 280
243 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_ 281 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698