Skip to content

Commit

Permalink
test fiber benchmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshuxin committed Oct 30, 2024
1 parent 8464223 commit 60a576d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib_fiber/samples-c++1x/client2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static void usage(const char *procname) {
" -s server_addr[default: 127.0.0.1:9001]\r\n"
" -k cpus[default: 1]\r\n"
" -c fibers count[default: 100]\r\n"
" -n count[default: 10000]\r\n"
" -o io timeout[default: -1]\r\n"
" -O [if use setsockopt to set IO timeout, default: false]\r\n"
, procname);
Expand All @@ -57,7 +58,7 @@ int main(int argc, char *argv[]) {
int ch, cpus = 1, count = 10000, nfibers = 100, timeo = -1;
std::string addr("127.0.0.1:9001");

while ((ch = getopt(argc, argv, "hs:k:c:o:O")) > 0) {
while ((ch = getopt(argc, argv, "hs:k:c:n:o:O")) > 0) {
switch (ch) {
case 'h':
usage(argv[0]);
Expand All @@ -71,6 +72,9 @@ int main(int argc, char *argv[]) {
case 'c':
nfibers = atoi(optarg);
break;
case 'n':
count = atoi(optarg);
break;
case 'o':
timeo = atoi(optarg);
break;
Expand Down

0 comments on commit 60a576d

Please sign in to comment.