OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_LOAD_STATISTICS_H_ | |
6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_LOAD_STATISTICS_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "base/time/time.h" | |
11 | |
12 namespace subresource_filter { | |
13 | |
14 // Contains statistics and performance metrics collected by the | |
15 // DocumentSubresourceFilter. | |
16 struct DocumentLoadStatistics { | |
17 // The number of subresource loads that went through the | |
18 // DocumentSubresouceFilter::allowLoad method. | |
19 int32_t num_loads_total = 0; | |
20 | |
21 // Statistics on the number of subresource loads that were evaluated, were | |
22 // matched by filtering rules, and were disallowed, respectively, during the | |
23 // lifetime of a DocumentSubresourceFilter. | |
24 int32_t num_loads_evaluated = 0; | |
25 int32_t num_loads_matching_rules = 0; | |
26 int32_t num_loads_disallowed = 0; | |
27 | |
28 // Total time spent in allowLoad() calls while evaluating subresource loads. | |
29 base::TimeDelta evaluation_total_wall_duration; | |
30 base::TimeDelta evaluation_total_cpu_duration; | |
31 }; | |
32 | |
33 } // namespace subresource_filter | |
34 | |
35 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_COMMON_DOCUMENT_LOAD_STATISTICS
_H_ | |
OLD | NEW |