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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "base/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/download/download_query.h" | 15 #include "chrome/browser/download/download_query.h" |
16 #include "content/public/test/mock_download_item.h" | 16 #include "content/public/test/mock_download_item.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using ::testing::Return; | 20 using ::testing::Return; |
21 using ::testing::ReturnRef; | 21 using ::testing::ReturnRef; |
22 using ::testing::_; | 22 using ::testing::_; |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 base::Time start = base::Time::Now(); | 583 base::Time start = base::Time::Now(); |
584 Search(); | 584 Search(); |
585 base::Time end = base::Time::Now(); | 585 base::Time end = base::Time::Now(); |
586 double nanos = (end - start).InMillisecondsF() * 1000.0 * 1000.0; | 586 double nanos = (end - start).InMillisecondsF() * 1000.0 * 1000.0; |
587 double nanos_per_item = nanos / static_cast<double>(kNumItems); | 587 double nanos_per_item = nanos / static_cast<double>(kNumItems); |
588 double nanos_per_item_per_filter = nanos_per_item | 588 double nanos_per_item_per_filter = nanos_per_item |
589 / static_cast<double>(kNumFilters); | 589 / static_cast<double>(kNumFilters); |
590 std::cout << "Search took " << nanos_per_item_per_filter | 590 std::cout << "Search took " << nanos_per_item_per_filter |
591 << " nanoseconds per item per filter.\n"; | 591 << " nanoseconds per item per filter.\n"; |
592 } | 592 } |
OLD | NEW |