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

Side by Side Diff: webrtc/base/logging_unittest.cc

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 years, 7 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
« no previous file with comments | « webrtc/base/logging.cc ('k') | webrtc/base/messagequeue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 TEST(LogTest, Perf) { 131 TEST(LogTest, Perf) {
132 Pathname path; 132 Pathname path;
133 EXPECT_TRUE(Filesystem::GetTemporaryFolder(path, true, NULL)); 133 EXPECT_TRUE(Filesystem::GetTemporaryFolder(path, true, NULL));
134 path.SetPathname(Filesystem::TempFilename(path, "ut")); 134 path.SetPathname(Filesystem::TempFilename(path, "ut"));
135 135
136 LogSinkImpl<FileStream> stream; 136 LogSinkImpl<FileStream> stream;
137 EXPECT_TRUE(stream.Open(path.pathname(), "wb", NULL)); 137 EXPECT_TRUE(stream.Open(path.pathname(), "wb", NULL));
138 stream.DisableBuffering(); 138 stream.DisableBuffering();
139 LogMessage::AddLogToStream(&stream, LS_SENSITIVE); 139 LogMessage::AddLogToStream(&stream, LS_SENSITIVE);
140 140
141 uint32_t start = Time(), finish; 141 int64_t start = TimeMillis(), finish;
142 std::string message('X', 80); 142 std::string message('X', 80);
143 for (int i = 0; i < 1000; ++i) { 143 for (int i = 0; i < 1000; ++i) {
144 LOG(LS_SENSITIVE) << message; 144 LOG(LS_SENSITIVE) << message;
145 } 145 }
146 finish = Time(); 146 finish = TimeMillis();
147 147
148 LogMessage::RemoveLogToStream(&stream); 148 LogMessage::RemoveLogToStream(&stream);
149 stream.Close(); 149 stream.Close();
150 Filesystem::DeleteFile(path); 150 Filesystem::DeleteFile(path);
151 151
152 LOG(LS_INFO) << "Average log time: " << TimeDiff(finish, start) << " us"; 152 LOG(LS_INFO) << "Average log time: " << TimeDiff(finish, start) << " ms";
153 } 153 }
154 154
155 } // namespace rtc 155 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/logging.cc ('k') | webrtc/base/messagequeue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698