示例#1
0
/*
 * Function print_usage print smsh usage information to
 * err_stream.  The long_form parameter indicates whether
 * a longer and more detailed description should be printed.
 * The options parameter is the list of all options used
 * by smsh and the layers is calls.
 */
void print_usage(ostream& err_stream, const char* prog_name,
                 bool long_form, option_group_t& options)
{
    if (!long_form) {
        err_stream << "usage: " << prog_name
             << " [-h] [-v] [-O] [-C] [-s] [-L] [-V] [-f script_file]" 
             << " [-t assignment]"
             << endl;
        options.print_usage(long_form, err_stream);
    } else {
        err_stream << "usage: " << prog_name << endl;
        err_stream << "switches:\n"
            << "\t-h: print help message and exit\n"
            << "\t-v: verbose printing of all option values\n"
            << "\t-V: verbose printing of test results\n"
            << "\t-O: use old sort implementation\n"
            << "\t-C: compress btrees\n"
            << "\t-s: print stats at exit\n"
            << "\t-L: test log warning callback\n"
            << "\t-f script_file: specify script to run\n"
        << "options:" << endl;
        options.print_usage(true, err_stream);
    }
    return;
}
示例#2
0
void
usage(option_group_t& options)
{
    cerr << "Usage: client [options]" << endl;
    cerr << "Valid options are: " << endl;
    options.print_usage(TRUE, cerr);
}
示例#3
0
void usage(option_group_t& options)
{
  // "hit:n:s:r:dpo:"
  cerr << "Usage: server [-h] [-i] [-t] [-n] [-s] [-r] [-d] [-p] [-o] [options]" << endl;
  cerr << "       -i initialize device/volume and create file - default false" << endl;
  cerr << "       -h print this message" << endl;
  cerr << "       -t <which test - see below for options> - default 0" << endl;
  cerr << "       -n <#partitions> - for test 6 - default 10" << endl;
  cerr << "       -s <#scans> - default 0" << endl;
  cerr << "       -r <record size> - default 100" << endl;
  cerr << "       -d ignore locks - default false" << endl;
  cerr << "       -p ignore latches - default false" << endl;
  cerr << "       -o <which plp design> - default plp-regular/mrbtnorm" << endl;

  cerr << "        \tTESTS" << endl;
  cerr << "        \t0) MRBtree with single partition!" << endl;
  cerr << "        \t1) Adding inital partitions to MRBtree!" << endl;
  cerr << "        \t2) Create a partition after the some assocs are created in MRBtree. Then add new assocs" << endl;
  cerr << "        \t3) Start with a single partition. Insert records. Then split and merge trees of the same height." << endl;
  cerr << "        \t4) Merge partitions when root1.level > root2.level in MRBtree." << endl;
  cerr << "        \t5) Merge partitions when root1.level < root2.level in MRBtree." << endl;
  cerr << "        \t6) Make equal initial partitions. Then insert the records." << endl;
  
  cerr << "Valid options are: " << endl;
  options.print_usage(true, cerr);
}
示例#4
0
void
usage(option_group_t& options)
{
    cerr << "Usage: create_rec [-h] [-i] [options]" << endl;
    cerr << "       -i initialize device/volume and create file of records" << endl;
    cerr << "Valid options are: " << endl;
    options.print_usage(true, cerr);
}
示例#5
0
void
usage(option_group_t& options)
{
    // getopt(argc, argv, "Adn:his:t:l:")
    cerr << "Usage: server [-h] [-i] [options]" << endl;
    cerr << "       -i initialize device/volume and create file with nrec records" << endl;
    cerr << "       -n <#records>" << endl;
    cerr << "       -A strict-append" << endl;
    cerr << "       -d print record ids found" << endl;
    cerr << "       -h print this message" << endl;
    cerr << "Valid options are: " << endl;
    options.print_usage(true, cerr);
}