Commit 638d4342 authored by TousakaRin's avatar TousakaRin

Fix code style, add new gflags: server_max_concurrency

parent 1a4489f5
......@@ -33,7 +33,7 @@ DEFINE_int32(timeout_ms, 3000, "RPC timeout in milliseconds");
DEFINE_int32(max_retry, 0, "Max retries(not including the first RPC)");
DEFINE_int32(case_interval, 20, "Intervals for different test cases");
DEFINE_int32(client_qps_change_interval_us, 50000,
"The interval for client changes the sending speed");
"The interval for client changes the sending speed");
DEFINE_string(case_file, "", "File path for test_cases");
void DisplayStage(const test::Stage& stage) {
......
......@@ -30,9 +30,11 @@
DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
"(waiting for client to close connection before server stops)");
DEFINE_int32(server_bthread_concurrency, 4, "For compute max qps");
DEFINE_int32(server_sync_sleep_us, 2500, "For compute maximum qps");
// max qps = 1000 / 2.5 * 4 = 1600
DEFINE_int32(server_bthread_concurrency, 4,
"Configuring the value of bthread_concurrency, For compute max qps, ");
DEFINE_int32(server_sync_sleep_us, 2500,
"Usleep time, each request will be executed once, For compute max qps");
// max qps = 1000 / 2.5 * 4
DEFINE_int32(control_server_port, 9000, "");
DEFINE_int32(echo_port, 9001, "TCP Port of echo server");
......@@ -41,8 +43,8 @@ DEFINE_string(case_file, "", "File path for test_cases");
DEFINE_int32(latency_change_interval_us, 50000, "Intervalt for server side changes the latency");
DEFINE_int32(server_max_concurrency, 0, "Echo Server's max_concurrency");
DEFINE_bool(use_usleep, false,
"EchoServer uses ::usleep or bthread_usleep to simulate latency "
"when processing requests");
"EchoServer uses ::usleep or bthread_usleep to simulate latency "
"when processing requests");
bthread::TimerThread g_timer_thread;
......@@ -221,7 +223,7 @@ public:
const test::TestCase& test_case = _case_set.test_case(_case_index++);
_echo_service->SetTestCase(test_case);
brpc::ServerOptions options;
// options.max_concurrency = 15;
options.max_concurrency = FLAGS_server_max_concurrency;
_server.MaxConcurrencyOf("test.EchoService.Echo") = test_case.max_concurrency();
_server.Start(FLAGS_echo_port, &options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment