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 #include "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/memory/ptr_util.h" | 6 #include "base/memory/ptr_util.h" |
7 #import "ios/chrome/browser/web/chrome_web_client.h" | 7 #import "ios/chrome/browser/web/chrome_web_client.h" |
8 #import "ios/chrome/test/base/perf_test_ios.h" | 8 #import "ios/chrome/test/base/perf_test_ios.h" |
9 | 9 |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 11 #error "This file requires ARC support." |
| 12 #endif |
| 13 |
10 PerfTest::PerfTest(std::string testGroup) | 14 PerfTest::PerfTest(std::string testGroup) |
11 : BlockCleanupTest(), | 15 : BlockCleanupTest(), |
12 testGroup_(testGroup), | 16 testGroup_(testGroup), |
13 firstLabel_("1st"), | 17 firstLabel_("1st"), |
14 averageLabel_("2nd+"), | 18 averageLabel_("2nd+"), |
15 isWaterfall_(false), | 19 isWaterfall_(false), |
16 verbose_(true), | 20 verbose_(true), |
17 repeatCount_(10), | 21 repeatCount_(10), |
18 web_client_(base::MakeUnique<ChromeWebClient>()) {} | 22 web_client_(base::MakeUnique<ChromeWebClient>()) {} |
19 PerfTest::PerfTest(std::string testGroup, | 23 PerfTest::PerfTest(std::string testGroup, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 max = times[i]; | 107 max = times[i]; |
104 if (times[i] < min) | 108 if (times[i] < min) |
105 min = times[i]; | 109 min = times[i]; |
106 } | 110 } |
107 if (max_time) | 111 if (max_time) |
108 *max_time = max; | 112 *max_time = max; |
109 if (min_time) | 113 if (min_time) |
110 *min_time = min; | 114 *min_time = min; |
111 return sum / count; | 115 return sum / count; |
112 } | 116 } |
OLD | NEW |