aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/qps_driver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/qps/qps_driver.cc')
-rw-r--r--test/cpp/qps/qps_driver.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc
index c7096391e6..eb0a7a5f4e 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();