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

Side by Side Diff: base/metrics/histogram.h

Issue 23534009: Re-enable pre-read experiment as a finch field trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment and rebase Created 7 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
« no previous file with comments | « no previous file | chrome/app/client_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Histogram is an object that aggregates statistics, and can summarize them in 5 // Histogram is an object that aggregates statistics, and can summarize them in
6 // various forms, including ASCII graphical, HTML, and numerically (as a 6 // various forms, including ASCII graphical, HTML, and numerically (as a
7 // vector of numbers corresponding to each of the aggregating buckets). 7 // vector of numbers corresponding to each of the aggregating buckets).
8 8
9 // It supports calls to accumulate either time intervals (which are processed 9 // It supports calls to accumulate either time intervals (which are processed
10 // as integral number of milliseconds), or arbitrary integral units. 10 // as integral number of milliseconds), or arbitrary integral units.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 #define UMA_HISTOGRAM_MEDIUM_TIMES(name, sample) UMA_HISTOGRAM_CUSTOM_TIMES( \ 301 #define UMA_HISTOGRAM_MEDIUM_TIMES(name, sample) UMA_HISTOGRAM_CUSTOM_TIMES( \
302 name, sample, base::TimeDelta::FromMilliseconds(10), \ 302 name, sample, base::TimeDelta::FromMilliseconds(10), \
303 base::TimeDelta::FromMinutes(3), 50) 303 base::TimeDelta::FromMinutes(3), 50)
304 304
305 // Use this macro when times can routinely be much longer than 10 seconds. 305 // Use this macro when times can routinely be much longer than 10 seconds.
306 #define UMA_HISTOGRAM_LONG_TIMES(name, sample) UMA_HISTOGRAM_CUSTOM_TIMES( \ 306 #define UMA_HISTOGRAM_LONG_TIMES(name, sample) UMA_HISTOGRAM_CUSTOM_TIMES( \
307 name, sample, base::TimeDelta::FromMilliseconds(1), \ 307 name, sample, base::TimeDelta::FromMilliseconds(1), \
308 base::TimeDelta::FromHours(1), 50) 308 base::TimeDelta::FromHours(1), 50)
309 309
310 // Use this macro when times can routinely be much longer than 10 seconds and
311 // you want 100 buckets.
312 #define UMA_HISTOGRAM_LONG_TIMES_100(name, sample) UMA_HISTOGRAM_CUSTOM_TIMES( \
313 name, sample, base::TimeDelta::FromMilliseconds(1), \
314 base::TimeDelta::FromHours(1), 100)
315
310 #define UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \ 316 #define UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \
311 STATIC_HISTOGRAM_POINTER_BLOCK(name, AddTime(sample), \ 317 STATIC_HISTOGRAM_POINTER_BLOCK(name, AddTime(sample), \
312 base::Histogram::FactoryTimeGet(name, min, max, bucket_count, \ 318 base::Histogram::FactoryTimeGet(name, min, max, bucket_count, \
313 base::HistogramBase::kUmaTargetedHistogramFlag)) 319 base::HistogramBase::kUmaTargetedHistogramFlag))
314 320
315 #define UMA_HISTOGRAM_COUNTS(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ 321 #define UMA_HISTOGRAM_COUNTS(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \
316 name, sample, 1, 1000000, 50) 322 name, sample, 1, 1000000, 50)
317 323
318 #define UMA_HISTOGRAM_COUNTS_100(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ 324 #define UMA_HISTOGRAM_COUNTS_100(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \
319 name, sample, 1, 100, 50) 325 name, sample, 1, 100, 50)
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 static bool ValidateCustomRanges(const std::vector<Sample>& custom_ranges); 672 static bool ValidateCustomRanges(const std::vector<Sample>& custom_ranges);
667 static BucketRanges* CreateBucketRangesFromCustomRanges( 673 static BucketRanges* CreateBucketRangesFromCustomRanges(
668 const std::vector<Sample>& custom_ranges); 674 const std::vector<Sample>& custom_ranges);
669 675
670 DISALLOW_COPY_AND_ASSIGN(CustomHistogram); 676 DISALLOW_COPY_AND_ASSIGN(CustomHistogram);
671 }; 677 };
672 678
673 } // namespace base 679 } // namespace base
674 680
675 #endif // BASE_METRICS_HISTOGRAM_H_ 681 #endif // BASE_METRICS_HISTOGRAM_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/app/client_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698