Ignore:
Timestamp:
Jul 17, 2020, 3:03:36 PM (17 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
0d52c6f
Parents:
50d529e
Message:

Added options to list files instead of running the server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/main.cfa

    r50d529e r53e4562  
    2424//=============================================================================================
    2525Options options @= {
    26         0,
    27         42u,
    28         0,
    29         false,
    30         false,
    31         0
     26        0,     //   open_flags;
     27        42u,   //       hash_seed;
     28        0,     //   file_cache_size;
     29        false, //       file_cache_list;
     30        false, //       procstats;
     31        false, //       viewhalts;
     32        0      //       the_cluster;
    3233};
    3334
     
    7071                {'t', "threads", "Number of worker threads to use", nworkers},
    7172                {'b', "accept-backlog", "Maximum number of pending accepts", backlog},
    72                 {'B', "channel-size", "Maximum number of accepted connection pending", chan_size}
     73                {'B', "channel-size", "Maximum number of accepted connection pending", chan_size},
     74                {'S', "seed", "seed to use for hashing", options.hash_seed },
     75                {'C', "cache-size", "Size of the cache to use, if set to small, will uses closes power of 2", options.file_cache_size },
     76                {'l', "list-files", "List the files in the specified path and exit", options.file_cache_list, parse_settrue }
     77
    7378        };
    7479        int opt_cnt = sizeof(opt) / sizeof(cfa_option);
    7580
    7681        char **left;
    77       parse_args( argc, argv, opt, opt_cnt, "[OPTIONS] [PATH]  -- cforall http server", left );
     82      parse_args( argc, argv, opt, opt_cnt, "[OPTIONS]... [PATH]\ncforall http server", left );
     83        if( left[0] != 0p ) {
     84                path = left[0];
     85                left++;
     86        }
     87        if( left[0] != 0p ) {
     88                abort("Too many trailing arguments!\n");
     89        }
    7890
    7991
Note: See TracChangeset for help on using the changeset viewer.