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

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

Issue 137623002: Let MetricsService know about some Android Activities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert 0 to Histogram::kNoFlags Created 6 years, 11 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 | base/metrics/histogram_base.h » ('j') | base/metrics/histogram_base.h » ('J')
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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 base::BooleanHistogram::FactoryGet(name, \ 346 base::BooleanHistogram::FactoryGet(name, \
347 base::HistogramBase::kUmaTargetedHistogramFlag)) 347 base::HistogramBase::kUmaTargetedHistogramFlag))
348 348
349 // The samples should always be strictly less than |boundary_value|. For more 349 // The samples should always be strictly less than |boundary_value|. For more
350 // details, see the comment for the |HISTOGRAM_ENUMERATION| macro, above. 350 // details, see the comment for the |HISTOGRAM_ENUMERATION| macro, above.
351 #define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \ 351 #define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
352 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ 352 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
353 base::LinearHistogram::FactoryGet(name, 1, boundary_value, \ 353 base::LinearHistogram::FactoryGet(name, 1, boundary_value, \
354 boundary_value + 1, base::HistogramBase::kUmaTargetedHistogramFlag)) 354 boundary_value + 1, base::HistogramBase::kUmaTargetedHistogramFlag))
355 355
356 #define UMA_STABILITY_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
Alexei Svitkine (slow) 2014/01/22 21:14:19 Please add a comment that explains this macro (and
Kibeom Kim (inactive) 2014/01/24 19:45:09 Done.
357 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
Alexei Svitkine (slow) 2014/01/22 21:14:19 I would maybe make an UMA_HISTOGRAM_ENUMERATION_WI
Kibeom Kim (inactive) 2014/01/24 19:45:09 Done.
358 base::LinearHistogram::FactoryGet(name, 1, boundary_value, \
359 boundary_value + 1, \
360 base::HistogramBase::kUmaTargetedStabilityHistogramFlag))
361
356 #define UMA_HISTOGRAM_CUSTOM_ENUMERATION(name, sample, custom_ranges) \ 362 #define UMA_HISTOGRAM_CUSTOM_ENUMERATION(name, sample, custom_ranges) \
357 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ 363 STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
358 base::CustomHistogram::FactoryGet(name, custom_ranges, \ 364 base::CustomHistogram::FactoryGet(name, custom_ranges, \
359 base::HistogramBase::kUmaTargetedHistogramFlag)) 365 base::HistogramBase::kUmaTargetedHistogramFlag))
360 366
361 //------------------------------------------------------------------------------ 367 //------------------------------------------------------------------------------
362 368
363 class BucketRanges; 369 class BucketRanges;
364 class SampleVector; 370 class SampleVector;
365 371
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 static bool ValidateCustomRanges(const std::vector<Sample>& custom_ranges); 678 static bool ValidateCustomRanges(const std::vector<Sample>& custom_ranges);
673 static BucketRanges* CreateBucketRangesFromCustomRanges( 679 static BucketRanges* CreateBucketRangesFromCustomRanges(
674 const std::vector<Sample>& custom_ranges); 680 const std::vector<Sample>& custom_ranges);
675 681
676 DISALLOW_COPY_AND_ASSIGN(CustomHistogram); 682 DISALLOW_COPY_AND_ASSIGN(CustomHistogram);
677 }; 683 };
678 684
679 } // namespace base 685 } // namespace base
680 686
681 #endif // BASE_METRICS_HISTOGRAM_H_ 687 #endif // BASE_METRICS_HISTOGRAM_H_
OLDNEW
« no previous file with comments | « no previous file | base/metrics/histogram_base.h » ('j') | base/metrics/histogram_base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698