- Timestamp:
- Oct 29, 2021, 5:17:44 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- e8ac228
- Parents:
- 1ed9cb63
- Location:
- benchmark/io/http
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/options.cfa
r1ed9cb63 r40a64f78 21 21 false, // log 22 22 false, // stats 23 true, // interactive 24 0, // redirect 25 0, // redirect 23 26 24 27 { // file_cache … … 62 65 {'\0', "isolate", "Create one cluster per processor", isolate, parse_settrue}, 63 66 {'\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}, 64 69 {'\0', "stats", "Enable statistics", options.stats, parse_settrue}, 70 {'\0', "shell", "Disable interactive mode", options.interactive, parse_setfalse}, 65 71 {'\0', "accept-backlog", "Maximum number of pending accepts", options.socket.backlog}, 66 72 {'\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}, … … 131 137 132 138 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 } 133 162 } -
benchmark/io/http/options.hfa
r1ed9cb63 r40a64f78 10 10 bool log; 11 11 bool stats; 12 bool interactive; 13 const char * reopen_stdout; 14 const char * reopen_stderr; 12 15 13 16 struct {
Note: See TracChangeset
for help on using the changeset viewer.