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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « base/message_loop/message_loop.cc ('k') | base/observer_list.h » ('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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 #define UMA_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \ 280 #define UMA_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \
281 UMA_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101) 281 UMA_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101)
282 282
283 #define UMA_HISTOGRAM_BOOLEAN(name, sample) \ 283 #define UMA_HISTOGRAM_BOOLEAN(name, sample) \
284 STATIC_HISTOGRAM_POINTER_BLOCK(name, AddBoolean(sample), \ 284 STATIC_HISTOGRAM_POINTER_BLOCK(name, AddBoolean(sample), \
285 base::BooleanHistogram::FactoryGet(name, \ 285 base::BooleanHistogram::FactoryGet(name, \
286 base::HistogramBase::kUmaTargetedHistogramFlag)) 286 base::HistogramBase::kUmaTargetedHistogramFlag))
287 287
288 // The samples should always be strictly less than |boundary_value|. For more 288 // The samples should always be strictly less than |boundary_value|. For more
289 // details, see the comment for the |HISTOGRAM_ENUMERATION| macro, above. 289 // details, see the comment for the |LOCAL_HISTOGRAM_ENUMERATION| macro, above.
290 #define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \ 290 #define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
291 HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \ 291 HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \
292 base::HistogramBase::kUmaTargetedHistogramFlag) 292 base::HistogramBase::kUmaTargetedHistogramFlag)
293 293
294 // Similar to UMA_HISTOGRAM_ENUMERATION, but used for recording stability 294 // Similar to UMA_HISTOGRAM_ENUMERATION, but used for recording stability
295 // histograms. Use this if recording a histogram that should be part of the 295 // histograms. Use this if recording a histogram that should be part of the
296 // initial stability log. 296 // initial stability log.
297 #define UMA_STABILITY_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \ 297 #define UMA_STABILITY_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
298 HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \ 298 HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \
299 base::HistogramBase::kUmaStabilityHistogramFlag) 299 base::HistogramBase::kUmaStabilityHistogramFlag)
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 static bool ValidateCustomRanges(const std::vector<Sample>& custom_ranges); 612 static bool ValidateCustomRanges(const std::vector<Sample>& custom_ranges);
613 static BucketRanges* CreateBucketRangesFromCustomRanges( 613 static BucketRanges* CreateBucketRangesFromCustomRanges(
614 const std::vector<Sample>& custom_ranges); 614 const std::vector<Sample>& custom_ranges);
615 615
616 DISALLOW_COPY_AND_ASSIGN(CustomHistogram); 616 DISALLOW_COPY_AND_ASSIGN(CustomHistogram);
617 }; 617 };
618 618
619 } // namespace base 619 } // namespace base
620 620
621 #endif // BASE_METRICS_HISTOGRAM_H_ 621 #endif // BASE_METRICS_HISTOGRAM_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | base/observer_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698