blob: cb406260c042fb60bdb797720d4132f41355aab6 [file] [log] [blame]
viettrungluu@chromium.org7d86af22013-01-12 00:13:37 +09001// 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
3// found in the LICENSE file.
4
morritaab779702014-09-10 04:35:24 +09005#include "ipc/ipc_perftest_support.h"
viettrungluu@chromium.org7d86af22013-01-12 00:13:37 +09006
viettrungluu@chromium.org7ca19132013-01-12 05:56:22 +09007namespace {
8
viettrungluu@chromium.org06151432013-01-16 05:14:22 +09009// This test times the roundtrip IPC message cycle.
viettrungluu@chromium.org7d86af22013-01-12 00:13:37 +090010//
viettrungluu@chromium.org06151432013-01-16 05:14:22 +090011// TODO(brettw): Make this test run by default.
viettrungluu@chromium.org7d86af22013-01-12 00:13:37 +090012
morritaab779702014-09-10 04:35:24 +090013class IPCChannelPerfTest : public IPC::test::IPCChannelPerfTestBase {
viettrungluu@chromium.org7d86af22013-01-12 00:13:37 +090014};
15
morritaa4220942014-08-29 09:20:59 +090016TEST_F(IPCChannelPerfTest, ChannelPingPong) {
morritaab779702014-09-10 04:35:24 +090017 RunTestChannelPingPong(GetDefaultTestParams());
viettrungluu@chromium.org7d86af22013-01-12 00:13:37 +090018}
viettrungluu@chromium.org7ca19132013-01-12 05:56:22 +090019
morritaa4220942014-08-29 09:20:59 +090020TEST_F(IPCChannelPerfTest, ChannelProxyPingPong) {
morritaab779702014-09-10 04:35:24 +090021 RunTestChannelProxyPingPong(GetDefaultTestParams());
22}
morritaa4220942014-08-29 09:20:59 +090023
morritaab779702014-09-10 04:35:24 +090024MULTIPROCESS_IPC_TEST_CLIENT_MAIN(PerformanceClient) {
25 IPC::test::PingPongTestClient client;
26 return client.RunMain();
morritaa4220942014-08-29 09:20:59 +090027}
28
viettrungluu@chromium.org7ca19132013-01-12 05:56:22 +090029} // namespace