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

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

Issue 5784005: Properly lock access to static variables.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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/message_loop.cc ('k') | base/metrics/histogram.cc » ('j') | 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 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 class StatisticsRecorder { 637 class StatisticsRecorder {
638 public: 638 public:
639 typedef std::vector<scoped_refptr<Histogram> > Histograms; 639 typedef std::vector<scoped_refptr<Histogram> > Histograms;
640 640
641 StatisticsRecorder(); 641 StatisticsRecorder();
642 642
643 ~StatisticsRecorder(); 643 ~StatisticsRecorder();
644 644
645 // Find out if histograms can now be registered into our list. 645 // Find out if histograms can now be registered into our list.
646 static bool WasStarted(); 646 static bool IsActive();
647 647
648 // Register, or add a new histogram to the collection of statistics. 648 // Register, or add a new histogram to the collection of statistics.
649 static void Register(Histogram* histogram); 649 static void Register(Histogram* histogram);
650 650
651 // Methods for printing histograms. Only histograms which have query as 651 // Methods for printing histograms. Only histograms which have query as
652 // a substring are written to output (an empty string will process all 652 // a substring are written to output (an empty string will process all
653 // registered histograms). 653 // registered histograms).
654 static void WriteHTMLGraph(const std::string& query, std::string* output); 654 static void WriteHTMLGraph(const std::string& query, std::string* output);
655 static void WriteGraph(const std::string& query, std::string* output); 655 static void WriteGraph(const std::string& query, std::string* output);
656 656
(...skipping 28 matching lines...) Expand all
685 685
686 // Dump all known histograms to log. 686 // Dump all known histograms to log.
687 static bool dump_on_exit_; 687 static bool dump_on_exit_;
688 688
689 DISALLOW_COPY_AND_ASSIGN(StatisticsRecorder); 689 DISALLOW_COPY_AND_ASSIGN(StatisticsRecorder);
690 }; 690 };
691 691
692 } // namespace base 692 } // namespace base
693 693
694 #endif // BASE_METRICS_HISTOGRAM_H_ 694 #endif // BASE_METRICS_HISTOGRAM_H_
OLDNEW
« no previous file with comments | « base/message_loop.cc ('k') | base/metrics/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698