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 #ifndef NET_DISK_CACHE_STATS_H_ | 5 #ifndef NET_DISK_CACHE_STATS_H_ |
6 #define NET_DISK_CACHE_STATS_H_ | 6 #define NET_DISK_CACHE_STATS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 INVALID_ENTRY, | 36 INVALID_ENTRY, |
37 OPEN_ENTRIES, // Average number of open entries. | 37 OPEN_ENTRIES, // Average number of open entries. |
38 MAX_ENTRIES, // Maximum number of open entries. | 38 MAX_ENTRIES, // Maximum number of open entries. |
39 TIMER, | 39 TIMER, |
40 READ_DATA, | 40 READ_DATA, |
41 WRITE_DATA, | 41 WRITE_DATA, |
42 OPEN_RANKINGS, // An entry has to be read just to modify rankings. | 42 OPEN_RANKINGS, // An entry has to be read just to modify rankings. |
43 GET_RANKINGS, // We got the ranking info without reading the whole entry. | 43 GET_RANKINGS, // We got the ranking info without reading the whole entry. |
44 FATAL_ERROR, | 44 FATAL_ERROR, |
45 LAST_REPORT, // Time of the last time we sent a report. | 45 LAST_REPORT, // Time of the last time we sent a report. |
46 LAST_REPORT_TIMER, // Timer count since last report. | 46 LAST_REPORT_TIMER, // Timer count of the last time we sent a report. |
47 MAX_COUNTER | 47 MAX_COUNTER |
48 }; | 48 }; |
49 | 49 |
50 Stats() : backend_(NULL) {} | 50 Stats() : backend_(NULL) {} |
51 ~Stats(); | 51 ~Stats(); |
52 | 52 |
53 bool Init(BackendImpl* backend, uint32* storage_addr); | 53 bool Init(BackendImpl* backend, uint32* storage_addr); |
54 | 54 |
55 // Tracks changes to the stoage space used by an entry. | 55 // Tracks changes to the stoage space used by an entry. |
56 void ModifyStorageStats(int32 old_size, int32 new_size); | 56 void ModifyStorageStats(int32 old_size, int32 new_size); |
(...skipping 28 matching lines...) Expand all Loading... |
85 int data_sizes_[kDataSizesLength]; | 85 int data_sizes_[kDataSizesLength]; |
86 int64 counters_[MAX_COUNTER]; | 86 int64 counters_[MAX_COUNTER]; |
87 scoped_ptr<StatsHistogram> size_histogram_; | 87 scoped_ptr<StatsHistogram> size_histogram_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(Stats); | 89 DISALLOW_COPY_AND_ASSIGN(Stats); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace disk_cache | 92 } // namespace disk_cache |
93 | 93 |
94 #endif // NET_DISK_CACHE_STATS_H_ | 94 #endif // NET_DISK_CACHE_STATS_H_ |
OLD | NEW |