diff options
Diffstat (limited to 'test/cpp/qps/qps_driver.cc')
-rw-r--r-- | test/cpp/qps/qps_driver.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index c7096391e6..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 @@ -62,6 +62,8 @@ DEFINE_int32(client_channels, 1, "Number of client channels"); DEFINE_int32(simple_req_size, -1, "Simple proto request payload size"); DEFINE_int32(simple_resp_size, -1, "Simple proto response payload size"); +DEFINE_int32(bbuf_req_size, -1, "Byte-buffer request payload size"); +DEFINE_int32(bbuf_resp_size, -1, "Byte-buffer response payload size"); DEFINE_string(client_type, "SYNC_CLIENT", "Client type"); DEFINE_int32(async_client_threads, 1, "Async client threads"); @@ -109,6 +111,13 @@ static void QpsDriver() { if (FLAGS_simple_req_size >= 0) { params->set_req_size(FLAGS_simple_req_size); } + } else if (FLAGS_bbuf_resp_size >= 0) { + auto params = + client_config.mutable_payload_config()->mutable_bytebuf_params(); + params->set_resp_size(FLAGS_bbuf_resp_size); + if (FLAGS_bbuf_req_size >= 0) { + params->set_req_size(FLAGS_bbuf_req_size); + } } else { // set a reasonable default: proto but no payload client_config.mutable_payload_config()->mutable_simple_params(); @@ -175,4 +184,4 @@ int main(int argc, char** argv) { grpc::testing::QpsDriver(); return 0; -} +}
\ No newline at end of file |