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 <stddef.h> |
5 #include <stdint.h> | 6 #include <stdint.h> |
6 | 7 |
7 #include <limits> | 8 #include <limits> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/bind.h" | 11 #include "base/bind.h" |
11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
14 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
15 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
16 #include "base/time/time.h" | 18 #include "base/time/time.h" |
17 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "build/build_config.h" |
18 #include "chrome/browser/download/download_query.h" | 21 #include "chrome/browser/download/download_query.h" |
19 #include "content/public/test/mock_download_item.h" | 22 #include "content/public/test/mock_download_item.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
22 | 25 |
23 using ::testing::Return; | 26 using ::testing::Return; |
24 using ::testing::ReturnRef; | 27 using ::testing::ReturnRef; |
25 using ::testing::_; | 28 using ::testing::_; |
26 using base::Time; | 29 using base::Time; |
27 using base::Value; | 30 using base::Value; |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 base::Time start = base::Time::Now(); | 638 base::Time start = base::Time::Now(); |
636 Search(); | 639 Search(); |
637 base::Time end = base::Time::Now(); | 640 base::Time end = base::Time::Now(); |
638 double nanos = (end - start).InMillisecondsF() * 1000.0 * 1000.0; | 641 double nanos = (end - start).InMillisecondsF() * 1000.0 * 1000.0; |
639 double nanos_per_item = nanos / static_cast<double>(kNumItems); | 642 double nanos_per_item = nanos / static_cast<double>(kNumItems); |
640 double nanos_per_item_per_filter = nanos_per_item | 643 double nanos_per_item_per_filter = nanos_per_item |
641 / static_cast<double>(kNumFilters); | 644 / static_cast<double>(kNumFilters); |
642 std::cout << "Search took " << nanos_per_item_per_filter | 645 std::cout << "Search took " << nanos_per_item_per_filter |
643 << " nanoseconds per item per filter.\n"; | 646 << " nanoseconds per item per filter.\n"; |
644 } | 647 } |
OLD | NEW |