Changeset c235179 for benchmark/io/http
- Timestamp:
- Feb 1, 2021, 3:48:19 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 5e99a9a
- Parents:
- f99f5ba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/http_ring.cpp
rf99f5ba rc235179 20 20 socklen_t *addrlen; 21 21 int flags; 22 unsigned cnt; 22 23 } acpt; 23 24 … … 433 434 // Accept our first connection 434 435 // May not take effect until io_uring_submit_and_wait 435 connection::accept(ring, opt); 436 for(unsigned i = 0; i < opt.acpt.cnt; i++) { 437 connection::accept(ring, opt); 438 } 436 439 437 440 int reset = 1; // Counter to print stats once in a while … … 528 531 unsigned entries = 256; // number of entries per ring/kernel thread 529 532 unsigned backlog = 262144; // backlog argument to listen 533 unsigned preaccept = 1; // start by accepting X per threads 530 534 bool attach = false; // Whether or not to attach all the rings 531 535 bool sqpoll = false; // Whether or not to use SQ Polling … … 534 538 // Arguments Parsing 535 539 int c; 536 while ((c = getopt (argc, argv, "t:p:e:b: aS")) != -1) {540 while ((c = getopt (argc, argv, "t:p:e:b:c:aS")) != -1) { 537 541 switch (c) 538 542 { … … 548 552 case 'b': 549 553 backlog = atoi(optarg); 554 break; 555 case 'c': 556 preaccept = atoi(optarg); 550 557 break; 551 558 case 'a': … … 681 688 thrd_opts[i].acpt.addrlen = (socklen_t*)&addrlen; 682 689 thrd_opts[i].acpt.flags = 0; 690 thrd_opts[i].acpt.cnt = preaccept; 683 691 thrd_opts[i].endfd = efd; 684 692 thrd_opts[i].ring = &thrd_rings[i].storage;
Note: See TracChangeset
for help on using the changeset viewer.