| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 // Produce actual graph (set of blank vs non blank char's) for a bucket. | 425 // Produce actual graph (set of blank vs non blank char's) for a bucket. |
| 426 void WriteAsciiBucketGraph(double current_size, double max_size, | 426 void WriteAsciiBucketGraph(double current_size, double max_size, |
| 427 std::string* output) const; | 427 std::string* output) const; |
| 428 | 428 |
| 429 //---------------------------------------------------------------------------- | 429 //---------------------------------------------------------------------------- |
| 430 // Invariant values set at/near construction time | 430 // Invariant values set at/near construction time |
| 431 | 431 |
| 432 // ASCII version of original name given to the constructor. All identically | 432 // ASCII version of original name given to the constructor. All identically |
| 433 // named instances will be coalesced cross-project TODO(jar). | 433 // named instances will be coalesced cross-project TODO(jar). |
| 434 // If a user needs one histogram name to be called by several places in a | 434 // If a user needs one histogram name to be called by several places in a |
| 435 // single process, a central function should be defined by teh user, which | 435 // single process, a central function should be defined by the user, which |
| 436 // defins the single declared instance of the named histogram. | 436 // defins the single declared instance of the named histogram. |
| 437 const std::string histogram_name_; | 437 const std::string histogram_name_; |
| 438 Sample declared_min_; // Less than this goes into counts_[0] | 438 Sample declared_min_; // Less than this goes into counts_[0] |
| 439 Sample declared_max_; // Over this goes into counts_[bucket_count_ - 1]. | 439 Sample declared_max_; // Over this goes into counts_[bucket_count_ - 1]. |
| 440 size_t bucket_count_; // Dimension of counts_[]. | 440 size_t bucket_count_; // Dimension of counts_[]. |
| 441 | 441 |
| 442 // Flag the histogram for recording by UMA via metric_services.h. | 442 // Flag the histogram for recording by UMA via metric_services.h. |
| 443 Flags flags_; | 443 Flags flags_; |
| 444 | 444 |
| 445 // For each index, show the least value that can be stored in the | 445 // For each index, show the least value that can be stored in the |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 // lock protects access to the above map. | 583 // lock protects access to the above map. |
| 584 static Lock* lock_; | 584 static Lock* lock_; |
| 585 | 585 |
| 586 // Dump all known histograms to log. | 586 // Dump all known histograms to log. |
| 587 static bool dump_on_exit_; | 587 static bool dump_on_exit_; |
| 588 | 588 |
| 589 DISALLOW_COPY_AND_ASSIGN(StatisticsRecorder); | 589 DISALLOW_COPY_AND_ASSIGN(StatisticsRecorder); |
| 590 }; | 590 }; |
| 591 | 591 |
| 592 #endif // BASE_HISTOGRAM_H_ | 592 #endif // BASE_HISTOGRAM_H_ |
| OLD | NEW |