Changes in benchmark/io/http/options.cfa [40a64f78:2cd784a]
- File:
-
- 1 edited
-
benchmark/io/http/options.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/options.cfa
r40a64f78 r2cd784a 21 21 false, // log 22 22 false, // stats 23 true, // interactive24 0, // redirect25 0, // redirect26 23 27 24 { // file_cache … … 55 52 // bool sqkpoll = false; 56 53 // bool iokpoll = false; 57 unsigned nentries = 0;54 unsigned nentries = 16; 58 55 bool isolate = false; 59 56 … … 65 62 {'\0', "isolate", "Create one cluster per processor", isolate, parse_settrue}, 66 63 {'\0', "log", "Enable logs", options.log, parse_settrue}, 67 {'\0', "sout", "Redirect standard out to file", options.reopen_stdout},68 {'\0', "serr", "Redirect standard error to file", options.reopen_stderr},69 64 {'\0', "stats", "Enable statistics", options.stats, parse_settrue}, 70 {'\0', "shell", "Disable interactive mode", options.interactive, parse_setfalse},71 65 {'\0', "accept-backlog", "Maximum number of pending accepts", options.socket.backlog}, 72 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}, … … 85 79 parse_args( argc, argv, opt, opt_cnt, "[OPTIONS]... [PATH]\ncforall http server", left ); 86 80 87 if( nentries != 0 &&!is_pow2(nentries) ) {81 if( !is_pow2(nentries) ) { 88 82 unsigned v = nentries; 89 83 v--; … … 137 131 138 132 options.file_cache.path = path; 139 140 if( options.reopen_stdout && options.reopen_stderr && 0 == strcmp(options.reopen_stdout, options.reopen_stderr) ) {141 serr | "Redirect sout and serr to the same file is not supported";142 exit(EXIT_FAILURE);143 }144 145 if( options.reopen_stdout ) {146 sout | "redirecting sout to '" | options.reopen_stdout | "'";147 FILE * ret = freopen( options.reopen_stdout, "w", stdout);148 if( ret == 0p ) {149 serr | "Failed to redirect sout to '" | options.reopen_stdout | "'";150 exit(EXIT_FAILURE);151 }152 }153 154 if( options.reopen_stderr ) {155 sout | "redirecting serr to '" | options.reopen_stderr | "'";156 FILE * ret = freopen( options.reopen_stderr, "w", stderr);157 if( ret == 0p ) {158 serr | "Failed to redirect serr to '" | options.reopen_stderr | "'";159 exit(EXIT_FAILURE);160 }161 }162 133 }
Note:
See TracChangeset
for help on using the changeset viewer.