19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_REWRITE_STATS_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_REWRITE_STATS_H_
29 namespace net_instaweb {
37 static const char kNumCacheControlRewritableResources[];
38 static const char kNumCacheControlNotRewritableResources[];
39 static const char kNumResourceFetchSuccesses[];
40 static const char kNumResourceFetchFailures[];
41 static const char kResourceUrlDomainAcceptances[];
42 static const char kResourceUrlDomainRejections[];
56 Variable* cached_output_hits() {
return cached_output_hits_; }
57 Variable* cached_output_missed_deadline() {
58 return cached_output_missed_deadline_; }
59 Variable* cached_output_misses() {
return cached_output_misses_;
61 Variable* cached_resource_fetches() {
return cached_resource_fetches_; }
62 Variable* failed_filter_resource_fetches() {
63 return failed_filter_resource_fetches_;
65 Variable* num_cache_control_rewritable_resources() {
66 return num_cache_control_rewritable_resources_;
68 Variable* num_cache_control_not_rewritable_resources() {
69 return num_cache_control_not_rewritable_resources_;
71 Variable* num_flushes() {
return num_flushes_; }
72 Variable* resource_404_count() {
return resource_404_count_; }
73 Variable* resource_url_domain_acceptances() {
74 return resource_url_domain_acceptances_;
76 Variable* resource_url_domain_rejections() {
77 return resource_url_domain_rejections_;
79 Variable* slurp_404_count() {
return slurp_404_count_; }
80 Variable* succeeded_filter_resource_fetches() {
81 return succeeded_filter_resource_fetches_;
83 Variable* total_page_load_ms() {
return total_page_load_ms_; }
87 Variable* fallback_responses_served() {
88 return fallback_responses_served_;
91 Variable* num_proactively_freshen_user_facing_request() {
92 return num_proactively_freshen_user_facing_request_;
95 Variable* fallback_responses_served_while_revalidate() {
96 return fallback_responses_served_while_revalidate_;
99 Variable* num_conditional_refreshes() {
return num_conditional_refreshes_; }
101 Variable* ipro_served() {
return ipro_served_; }
102 Variable* ipro_not_in_cache() {
return ipro_not_in_cache_; }
103 Variable* ipro_not_rewritable() {
return ipro_not_rewritable_; }
105 Variable* downstream_cache_purge_attempts() {
106 return downstream_cache_purge_attempts_;
108 Variable* successful_downstream_cache_purges() {
109 return successful_downstream_cache_purges_;
112 Histogram* beacon_timings_ms_histogram() {
113 return beacon_timings_ms_histogram_;
119 Histogram* backend_latency_histogram() {
return backend_latency_histogram_; }
129 return thread_queue_depths_[pool];
132 TimedVariable* num_rewrites_executed() {
return num_rewrites_executed_; }
133 TimedVariable* num_rewrites_dropped() {
return num_rewrites_dropped_; }
136 Variable* cached_output_hits_;
137 Variable* cached_output_missed_deadline_;
138 Variable* cached_output_misses_;
139 Variable* cached_resource_fetches_;
140 Variable* failed_filter_resource_fetches_;
141 Variable* num_cache_control_rewritable_resources_;
142 Variable* num_cache_control_not_rewritable_resources_;
143 Variable* num_flushes_;
144 Variable* page_load_count_;
145 Variable* resource_404_count_;
146 Variable* resource_url_domain_acceptances_;
147 Variable* resource_url_domain_rejections_;
148 Variable* slurp_404_count_;
149 Variable* succeeded_filter_resource_fetches_;
150 Variable* total_page_load_ms_;
151 Variable* fallback_responses_served_;
152 Variable* num_proactively_freshen_user_facing_request_;
153 Variable* fallback_responses_served_while_revalidate_;
154 Variable* num_conditional_refreshes_;
155 Variable* ipro_served_;
156 Variable* ipro_not_in_cache_;
157 Variable* ipro_not_rewritable_;
158 Variable* downstream_cache_purge_attempts_;
159 Variable* successful_downstream_cache_purges_;
161 Histogram* beacon_timings_ms_histogram_;
162 Histogram* fetch_latency_histogram_;
163 Histogram* rewrite_latency_histogram_;
164 Histogram* backend_latency_histogram_;
166 TimedVariable* total_fetch_count_;
167 TimedVariable* total_rewrite_count_;
168 TimedVariable* num_rewrites_executed_;
169 TimedVariable* num_rewrites_dropped_;
171 std::vector<Waveform*> thread_queue_depths_;
TimedVariable * total_fetch_count()
Number of .pagespeed. resources fetched.
Definition: rewrite_stats.h:122
Definition: statistics.h:43
static const char kDownstreamCachePurgeAttempts[]
Variable tracking number of downstream cache purges issued.
Definition: rewrite_stats.h:45
Variable * page_load_count()
Definition: rewrite_stats.h:86
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
Histogram * fetch_latency_histogram()
.pagespeed. resource latency in ms.
Definition: rewrite_stats.h:116
WorkerPoolCategory
Definition: rewrite_driver_factory.h:75
Histogram * rewrite_latency_histogram()
HTML rewrite latency in ms.
Definition: rewrite_stats.h:118
static const char kSuccessfulDownstreamCachePurges[]
Definition: rewrite_stats.h:48
Waveform * thread_queue_depth(RewriteDriverFactory::WorkerPoolCategory pool)
Definition: rewrite_stats.h:128
TimedVariable * total_rewrite_count()
Number of HTML pages rewritten.
Definition: rewrite_stats.h:124
Definition: statistics.h:138
Definition: thread_system.h:40
Definition: statistics.h:298
Collects a few specific statistics variables related to Rewriting.
Definition: rewrite_stats.h:35
Timer interface, made virtual so it can be mocked for tests.
Definition: timer.h:27