OLD | NEW |
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 NET_DISK_CACHE_BLOCKFILE_STATS_H_ | 5 #ifndef NET_DISK_CACHE_BLOCKFILE_STATS_H_ |
6 #define NET_DISK_CACHE_BLOCKFILE_STATS_H_ | 6 #define NET_DISK_CACHE_BLOCKFILE_STATS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "net/base/net_export.h" |
12 #include "net/disk_cache/blockfile/addr.h" | 13 #include "net/disk_cache/blockfile/addr.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 class HistogramSamples; | 16 class HistogramSamples; |
16 } // namespace base | 17 } // namespace base |
17 | 18 |
18 namespace disk_cache { | 19 namespace disk_cache { |
19 | 20 |
20 typedef std::vector<std::pair<std::string, std::string> > StatsItems; | 21 typedef std::vector<std::pair<std::string, std::string> > StatsItems; |
21 | 22 |
22 // This class stores cache-specific usage information, for tunning purposes. | 23 // This class stores cache-specific usage information, for tunning purposes. |
23 class Stats { | 24 class NET_EXPORT_PRIVATE Stats { |
24 public: | 25 public: |
25 static const int kDataSizesLength = 28; | 26 static const int kDataSizesLength = 28; |
26 enum Counters { | 27 enum Counters { |
27 MIN_COUNTER = 0, | 28 MIN_COUNTER = 0, |
28 OPEN_MISS = MIN_COUNTER, | 29 OPEN_MISS = MIN_COUNTER, |
29 OPEN_HIT, | 30 OPEN_HIT, |
30 CREATE_MISS, | 31 CREATE_MISS, |
31 CREATE_HIT, | 32 CREATE_HIT, |
32 RESURRECT_HIT, | 33 RESURRECT_HIT, |
33 CREATE_ERROR, | 34 CREATE_ERROR, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 Addr storage_addr_; | 92 Addr storage_addr_; |
92 int data_sizes_[kDataSizesLength]; | 93 int data_sizes_[kDataSizesLength]; |
93 int64 counters_[MAX_COUNTER]; | 94 int64 counters_[MAX_COUNTER]; |
94 | 95 |
95 DISALLOW_COPY_AND_ASSIGN(Stats); | 96 DISALLOW_COPY_AND_ASSIGN(Stats); |
96 }; | 97 }; |
97 | 98 |
98 } // namespace disk_cache | 99 } // namespace disk_cache |
99 | 100 |
100 #endif // NET_DISK_CACHE_BLOCKFILE_STATS_H_ | 101 #endif // NET_DISK_CACHE_BLOCKFILE_STATS_H_ |
OLD | NEW |