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

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

Issue 1891913002: Support saving browser metrics to disk and reading them during next run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed some build problems Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_METRICS_SPARSE_HISTOGRAM_H_ 5 #ifndef BASE_METRICS_SPARSE_HISTOGRAM_H_
6 #define BASE_METRICS_SPARSE_HISTOGRAM_H_ 6 #define BASE_METRICS_SPARSE_HISTOGRAM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 HistogramType GetHistogramType() const override; 73 HistogramType GetHistogramType() const override;
74 bool HasConstructionArguments(Sample expected_minimum, 74 bool HasConstructionArguments(Sample expected_minimum,
75 Sample expected_maximum, 75 Sample expected_maximum,
76 uint32_t expected_bucket_count) const override; 76 uint32_t expected_bucket_count) const override;
77 void Add(Sample value) override; 77 void Add(Sample value) override;
78 void AddCount(Sample value, int count) override; 78 void AddCount(Sample value, int count) override;
79 void AddSamples(const HistogramSamples& samples) override; 79 void AddSamples(const HistogramSamples& samples) override;
80 bool AddSamplesFromPickle(base::PickleIterator* iter) override; 80 bool AddSamplesFromPickle(base::PickleIterator* iter) override;
81 std::unique_ptr<HistogramSamples> SnapshotSamples() const override; 81 std::unique_ptr<HistogramSamples> SnapshotSamples() const override;
82 std::unique_ptr<HistogramSamples> SnapshotDelta() override; 82 std::unique_ptr<HistogramSamples> SnapshotDelta() override;
83 std::unique_ptr<HistogramSamples> SnapshotDifference() const override;
83 void WriteHTMLGraph(std::string* output) const override; 84 void WriteHTMLGraph(std::string* output) const override;
84 void WriteAscii(std::string* output) const override; 85 void WriteAscii(std::string* output) const override;
85 86
86 protected: 87 protected:
87 // HistogramBase implementation: 88 // HistogramBase implementation:
88 bool SerializeInfoImpl(base::Pickle* pickle) const override; 89 bool SerializeInfoImpl(base::Pickle* pickle) const override;
89 90
90 private: 91 private:
91 // Clients should always use FactoryGet to create SparseHistogram. 92 // Clients should always use FactoryGet to create SparseHistogram.
92 explicit SparseHistogram(const std::string& name); 93 explicit SparseHistogram(const std::string& name);
(...skipping 29 matching lines...) Expand all
122 123
123 std::unique_ptr<HistogramSamples> samples_; 124 std::unique_ptr<HistogramSamples> samples_;
124 std::unique_ptr<HistogramSamples> logged_samples_; 125 std::unique_ptr<HistogramSamples> logged_samples_;
125 126
126 DISALLOW_COPY_AND_ASSIGN(SparseHistogram); 127 DISALLOW_COPY_AND_ASSIGN(SparseHistogram);
127 }; 128 };
128 129
129 } // namespace base 130 } // namespace base
130 131
131 #endif // BASE_METRICS_SPARSE_HISTOGRAM_H_ 132 #endif // BASE_METRICS_SPARSE_HISTOGRAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698