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

Side by Side Diff: media/cast/logging/stats_event_subscriber.h

Issue 582253002: Cast: Reduce the size of stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nothing Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ 5 #ifndef MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_
6 #define MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ 6 #define MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/linked_ptr.h" 9 #include "base/memory/linked_ptr.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // |min| must be less than |max|. 90 // |min| must be less than |max|.
91 // |width| must divide |max - min| evenly. 91 // |width| must divide |max - min| evenly.
92 SimpleHistogram(int64 min, int64 max, int64 width); 92 SimpleHistogram(int64 min, int64 max, int64 width);
93 93
94 ~SimpleHistogram(); 94 ~SimpleHistogram();
95 95
96 void Add(int64 sample); 96 void Add(int64 sample);
97 97
98 void Reset(); 98 void Reset();
99 99
100 scoped_ptr<base::ListValue> GetHistogram() const; 100 scoped_ptr<base::DictionaryValue> GetHistogram() const;
101 101
102 private: 102 private:
103 int64 min_; 103 int64 min_;
104 int64 max_; 104 int64 max_;
105 int64 width_; 105 int64 width_;
106 std::vector<int> buckets_; 106 std::vector<int> buckets_;
107 }; 107 };
108 108
109 enum CastStat { 109 enum CastStat {
110 // Capture frame rate. 110 // Capture frame rate.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 HistogramMap histograms_; 254 HistogramMap histograms_;
255 255
256 base::ThreadChecker thread_checker_; 256 base::ThreadChecker thread_checker_;
257 DISALLOW_COPY_AND_ASSIGN(StatsEventSubscriber); 257 DISALLOW_COPY_AND_ASSIGN(StatsEventSubscriber);
258 }; 258 };
259 259
260 } // namespace cast 260 } // namespace cast
261 } // namespace media 261 } // namespace media
262 262
263 #endif // MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ 263 #endif // MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_
OLDNEW
« no previous file with comments | « no previous file | media/cast/logging/stats_event_subscriber.cc » ('j') | media/cast/logging/stats_event_subscriber.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698