Changeset 5ad381b for benchmark/io/http/options.cfa
- Timestamp:
- Jan 7, 2021, 5:29:17 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:
- 390fb02
- Parents:
- 2b4daf2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/options.cfa
r2b4daf2 r5ad381b 12 12 #include <parseargs.hfa> 13 13 14 #include <string.h> 15 14 16 Options options @= { 17 { // experiment 18 FileExperiment, // type 19 }, 20 15 21 { // file_cache 16 22 0, // open_flags; … … 37 43 }; 38 44 45 static bool parse(const char * arg, ExprimentType & value) { 46 if(strcmp(arg, "file") == 0) { 47 value = FileExperiment; 48 return true; 49 } 50 51 if(strcmp(arg, "plaintext") == 0) { 52 value = HelloWorldExperiment; 53 return true; 54 } 55 56 return false; 57 } 58 39 59 const char * parse_options( int argc, char * argv[] ) { 40 60 bool subthrd = false; … … 48 68 {'p', "port", "Port the server will listen on", options.socket.port}, 49 69 {'c', "cpus", "Number of processors to use", options.clopts.nprocs}, 70 {'T', "experiment", "Experiment type to run: file, plaintext", options.experiment.type}, 50 71 {'t', "threads", "Number of worker threads to use", options.clopts.nworkers}, 51 72 {'b', "accept-backlog", "Maximum number of pending accepts", options.socket.backlog},
Note: See TracChangeset
for help on using the changeset viewer.