Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Issue 347. Request per second must be >= threads. Throw an error when conflicts. #348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion socialNetwork/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ cd ../socialNetwork

Example:
```bash
../wrk2/wrk -D exp -t 12 -c 400 -d 300 -L -s ./wrk2/scripts/social-network/compose-post.lua http://10.109.126.103:8080/wrk2-api/post/compose -R 10
../wrk2/wrk -D exp -t 5 -c 400 -d 300 -L -s ./wrk2/scripts/social-network/compose-post.lua http://10.109.126.103:8080/wrk2-api/post/compose -R 10
```

#### Read home timelines
Expand Down
5 changes: 5 additions & 0 deletions wrk2/src/wrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,11 @@ static int parse_args(struct config *cfg, char ***urls, struct http_parser_url *
return -1;
}

if (cfg->rate < cfg->threads){
fprintf(stderr, "Request per sec must be >= threads\n");
return -1;
}

for(int i = optind; i<argc; i++)
{
if (!script_parse_url(argv[i], *mul_part)) {
Expand Down