diff options
author | yang-g <yangg@google.com> | 2016-01-14 09:50:48 -0800 |
---|---|---|
committer | yang-g <yangg@google.com> | 2016-01-14 09:50:48 -0800 |
commit | b9a1377fab3a25fd60e8b632dcf688d470ee9127 (patch) | |
tree | 892ebff764d5e1158fff90e0b9323d2e4f06b219 | |
parent | d42262e22ebeda07705400e1ce8a77dbdca668a7 (diff) | |
parent | dafa125c7b01df1003b96ea2619eb39956f5ddcc (diff) |
Merge remote-tracking branch 'upstream/master' into sync_async_mix
-rw-r--r-- | include/grpc++/generic/async_generic_service.h | 4 | ||||
-rw-r--r-- | include/grpc++/support/byte_buffer.h | 4 | ||||
-rw-r--r-- | include/grpc++/support/slice.h | 4 | ||||
-rw-r--r-- | src/cpp/util/byte_buffer.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/client.h | 4 | ||||
-rw-r--r-- | test/cpp/qps/client_async.cc | 38 | ||||
-rw-r--r-- | test/cpp/qps/client_sync.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/generic_async_streaming_ping_pong_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/qps_driver.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/qps_worker.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/server.h | 4 | ||||
-rw-r--r-- | test/cpp/qps/server_async.cc | 24 |
12 files changed, 46 insertions, 56 deletions
diff --git a/include/grpc++/generic/async_generic_service.h b/include/grpc++/generic/async_generic_service.h index f209c077e6..33045b8d85 100644 --- a/include/grpc++/generic/async_generic_service.h +++ b/include/grpc++/generic/async_generic_service.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -76,4 +76,4 @@ class AsyncGenericService GRPC_FINAL { } // namespace grpc -#endif // GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H +#endif // GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H
\ No newline at end of file diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h index 9ec5609c9f..84042cbef8 100644 --- a/include/grpc++/support/byte_buffer.h +++ b/include/grpc++/support/byte_buffer.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -107,4 +107,4 @@ class SerializationTraits<ByteBuffer, void> { } // namespace grpc -#endif // GRPCXX_SUPPORT_BYTE_BUFFER_H +#endif // GRPCXX_SUPPORT_BYTE_BUFFER_H
\ No newline at end of file diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 8dce7e68af..30325ef90b 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -85,4 +85,4 @@ class Slice GRPC_FINAL { } // namespace grpc -#endif // GRPCXX_SUPPORT_SLICE_H +#endif // GRPCXX_SUPPORT_SLICE_H
\ No newline at end of file diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc index faed33139d..df873eb1ce 100644 --- a/src/cpp/util/byte_buffer.cc +++ b/src/cpp/util/byte_buffer.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -88,4 +88,4 @@ ByteBuffer& ByteBuffer::operator=(const ByteBuffer& buf) { return *this; } -} // namespace grpc +} // namespace grpc
\ No newline at end of file diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 03bbf03b6c..0159f4f1e6 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -377,4 +377,4 @@ std::unique_ptr<Client> CreateGenericAsyncStreamingClient( } // namespace testing } // namespace grpc -#endif +#endif
\ No newline at end of file diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 2bcb73eee0..47e902cc5d 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -93,8 +93,7 @@ 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) : ClientRpcContext(channel_id), context_(), @@ -140,8 +139,7 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { std::function<void(grpc::Status, ResponseType*)> callback_; 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>> @@ -160,12 +158,11 @@ class AsyncClient : public ClientImpl<StubType, RequestType> { using Client::closed_loop_; using ClientImpl<StubType, RequestType>::channels_; using ClientImpl<StubType, RequestType>::request_; - AsyncClient( - const ClientConfig& config, - std::function<ClientRpcContext*(int, StubType*, const RequestType&)> - setup_ctx, - std::function<std::unique_ptr<StubType>(std::shared_ptr<Channel>)> - create_stub) + AsyncClient(const ClientConfig& config, + std::function<ClientRpcContext*(int, StubType*, + const RequestType&)> setup_ctx, + std::function<std::unique_ptr<StubType>(std::shared_ptr<Channel>)> + create_stub) : ClientImpl<StubType, RequestType>(config, create_stub), channel_lock_(new std::mutex[config.client_channels()]), contexts_(config.client_channels()), @@ -394,8 +391,7 @@ 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) : ClientRpcContext(channel_id), context_(), @@ -447,10 +443,10 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { ResponseType response_; bool (ClientRpcContextStreamingImpl::*next_state_)(bool, Histogram*); std::function<void(grpc::Status, ResponseType*)> callback_; - 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>> @@ -494,8 +490,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { int channel_id, grpc::GenericStub* stub, const ByteBuffer& req, 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) : ClientRpcContext(channel_id), context_(), @@ -552,8 +547,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { std::function<void(grpc::Status, ByteBuffer*)> callback_; 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_; @@ -605,4 +599,4 @@ std::unique_ptr<Client> CreateGenericAsyncStreamingClient( } } // namespace testing -} // namespace grpc +} // namespace grpc
\ No newline at end of file diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 54cdf390d7..1045915b83 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -172,4 +172,4 @@ std::unique_ptr<Client> CreateSynchronousStreamingClient( } } // namespace testing -} // namespace grpc +} // namespace grpc
\ No newline at end of file diff --git a/test/cpp/qps/generic_async_streaming_ping_pong_test.cc b/test/cpp/qps/generic_async_streaming_ping_pong_test.cc index fe79b2d803..7a1275054a 100644 --- a/test/cpp/qps/generic_async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/generic_async_streaming_ping_pong_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -79,4 +79,4 @@ int main(int argc, char** argv) { grpc::testing::RunGenericAsyncStreamingPingPong(); return 0; -} +}
\ No newline at end of file diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index e89ca45c95..c70db188d9 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -184,4 +184,4 @@ int main(int argc, char** argv) { grpc::testing::QpsDriver(); return 0; -} +}
\ No newline at end of file diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index ef2b633f68..e7714c0bb3 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -239,4 +239,4 @@ QpsWorker::QpsWorker(int driver_port) { QpsWorker::~QpsWorker() {} } // namespace testing -} // namespace grpc +} // namespace grpc
\ No newline at end of file diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 920fc56356..daee7c3663 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -112,4 +112,4 @@ std::unique_ptr<Server> CreateAsyncServer(const ServerConfig& config); } // namespace testing } // namespace grpc -#endif +#endif
\ No newline at end of file diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index c013819783..50be679caf 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,8 +72,7 @@ class AsyncQpsServerTest : public Server { CompletionQueue *, ServerCompletionQueue *, void *)> request_streaming_function, std::function<grpc::Status(const PayloadConfig &, const RequestType *, - ResponseType *)> - process_rpc) + ResponseType *)> process_rpc) : Server(config) { char *server_address = NULL; @@ -185,8 +184,7 @@ class AsyncQpsServerTest : public Server { ServerRpcContextUnaryImpl( std::function<void(ServerContextType *, RequestType *, grpc::ServerAsyncResponseWriter<ResponseType> *, - void *)> - request_method, + void *)> request_method, std::function<grpc::Status(const RequestType *, ResponseType *)> invoke_method) : srv_ctx_(new ServerContextType), @@ -383,14 +381,12 @@ static Status ProcessGenericRPC(const PayloadConfig &payload_config, } std::unique_ptr<Server> CreateAsyncServer(const ServerConfig &config) { - return std::unique_ptr<Server>( - new AsyncQpsServerTest<SimpleRequest, SimpleResponse, - BenchmarkService::AsyncService, - grpc::ServerContext>( - config, RegisterBenchmarkService, - &BenchmarkService::AsyncService::RequestUnaryCall, - &BenchmarkService::AsyncService::RequestStreamingCall, - ProcessSimpleRPC)); + return std::unique_ptr<Server>(new AsyncQpsServerTest< + SimpleRequest, SimpleResponse, BenchmarkService::AsyncService, + grpc::ServerContext>( + config, RegisterBenchmarkService, + &BenchmarkService::AsyncService::RequestUnaryCall, + &BenchmarkService::AsyncService::RequestStreamingCall, ProcessSimpleRPC)); } std::unique_ptr<Server> CreateAsyncGenericServer(const ServerConfig &config) { return std::unique_ptr<Server>( @@ -401,4 +397,4 @@ std::unique_ptr<Server> CreateAsyncGenericServer(const ServerConfig &config) { } } // namespace testing -} // namespace grpc +} // namespace grpc
\ No newline at end of file |