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

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

Issue 2365623003: Remove unused thread.h include in trace_event_impl.h and fix IWUU. (Closed)
Patch Set: Whitelist base DEPS for all web/tests Created 4 years, 2 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"
9 #include "base/time/time.h"
8 #include "platform/testing/UnitTestHelpers.h" 10 #include "platform/testing/UnitTestHelpers.h"
9 #include "public/platform/Platform.h" 11 #include "public/platform/Platform.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 #include "wtf/PtrUtil.h" 13 #include "wtf/PtrUtil.h"
12 #include "wtf/Vector.h" 14 #include "wtf/Vector.h"
13 15
14 namespace blink { 16 namespace blink {
15 17
16 class TimerPerfTest : public ::testing::Test { 18 class TimerPerfTest : public ::testing::Test {
17 public: 19 public:
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 double postingTimeUsPerCall = postingTime / static_cast<double>(numIteration s); 94 double postingTimeUsPerCall = postingTime / static_cast<double>(numIteration s);
93 LOG(INFO) << "TimerBase::startOneShot cost (us/call) " << postingTimeUsPerCa ll << " (total " << postingTime << " us)"; 95 LOG(INFO) << "TimerBase::startOneShot cost (us/call) " << postingTimeUsPerCa ll << " (total " << postingTime << " us)";
94 96
95 double cancelTime = (cancelEnd - cancelStart).InMicroseconds(); 97 double cancelTime = (cancelEnd - cancelStart).InMicroseconds();
96 double cancelTimeUsPerCall = cancelTime / static_cast<double>(numIterations) ; 98 double cancelTimeUsPerCall = cancelTime / static_cast<double>(numIterations) ;
97 LOG(INFO) << "TimerBase::stop cost (us/call) " << cancelTimeUsPerCall << " ( total " << cancelTime << " us)"; 99 LOG(INFO) << "TimerBase::stop cost (us/call) " << cancelTimeUsPerCall << " ( total " << cancelTime << " us)";
98 LOG(INFO) << "Time to run " << numIterations << " canceled tasks (us) " << ( m_runEnd - m_runStart).InMicroseconds(); 100 LOG(INFO) << "Time to run " << numIterations << " canceled tasks (us) " << ( m_runEnd - m_runStart).InMicroseconds();
99 } 101 }
100 102
101 } // namespace blink 103 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/DEPS ('k') | third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698