aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/qps_worker.cc
diff options
context:
space:
mode:
authorGravatar vjpai <vpai@google.com>2015-11-02 16:45:08 -0800
committerGravatar vjpai <vpai@google.com>2015-11-02 16:45:08 -0800
commitd08a738166e7f293d4590bc852e102ebcbd2239d (patch)
tree4627fe80f4cfaa1bf55575f8d55541a7af66e6b4 /test/cpp/qps/qps_worker.cc
parent9b14e15165e3fa0ab183453bdf30fd6f84ccc594 (diff)
Cleanup some names
Remove some unused options and make server_threads relevant Start stubbing out better qps/core calculations
Diffstat (limited to 'test/cpp/qps/qps_worker.cc')
-rw-r--r--test/cpp/qps/qps_worker.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc
index cad2a9e064..0b34daec63 100644
--- a/test/cpp/qps/qps_worker.cc
+++ b/test/cpp/qps/qps_worker.cc
@@ -55,14 +55,14 @@
#include "test/cpp/qps/client.h"
#include "test/cpp/qps/server.h"
#include "test/cpp/util/create_test_channel.h"
-#include "test/proto/perf_tests/perf_services.pb.h"
+#include "test/proto/benchmarks/services.pb.h"
namespace grpc {
namespace testing {
-std::unique_ptr<Client> CreateClient(const ClientConfig& config) {
+static std::unique_ptr<Client> CreateClient(const ClientConfig& config) {
switch (config.client_type()) {
- case ClientType::SYNCHRONOUS_CLIENT:
+ case ClientType::SYNC_CLIENT:
return (config.rpc_type() == RpcType::UNARY)
? CreateSynchronousUnaryClient(config)
: CreateSynchronousStreamingClient(config);
@@ -76,9 +76,15 @@ std::unique_ptr<Client> CreateClient(const ClientConfig& config) {
abort();
}
-std::unique_ptr<Server> CreateServer(const ServerConfig& config) {
+static void LimitCores(int cores) {
+}
+
+static std::unique_ptr<Server> CreateServer(const ServerConfig& config) {
+ if (config.core_limit() > 0) {
+ LimitCores(config.core_limit());
+ }
switch (config.server_type()) {
- case ServerType::SYNCHRONOUS_SERVER:
+ case ServerType::SYNC_SERVER:
return CreateSynchronousServer(config);
case ServerType::ASYNC_SERVER:
return CreateAsyncServer(config);
@@ -195,6 +201,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service {
}
ServerStatus status;
status.set_port(server->Port());
+ status.set_cores(server->Cores());
if (!stream->Write(status)) {
return Status(StatusCode::UNKNOWN, "");
}