Skip to content

Commit 60a576d

Browse files
author
zhengshuxin
committed
test fiber benchmark.
1 parent 8464223 commit 60a576d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib_fiber/samples-c++1x/client2/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ static void usage(const char *procname) {
4848
" -s server_addr[default: 127.0.0.1:9001]\r\n"
4949
" -k cpus[default: 1]\r\n"
5050
" -c fibers count[default: 100]\r\n"
51+
" -n count[default: 10000]\r\n"
5152
" -o io timeout[default: -1]\r\n"
5253
" -O [if use setsockopt to set IO timeout, default: false]\r\n"
5354
, procname);
@@ -57,7 +58,7 @@ int main(int argc, char *argv[]) {
5758
int ch, cpus = 1, count = 10000, nfibers = 100, timeo = -1;
5859
std::string addr("127.0.0.1:9001");
5960

60-
while ((ch = getopt(argc, argv, "hs:k:c:o:O")) > 0) {
61+
while ((ch = getopt(argc, argv, "hs:k:c:n:o:O")) > 0) {
6162
switch (ch) {
6263
case 'h':
6364
usage(argv[0]);
@@ -71,6 +72,9 @@ int main(int argc, char *argv[]) {
7172
case 'c':
7273
nfibers = atoi(optarg);
7374
break;
75+
case 'n':
76+
count = atoi(optarg);
77+
break;
7478
case 'o':
7579
timeo = atoi(optarg);
7680
break;

0 commit comments

Comments
 (0)