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 #include <math.h> | 5 #include <math.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/perftimer.h" | 11 #include "base/perftimer.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "chrome/app/chrome_dll_resource.h" | 13 #include "chrome/app/chrome_dll_resource.h" |
14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
15 #include "chrome/common/libxml_utils.h" | 15 #include "chrome/common/libxml_utils.h" |
16 #include "chrome/test/automation/autocomplete_edit_proxy.h" | 16 #include "chrome/test/automation/autocomplete_edit_proxy.h" |
17 #include "chrome/test/automation/automation_proxy.h" | 17 #include "chrome/test/automation/automation_proxy.h" |
18 #include "chrome/test/automation/browser_proxy.h" | 18 #include "chrome/test/automation/browser_proxy.h" |
19 #include "chrome/test/automation/window_proxy.h" | 19 #include "chrome/test/automation/window_proxy.h" |
20 #include "chrome/test/ui/ui_test.h" | 20 #include "chrome/test/ui/ui_test.h" |
21 | 21 |
22 const wchar_t kRunOmniboxTest[] = L"run_omnibox_test"; | 22 const char kRunOmniboxTest[] = "run_omnibox_test"; |
23 | 23 |
24 class OmniboxTest : public UITest { | 24 class OmniboxTest : public UITest { |
25 public: | 25 public: |
26 | 26 |
27 double score_; | 27 double score_; |
28 double max_score_; | 28 double max_score_; |
29 | 29 |
30 int query_count_; | 30 int query_count_; |
31 int query_timeouts_; | 31 int query_timeouts_; |
32 int64 time_squared_; | 32 int64 time_squared_; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 wprintf(L"__om_query_count = %d\n", query_count_); | 170 wprintf(L"__om_query_count = %d\n", query_count_); |
171 wprintf(L"__om_query_timeouts = %d\n", query_timeouts_); | 171 wprintf(L"__om_query_timeouts = %d\n", query_timeouts_); |
172 wprintf(L"__om_time_per_query_avg = %d\n", mean); | 172 wprintf(L"__om_time_per_query_avg = %d\n", mean); |
173 // Use the equation stddev = sqrt(Sum(x_i^2)/N - mean^2). | 173 // Use the equation stddev = sqrt(Sum(x_i^2)/N - mean^2). |
174 wprintf(L"__om_time_per_query_stddev = %d\n", static_cast<int64>( | 174 wprintf(L"__om_time_per_query_stddev = %d\n", static_cast<int64>( |
175 sqrt(1.0 * time_squared_ / query_count_ - mean * mean))); | 175 sqrt(1.0 * time_squared_ / query_count_ - mean * mean))); |
176 wprintf(L"__om_time_per_query_max = %d\n", time_max_); | 176 wprintf(L"__om_time_per_query_max = %d\n", time_max_); |
177 wprintf(L"__om_time_per_query_min = %d\n", time_min_); | 177 wprintf(L"__om_time_per_query_min = %d\n", time_min_); |
178 wprintf(L"__om_score = %.4f\n", 100.0 * score_ / max_score_); | 178 wprintf(L"__om_score = %.4f\n", 100.0 * score_ / max_score_); |
179 } | 179 } |
OLD | NEW |