Changes in benchmark/io/http/options.cfa [86c12d65:8c58e73]
- File:
-
- 1 edited
-
benchmark/io/http/options.cfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/options.cfa
r86c12d65 r8c58e73 38 38 10, // backlog 39 39 1024, // buflen 40 false, // onereuse 41 false // manyreuse 40 false // reuseport 42 41 }, 43 42 44 43 { // cluster 45 1, // nclusters;46 44 1, // nprocs; 47 45 1, // nworkers; … … 54 52 55 53 void parse_options( int argc, char * argv[] ) { 56 // bool fixedfd = false;57 // bool sqkpoll = false;58 // bool iokpoll = false;59 54 unsigned nentries = 0; 60 bool isolate = false;61 62 63 55 static cfa_option opt[] = { 64 56 { 'p', "port", "Port the server will listen on", options.socket.port}, 65 57 { 'c', "cpus", "Number of processors to use", options.clopts.nprocs}, 66 58 { 't', "threads", "Number of worker threads to use", options.clopts.nworkers}, 67 {'\0', "isolate", "Create one cluster per processor", isolate, parse_settrue},68 59 {'\0', "log", "Enable logs", options.log, parse_settrue}, 69 60 {'\0', "sout", "Redirect standard out to file", options.reopen_stdout}, … … 72 63 {'\0', "shell", "Disable interactive mode", options.interactive, parse_setfalse}, 73 64 {'\0', "accept-backlog", "Maximum number of pending accepts", options.socket.backlog}, 74 {'\0', "reuseport-one", "Create a single listen socket with SO_REUSEPORT", options.socket.onereuse, parse_settrue}, 75 {'\0', "reuseport", "Use many listen sockets with SO_REUSEPORT", options.socket.manyreuse, parse_settrue}, 65 {'\0', "reuseport", "Use acceptor threads with reuse port SO_REUSEPORT", options.socket.reuseport, parse_settrue}, 76 66 {'\0', "request_len", "Maximum number of bytes in the http request, requests with more data will be answered with Http Code 414", options.socket.buflen}, 77 67 {'\0', "seed", "seed to use for hashing", options.file_cache.hash_seed }, … … 101 91 nentries = v; 102 92 } 103 if(isolate) {104 options.clopts.nclusters = options.clopts.nprocs;105 options.clopts.nprocs = 1;106 }107 93 options.clopts.params.num_entries = nentries; 108 options.clopts.instance = alloc(options.clopts.nclusters); 109 options.clopts.thrd_cnt = alloc(options.clopts.nclusters); 110 options.clopts.cltr_cnt = 0; 111 for(i; options.clopts.nclusters) { 112 options.clopts.thrd_cnt[i] = 0; 113 } 94 options.clopts.instance = 0p; 95 options.clopts.thrd_cnt = 0; 114 96 115 97
Note:
See TracChangeset
for help on using the changeset viewer.