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

Unified Diff: mojo/edk/system/message_pipe_perftest.cc

Issue 1430593005: EDK: Remove (direct) dependencies of //mojo/edk/system on //base/test. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/ipc_support_unittest.cc ('k') | mojo/edk/system/ref_counted_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe_perftest.cc
diff --git a/mojo/edk/system/message_pipe_perftest.cc b/mojo/edk/system/message_pipe_perftest.cc
index ffa7981a4375d8a5f549bd8bc405a4282ed70f9d..ad892ddc6f19a83366f02b745a1177f222a534a9 100644
--- a/mojo/edk/system/message_pipe_perftest.cc
+++ b/mojo/edk/system/message_pipe_perftest.cc
@@ -10,13 +10,14 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/strings/stringprintf.h"
-#include "base/test/perf_time_logger.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/edk/system/local_message_pipe_endpoint.h"
#include "mojo/edk/system/message_pipe.h"
#include "mojo/edk/system/message_pipe_test_utils.h"
#include "mojo/edk/system/proxy_message_pipe_endpoint.h"
#include "mojo/edk/system/ref_ptr.h"
+#include "mojo/edk/system/test/perf_log.h"
+#include "mojo/edk/system/test/stopwatch.h"
#include "mojo/edk/test/test_utils.h"
#include "mojo/public/cpp/system/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -67,12 +68,12 @@ class MultiprocessMessagePipePerfTest
std::string test_name =
base::StringPrintf("IPC_Perf_%dx_%u", message_count_,
static_cast<unsigned>(message_size_));
- base::PerfTimeLogger logger(test_name.c_str());
+ test::Stopwatch stopwatch;
+ stopwatch.Start();
for (int i = 0; i < message_count_; ++i)
WriteWaitThenRead(mp);
-
- logger.Done();
+ test::LogPerfResult(test_name.c_str(), stopwatch.Elapsed() / 1000.0, "ms");
}
private:
« no previous file with comments | « mojo/edk/system/ipc_support_unittest.cc ('k') | mojo/edk/system/ref_counted_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698