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

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

Issue 6592087: Until we have sparse histograms, to track error codes, we are using... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « base/metrics/histogram.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // See header file for details and examples. 8 // See header file for details and examples.
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, 0x37d83bf0L, 0xa9bcae53L, 64 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, 0x37d83bf0L, 0xa9bcae53L,
65 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 65 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L,
66 0x24b4a3a6L, 0xbad03605L, 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 66 0x24b4a3a6L, 0xbad03605L, 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL,
67 0xc4614ab8L, 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, 67 0xc4614ab8L, 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
68 0x2d02ef8dL, 68 0x2d02ef8dL,
69 }; 69 };
70 70
71 typedef Histogram::Count Count; 71 typedef Histogram::Count Count;
72 72
73 // static 73 // static
74 const size_t Histogram::kBucketCount_MAX = 10000u; 74 const size_t Histogram::kBucketCount_MAX = 16384u;
75 75
76 scoped_refptr<Histogram> Histogram::FactoryGet(const std::string& name, 76 scoped_refptr<Histogram> Histogram::FactoryGet(const std::string& name,
77 Sample minimum, Sample maximum, size_t bucket_count, Flags flags) { 77 Sample minimum, Sample maximum, size_t bucket_count, Flags flags) {
78 scoped_refptr<Histogram> histogram(NULL); 78 scoped_refptr<Histogram> histogram(NULL);
79 79
80 // Defensive code. 80 // Defensive code.
81 if (minimum < 1) 81 if (minimum < 1)
82 minimum = 1; 82 minimum = 1;
83 if (maximum > kSampleType_MAX - 1) 83 if (maximum > kSampleType_MAX - 1)
84 maximum = kSampleType_MAX - 1; 84 maximum = kSampleType_MAX - 1;
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 } 1130 }
1131 1131
1132 // static 1132 // static
1133 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; 1133 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL;
1134 // static 1134 // static
1135 base::Lock* StatisticsRecorder::lock_ = NULL; 1135 base::Lock* StatisticsRecorder::lock_ = NULL;
1136 // static 1136 // static
1137 bool StatisticsRecorder::dump_on_exit_ = false; 1137 bool StatisticsRecorder::dump_on_exit_ = false;
1138 1138
1139 } // namespace base 1139 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/histogram.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698