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