aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/interop/server_main.cc (renamed from test/cpp/interop/server.cc)0
-rw-r--r--test/cpp/qps/client.h4
-rw-r--r--test/cpp/qps/client_async.cc28
-rw-r--r--test/cpp/qps/client_sync.cc2
-rw-r--r--test/cpp/qps/server.h2
-rw-r--r--test/cpp/qps/server_sync.cc12
-rw-r--r--test/cpp/qps/usage_timer.cc (renamed from test/cpp/qps/timer.cc)6
-rw-r--r--test/cpp/qps/usage_timer.h (renamed from test/cpp/qps/timer.h)6
8 files changed, 33 insertions, 27 deletions
diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server_main.cc
index 18ac35d551..18ac35d551 100644
--- a/test/cpp/interop/server.cc
+++ b/test/cpp/interop/server_main.cc
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index c94a523fa1..aecbae95f9 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -46,10 +46,10 @@
#include "src/proto/grpc/testing/payloads.grpc.pb.h"
#include "src/proto/grpc/testing/services.grpc.pb.h"
-#include "test/cpp/qps/limit_cores.h"
#include "test/cpp/qps/histogram.h"
#include "test/cpp/qps/interarrival.h"
-#include "test/cpp/qps/timer.h"
+#include "test/cpp/qps/limit_cores.h"
+#include "test/cpp/qps/usage_timer.h"
#include "test/cpp/util/create_test_channel.h"
namespace grpc {
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc
index 9e8767d103..f8c1fa3b62 100644
--- a/test/cpp/qps/client_async.cc
+++ b/test/cpp/qps/client_async.cc
@@ -54,7 +54,7 @@
#include "src/proto/grpc/testing/services.grpc.pb.h"
#include "test/cpp/qps/client.h"
-#include "test/cpp/qps/timer.h"
+#include "test/cpp/qps/usage_timer.h"
#include "test/cpp/util/create_test_channel.h"
namespace grpc {
@@ -84,7 +84,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext {
std::function<
std::unique_ptr<grpc::ClientAsyncResponseReader<ResponseType>>(
BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&,
- CompletionQueue*)> start_req,
+ CompletionQueue*)>
+ start_req,
std::function<void(grpc::Status, ResponseType*)> on_done)
: context_(),
stub_(stub),
@@ -141,7 +142,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext {
std::function<gpr_timespec()> next_issue_;
std::function<std::unique_ptr<grpc::ClientAsyncResponseReader<ResponseType>>(
BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&,
- CompletionQueue*)> start_req_;
+ CompletionQueue*)>
+ start_req_;
grpc::Status status_;
double start_;
std::unique_ptr<grpc::ClientAsyncResponseReader<ResponseType>>
@@ -164,7 +166,8 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
AsyncClient(const ClientConfig& config,
std::function<ClientRpcContext*(
StubType*, std::function<gpr_timespec()> next_issue,
- const RequestType&)> setup_ctx,
+ const RequestType&)>
+ setup_ctx,
std::function<std::unique_ptr<StubType>(std::shared_ptr<Channel>)>
create_stub)
: ClientImpl<StubType, RequestType>(config, create_stub),
@@ -277,7 +280,8 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
std::function<std::unique_ptr<
grpc::ClientAsyncReaderWriter<RequestType, ResponseType>>(
BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*,
- void*)> start_req,
+ void*)>
+ start_req,
std::function<void(grpc::Status, ResponseType*)> on_done)
: context_(),
stub_(stub),
@@ -360,10 +364,10 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
State next_state_;
std::function<void(grpc::Status, ResponseType*)> callback_;
std::function<gpr_timespec()> next_issue_;
- std::function<
- std::unique_ptr<grpc::ClientAsyncReaderWriter<RequestType, ResponseType>>(
- BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*,
- void*)> start_req_;
+ std::function<std::unique_ptr<
+ grpc::ClientAsyncReaderWriter<RequestType, ResponseType>>(
+ BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, void*)>
+ start_req_;
grpc::Status status_;
double start_;
std::unique_ptr<grpc::ClientAsyncReaderWriter<RequestType, ResponseType>>
@@ -405,7 +409,8 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext {
std::function<gpr_timespec()> next_issue,
std::function<std::unique_ptr<grpc::GenericClientAsyncReaderWriter>(
grpc::GenericStub*, grpc::ClientContext*,
- const grpc::string& method_name, CompletionQueue*, void*)> start_req,
+ const grpc::string& method_name, CompletionQueue*, void*)>
+ start_req,
std::function<void(grpc::Status, ByteBuffer*)> on_done)
: context_(),
stub_(stub),
@@ -493,7 +498,8 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext {
std::function<gpr_timespec()> next_issue_;
std::function<std::unique_ptr<grpc::GenericClientAsyncReaderWriter>(
grpc::GenericStub*, grpc::ClientContext*, const grpc::string&,
- CompletionQueue*, void*)> start_req_;
+ CompletionQueue*, void*)>
+ start_req_;
grpc::Status status_;
double start_;
std::unique_ptr<grpc::GenericClientAsyncReaderWriter> stream_;
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index edfc246a25..e39768b498 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -58,7 +58,7 @@
#include "test/cpp/qps/client.h"
#include "test/cpp/qps/histogram.h"
#include "test/cpp/qps/interarrival.h"
-#include "test/cpp/qps/timer.h"
+#include "test/cpp/qps/usage_timer.h"
namespace grpc {
namespace testing {
diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h
index 94a6f8acfa..3227347e3f 100644
--- a/test/cpp/qps/server.h
+++ b/test/cpp/qps/server.h
@@ -43,7 +43,7 @@
#include "test/core/end2end/data/ssl_test_data.h"
#include "test/core/util/port.h"
#include "test/cpp/qps/limit_cores.h"
-#include "test/cpp/qps/timer.h"
+#include "test/cpp/qps/usage_timer.h"
namespace grpc {
namespace testing {
diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc
index 4b778820d0..b7682f5763 100644
--- a/test/cpp/qps/server_sync.cc
+++ b/test/cpp/qps/server_sync.cc
@@ -34,18 +34,18 @@
#include <thread>
#include <gflags/gflags.h>
+#include <grpc++/security/server_credentials.h>
+#include <grpc++/server.h>
+#include <grpc++/server_builder.h>
+#include <grpc++/server_context.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
-#include <grpc++/server.h>
-#include <grpc++/server_builder.h>
-#include <grpc++/server_context.h>
-#include <grpc++/security/server_credentials.h>
-#include "test/cpp/qps/server.h"
-#include "test/cpp/qps/timer.h"
#include "src/proto/grpc/testing/services.grpc.pb.h"
+#include "test/cpp/qps/server.h"
+#include "test/cpp/qps/usage_timer.h"
namespace grpc {
namespace testing {
diff --git a/test/cpp/qps/timer.cc b/test/cpp/qps/usage_timer.cc
index 3ec7f49f83..5a913d498f 100644
--- a/test/cpp/qps/timer.cc
+++ b/test/cpp/qps/usage_timer.cc
@@ -31,11 +31,11 @@
*
*/
-#include "test/cpp/qps/timer.h"
+#include "test/cpp/qps/usage_timer.h"
-#include <sys/time.h>
-#include <sys/resource.h>
#include <grpc/support/time.h>
+#include <sys/resource.h>
+#include <sys/time.h>
Timer::Timer() : start_(Sample()) {}
diff --git a/test/cpp/qps/timer.h b/test/cpp/qps/usage_timer.h
index d1aee1a9d1..704d4b02a2 100644
--- a/test/cpp/qps/timer.h
+++ b/test/cpp/qps/usage_timer.h
@@ -31,10 +31,10 @@
*
*/
-#ifndef TEST_QPS_TIMER_H
-#define TEST_QPS_TIMER_H
+#ifndef TEST_QPS_USAGE_TIMER_H
+#define TEST_QPS_USAGE_TIMER_H
-class Timer {
+class UsageTimer {
public:
Timer();