Skip to content

Commit

Permalink
ab: Map -c0 to -c<number of workers>. PR 69383
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921256 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ylavic committed Oct 11, 2024
1 parent 914eef0 commit e1e8624
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions support/ab.c
Original file line number Diff line number Diff line change
Expand Up @@ -3376,6 +3376,9 @@ int main(int argc, const char * const argv[])
}
#endif /* APR_HAS_THREADS */

if (concurrency == 0) {
concurrency = num_workers;
}
if (concurrency > ROUND_UP(MAX_CONCURRENCY, num_workers)) {
fprintf(stderr, "%s: Invalid Concurrency [Range 0..%d]\n",
argv[0], ROUND_UP(MAX_CONCURRENCY, num_workers));
Expand Down

0 comments on commit e1e8624

Please sign in to comment.