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

Unified Diff: base/metrics/histogram.cc

Issue 10830156: Skeleton code of SparseHistogram (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/histogram.h ('k') | base/metrics/histogram_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.cc
===================================================================
--- base/metrics/histogram.cc (revision 150475)
+++ base/metrics/histogram.cc (working copy)
@@ -133,7 +133,7 @@
Sample minimum,
Sample maximum,
size_t bucket_count,
- Flags flags) {
+ int32 flags) {
bool valid_arguments =
InspectConstructionArguments(name, &minimum, &maximum, &bucket_count);
DCHECK(valid_arguments);
@@ -162,7 +162,7 @@
TimeDelta minimum,
TimeDelta maximum,
size_t bucket_count,
- Flags flags) {
+ int32 flags) {
return FactoryGet(name, minimum.InMilliseconds(), maximum.InMilliseconds(),
bucket_count, flags);
}
@@ -442,7 +442,6 @@
declared_min_(minimum),
declared_max_(maximum),
bucket_count_(bucket_count),
- flags_(kNoFlags),
sample_(bucket_count) {}
Histogram::~Histogram() {
@@ -531,7 +530,7 @@
const string Histogram::GetAsciiBucketRange(size_t i) const {
string result;
- if (kHexRangePrintingFlag & flags_)
+ if (kHexRangePrintingFlag & flags())
StringAppendF(&result, "%#x", ranges(i));
else
StringAppendF(&result, "%d", ranges(i));
@@ -636,8 +635,8 @@
StringAppendF(output, ", average = %.1f", average);
}
- if (flags_ & ~kHexRangePrintingFlag)
- StringAppendF(output, " (flags = 0x%x)", flags_ & ~kHexRangePrintingFlag);
+ if (flags() & ~kHexRangePrintingFlag)
+ StringAppendF(output, " (flags = 0x%x)", flags() & ~kHexRangePrintingFlag);
}
void Histogram::WriteAsciiBucketContext(const int64 past,
@@ -685,7 +684,7 @@
Sample minimum,
Sample maximum,
size_t bucket_count,
- Flags flags) {
+ int32 flags) {
bool valid_arguments = Histogram::InspectConstructionArguments(
name, &minimum, &maximum, &bucket_count);
DCHECK(valid_arguments);
@@ -715,7 +714,7 @@
TimeDelta minimum,
TimeDelta maximum,
size_t bucket_count,
- Flags flags) {
+ int32 flags) {
return FactoryGet(name, minimum.InMilliseconds(), maximum.InMilliseconds(),
bucket_count, flags);
}
@@ -781,7 +780,7 @@
// This section provides implementation for BooleanHistogram.
//------------------------------------------------------------------------------
-Histogram* BooleanHistogram::FactoryGet(const string& name, Flags flags) {
+Histogram* BooleanHistogram::FactoryGet(const string& name, int32 flags) {
Histogram* histogram = StatisticsRecorder::FindHistogram(name);
if (!histogram) {
// To avoid racy destruction at shutdown, the following will be leaked.
@@ -819,7 +818,7 @@
Histogram* CustomHistogram::FactoryGet(const string& name,
const vector<Sample>& custom_ranges,
- Flags flags) {
+ int32 flags) {
CHECK(ValidateCustomRanges(custom_ranges));
Histogram* histogram = StatisticsRecorder::FindHistogram(name);
« no previous file with comments | « base/metrics/histogram.h ('k') | base/metrics/histogram_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698