OLD | NEW |
| (Empty) |
1 // Copyright 2008-2010 Google Inc. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 // ======================================================================== | |
15 | |
16 // Declares the usage metrics used by the setup module. | |
17 | |
18 #ifndef OMAHA_SETUP_SETUP_METRICS_H_ | |
19 #define OMAHA_SETUP_SETUP_METRICS_H_ | |
20 | |
21 #include "omaha/statsreport/metrics.h" | |
22 | |
23 namespace omaha { | |
24 | |
25 // TODO(omaha3): These descriptions need to be updated to match Omaha 3. | |
26 // They may also need to be moved to other files. | |
27 | |
28 // How many times the Install() function was called. | |
29 DECLARE_METRIC_count(setup_install_total); | |
30 // How many times the Install() function succeeded. | |
31 DECLARE_METRIC_count(setup_install_succeeded); | |
32 | |
33 // How many times the UpdateSelfSilently() function was called. | |
34 DECLARE_METRIC_count(setup_update_self_total); | |
35 // How many times the UpdateSelfSilently() function succeeded. | |
36 DECLARE_METRIC_count(setup_update_self_succeeded); | |
37 | |
38 // How many times the Install() resulted in a Google Update install attempt. | |
39 DECLARE_METRIC_count(setup_do_self_install_total); | |
40 // How many times the Install() succeeded in installing Google Update. | |
41 DECLARE_METRIC_count(setup_do_self_install_succeeded); | |
42 | |
43 // Total time (ms) spent installing Google Update as measured by time between | |
44 // when DoInstall() is called and Setup phase 2 completes. Excludes handoffs. | |
45 DECLARE_METRIC_timing(setup_install_google_update_total_ms); | |
46 | |
47 // Time (ms) from Setup starts until the hand off process displays its UI. | |
48 DECLARE_METRIC_timing(setup_handoff_ui_ms); | |
49 | |
50 // | |
51 // ShouldInstall metrics | |
52 // | |
53 | |
54 // Times ShouldInstall() was called. | |
55 DECLARE_METRIC_count(setup_should_install_total); | |
56 | |
57 // Times ShouldInstall() returned false because of OneClick case. | |
58 DECLARE_METRIC_count(setup_should_install_false_oc); | |
59 | |
60 // Times ShouldInstall() returned true because not already installed. | |
61 DECLARE_METRIC_count(setup_should_install_true_fresh_install); | |
62 | |
63 // Times ShouldInstall() returned false because older version than installed. | |
64 DECLARE_METRIC_count(setup_should_install_false_older); | |
65 | |
66 // Times ShouldInstall() returned true because newer version than installed. | |
67 DECLARE_METRIC_count(setup_should_install_true_newer); | |
68 | |
69 // Times ShouldInstall() returned false because same version fully installed. | |
70 DECLARE_METRIC_count(setup_should_install_false_same); | |
71 // Times ShouldInstall() returned true because same version not fully installed. | |
72 DECLARE_METRIC_count(setup_should_install_true_same); | |
73 // Times ShouldOverinstallSameVersion() returned true because the successful | |
74 // install completion indicator was not present. | |
75 DECLARE_METRIC_count(setup_should_install_true_same_completion_missing); | |
76 | |
77 // Times ShouldInstall() was called during a metainstaller installation when | |
78 // some Omaha version was already installed. | |
79 DECLARE_METRIC_count(setup_subsequent_install_total); | |
80 // Times ShouldInstall() returned true during a metainstaller installation when | |
81 // some Omaha version was already installed. | |
82 DECLARE_METRIC_count(setup_subsequent_install_should_install_true); | |
83 | |
84 // | |
85 // Setup Files | |
86 // | |
87 | |
88 // How many times Setup attempted to install the files. | |
89 DECLARE_METRIC_count(setup_files_total); | |
90 // How many times Setup successfully installed the files. | |
91 DECLARE_METRIC_count(setup_files_verification_succeeded); | |
92 // How many times file install failed due to file verification before copy. | |
93 DECLARE_METRIC_count(setup_files_verification_failed_pre); | |
94 // How many times file install failed due to file verification after copy. | |
95 DECLARE_METRIC_count(setup_files_verification_failed_post); | |
96 | |
97 // Total time (ms) spent installing files. | |
98 DECLARE_METRIC_timing(setup_files_ms); | |
99 | |
100 // How many times the shell was replaced. | |
101 DECLARE_METRIC_count(setup_files_replace_shell); | |
102 | |
103 // | |
104 // Setup Phase 2 | |
105 // | |
106 | |
107 // Total time (ms) spent in Setup phase 2. | |
108 DECLARE_METRIC_timing(setup_phase2_ms); | |
109 | |
110 // How many times Setup attempted to install the service and scheduled task. | |
111 DECLARE_METRIC_count(setup_install_service_task_total); | |
112 // How many times Setup successfully installed the service. | |
113 DECLARE_METRIC_count(setup_install_service_succeeded); | |
114 // How many times Setup successfully installed the scheduled task. | |
115 DECLARE_METRIC_count(setup_install_task_succeeded); | |
116 // How many times Setup successfully installed both service and scheduled task. | |
117 DECLARE_METRIC_count(setup_install_service_and_task_succeeded); | |
118 // How many times Setup failed to install both the service and scheduled task. | |
119 DECLARE_METRIC_count(setup_install_service_and_task_failed); | |
120 // The error returned by InstallService(). | |
121 DECLARE_METRIC_integer(setup_install_service_error); | |
122 // The error returned by InstallScheduledTask(). | |
123 DECLARE_METRIC_integer(setup_install_task_error); | |
124 | |
125 // Time (ms) it took to install the service. | |
126 DECLARE_METRIC_timing(setup_install_service_ms); | |
127 // Time (ms) waited for the service to install when it failed to install. | |
128 DECLARE_METRIC_timing(setup_install_service_failed_ms); | |
129 // Time (ms) it took to install the scheduled task. | |
130 DECLARE_METRIC_timing(setup_install_task_ms); | |
131 | |
132 | |
133 // How many times Setup attempted to start the service. | |
134 DECLARE_METRIC_count(setup_start_service_total); | |
135 // How many times Setup successfully started the service. | |
136 DECLARE_METRIC_count(setup_start_service_succeeded); | |
137 // The error returned by StartService(). | |
138 DECLARE_METRIC_integer(setup_start_service_error); | |
139 | |
140 // Time (ms) it took to start the service. | |
141 DECLARE_METRIC_timing(setup_start_service_ms); | |
142 // Time (ms) waited for the service to start when it failed to start. | |
143 DECLARE_METRIC_timing(setup_start_service_failed_ms); | |
144 | |
145 // How many times Setup attempted to start the scheduled task. | |
146 DECLARE_METRIC_count(setup_start_task_total); | |
147 // How many times Setup successfully started the scheduled task. | |
148 DECLARE_METRIC_count(setup_start_task_succeeded); | |
149 // The error returned by StartScheduledTask(). | |
150 DECLARE_METRIC_integer(setup_start_task_error); | |
151 | |
152 // Time (ms) it took to start scheduled task. | |
153 DECLARE_METRIC_timing(setup_start_task_ms); | |
154 | |
155 // How many times Setup attempted to install the helper MSI. | |
156 DECLARE_METRIC_count(setup_helper_msi_install_total); | |
157 // How many times Setup successfully installed the helper MSI. | |
158 DECLARE_METRIC_count(setup_helper_msi_install_succeeded); | |
159 | |
160 // Time (ms) it took to install the helper MSI. | |
161 DECLARE_METRIC_timing(setup_helper_msi_install_ms); | |
162 | |
163 // | |
164 // Specific Setup Failures | |
165 // | |
166 | |
167 // How many times Setup failed to get any of the Setup locks. | |
168 DECLARE_METRIC_count(setup_locks_failed); | |
169 // How many times Setup failed to get the 1.2 Setup Lock. | |
170 DECLARE_METRIC_count(setup_lock12_failed); | |
171 | |
172 // Time (ms) it took to acquire all Setup locks. | |
173 DECLARE_METRIC_timing(setup_lock_acquire_ms); | |
174 | |
175 | |
176 // How many times Setup failed waiting for processes to stop - all modes. | |
177 DECLARE_METRIC_count(setup_process_wait_failed); | |
178 // How many times Setup failed waiting for processes to stop - specific modes. | |
179 // The sum of these should equal setup_process_wait_failed. | |
180 DECLARE_METRIC_count(setup_process_wait_failed_unknown); | |
181 DECLARE_METRIC_count(setup_process_wait_failed_core); | |
182 DECLARE_METRIC_count(setup_process_wait_failed_report); | |
183 DECLARE_METRIC_count(setup_process_wait_failed_update); | |
184 DECLARE_METRIC_count(setup_process_wait_failed_handoff); | |
185 DECLARE_METRIC_count(setup_process_wait_failed_ua); | |
186 DECLARE_METRIC_count(setup_process_wait_failed_cr); | |
187 DECLARE_METRIC_count(setup_process_wait_failed_other); // All other modes. | |
188 | |
189 // Time (ms) spent waiting for processes to exit - both successes and failures. | |
190 DECLARE_METRIC_timing(setup_process_wait_ms); | |
191 | |
192 // | |
193 // Other Setup Statistics | |
194 // | |
195 | |
196 // How many times Setup rolled back the version. | |
197 DECLARE_METRIC_count(setup_rollback_version); | |
198 // How many times Setup rolled back file installation. | |
199 DECLARE_METRIC_count(setup_rollback_files); | |
200 // How many times Setup rolled back the shell. | |
201 DECLARE_METRIC_count(setup_files_rollback_shell); | |
202 | |
203 // How many times Setup ran after elevating. | |
204 DECLARE_METRIC_count(setup_uac_succeeded); | |
205 | |
206 // How many times Setup installed a user app as an elevated admin on >= Vista. | |
207 DECLARE_METRIC_count(setup_user_app_admin); | |
208 // How many times Setup attempted to install machine app as non-admin on <Vista. | |
209 DECLARE_METRIC_count(setup_machine_app_non_admin); | |
210 | |
211 } // namespace omaha | |
212 | |
213 #endif // OMAHA_SETUP_SETUP_METRICS_H_ | |
OLD | NEW |