OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 | 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } while (0) | 215 } while (0) |
216 | 216 |
217 //------------------------------------------------------------------------------ | 217 //------------------------------------------------------------------------------ |
218 | 218 |
219 class BooleanHistogram; | 219 class BooleanHistogram; |
220 class CustomHistogram; | 220 class CustomHistogram; |
221 class Histogram; | 221 class Histogram; |
222 class LinearHistogram; | 222 class LinearHistogram; |
223 class Pickle; | 223 class Pickle; |
224 | 224 |
225 namespace disk_cache { | |
226 class StatsHistogram; | |
227 }; // namespace disk_cache | |
228 | |
229 | |
230 class Histogram : public base::RefCountedThreadSafe<Histogram> { | 225 class Histogram : public base::RefCountedThreadSafe<Histogram> { |
231 public: | 226 public: |
232 typedef int Sample; // Used for samples (and ranges of samples). | 227 typedef int Sample; // Used for samples (and ranges of samples). |
233 typedef int Count; // Used to count samples in a bucket. | 228 typedef int Count; // Used to count samples in a bucket. |
234 static const Sample kSampleType_MAX = INT_MAX; | 229 static const Sample kSampleType_MAX = INT_MAX; |
235 | 230 |
236 typedef std::vector<Count> Counts; | 231 typedef std::vector<Count> Counts; |
237 typedef std::vector<Sample> Ranges; | 232 typedef std::vector<Sample> Ranges; |
238 | 233 |
239 /* These enums are meant to facilitate deserialization of renderer histograms | 234 /* These enums are meant to facilitate deserialization of renderer histograms |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 // lock protects access to the above map. | 616 // lock protects access to the above map. |
622 static Lock* lock_; | 617 static Lock* lock_; |
623 | 618 |
624 // Dump all known histograms to log. | 619 // Dump all known histograms to log. |
625 static bool dump_on_exit_; | 620 static bool dump_on_exit_; |
626 | 621 |
627 DISALLOW_COPY_AND_ASSIGN(StatisticsRecorder); | 622 DISALLOW_COPY_AND_ASSIGN(StatisticsRecorder); |
628 }; | 623 }; |
629 | 624 |
630 #endif // BASE_HISTOGRAM_H_ | 625 #endif // BASE_HISTOGRAM_H_ |
OLD | NEW |