chromium/mojo/public/c/system/tests/core_perftest.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This tests the performance of the C API.

#include "mojo/public/c/system/core.h"

#include <assert.h>
#include <stdint.h>
#include <stdio.h>

#include "base/threading/simple_thread.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "mojo/public/cpp/system/wait.h"
#include "mojo/public/cpp/test_support/test_support.h"
#include "mojo/public/cpp/test_support/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"

#if !defined(WIN32)
#include <time.h>
#endif  // !defined(WIN32)

namespace {

#if !defined(WIN32)
class MessagePipeWriterThread : public base::SimpleThread {};

class MessagePipeReaderThread : public base::SimpleThread {};
#endif  // !defined(WIN32)

class CorePerftest : public testing::Test {};

// A no-op test so we can compare performance.
TEST_F(CorePerftest, NoOp) {}

TEST_F(CorePerftest, MessagePipe_CreateAndClose) {}

TEST_F(CorePerftest, MessagePipe_WriteAndRead) {}

TEST_F(CorePerftest, MessagePipe_EmptyRead) {}

#if !defined(WIN32)
TEST_F(CorePerftest, MessagePipe_Threaded) {}
#endif  // !defined(WIN32)

}  // namespace