Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: third_party/WebKit/Source/web/tests/TimerPerfTest.cpp

Issue 2805733003: Rewrite references to "wtf/" to "platform/wtf/" in web. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Copyright 2016 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "platform/Timer.h" 6 #include "platform/Timer.h"
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "platform/testing/UnitTestHelpers.h" 10 #include "platform/testing/UnitTestHelpers.h"
11 #include "platform/wtf/PtrUtil.h"
12 #include "platform/wtf/Vector.h"
11 #include "public/platform/Platform.h" 13 #include "public/platform/Platform.h"
12 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
13 #include "wtf/PtrUtil.h"
14 #include "wtf/Vector.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class TimerPerfTest : public ::testing::Test { 18 class TimerPerfTest : public ::testing::Test {
19 public: 19 public:
20 void nopTask(TimerBase*) {} 20 void nopTask(TimerBase*) {}
21 21
22 void recordStartRunTime(TimerBase*) { m_runStart = base::ThreadTicks::Now(); } 22 void recordStartRunTime(TimerBase*) { m_runStart = base::ThreadTicks::Now(); }
23 23
24 void recordEndRunTime(TimerBase*) { 24 void recordEndRunTime(TimerBase*) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 double cancelTime = (cancelEnd - cancelStart).InMicroseconds(); 96 double cancelTime = (cancelEnd - cancelStart).InMicroseconds();
97 double cancelTimeUsPerCall = cancelTime / static_cast<double>(numIterations); 97 double cancelTimeUsPerCall = cancelTime / static_cast<double>(numIterations);
98 LOG(INFO) << "TimerBase::stop cost (us/call) " << cancelTimeUsPerCall 98 LOG(INFO) << "TimerBase::stop cost (us/call) " << cancelTimeUsPerCall
99 << " (total " << cancelTime << " us)"; 99 << " (total " << cancelTime << " us)";
100 LOG(INFO) << "Time to run " << numIterations << " canceled tasks (us) " 100 LOG(INFO) << "Time to run " << numIterations << " canceled tasks (us) "
101 << (m_runEnd - m_runStart).InMicroseconds(); 101 << (m_runEnd - m_runStart).InMicroseconds();
102 } 102 }
103 103
104 } // namespace blink 104 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/SpinLockTest.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698