From: teodor Date: Fri, 27 Oct 2006 08:31:09 +0000 (+0000) Subject: Improve help message X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=7257f00d34f3410cb366e38899fbf8f01f246d35;p=ftsbench.git Improve help message --- diff --git a/ftsbench.c b/ftsbench.c index 917c090..3b898c6 100644 --- a/ftsbench.c +++ b/ftsbench.c @@ -73,31 +73,46 @@ usage() { } fputs( - "ftsbench - full text search benchmark ofr RDBMS\n" + "ftsbench - full text search benchmark for RDBMS\n" "Initialization of DB:\n" - "\tftsbench -i [-b RDBMS] [-n NUMROW] [-l LEXFILE] [-g GAMMAFILE] [-f FLAGS] [-q] -d DBNAME\n" - "FLAGS are comma-separate list of:\n" - " gin - use GIN index\n" - " gist - use GiST index\n" - " func - use functional index\n", + "ftsbench -i [-b RDBMS] [-n NUMROW] [-l LEXFILE] [-g GAMMAFILE] [-f FLAGS] [-q] -d DBNAME\n" + " -b RDBMS\t- type of DB: ", + stdout + ); + fputs( buf, stdout ); + fputs( + "\n" + " -n NUMROW - number of row in table\n" + " -l LEXFILE - file with words and its frequents (default gendata/lex)\n" + " -g GAMMAFILE - file with doc's length distribution (default gendata/gamma-lens)\n" + " -l FLGAS - options for db's schema (see below)\n" + " -q - do not print progress message\n", stdout ); fputs( "Run tests:\n" - "\tftsbench [-b RDBMS] [-c NCLIENTS] [-n NUMQUERY] [-l LEXFILE] [-g GAMMAFILE] [-f FLAGS] [-q] -d DBNAME\n" - "FLAGS are comma-separate list of:\n" - " and - AND'ing lexemes in query (default)\n" - " or - OR'ing lexemes in query\n" - " sort - sort result of query\n" - "Options are:\n" - " -b RDBMS\t- type of DB: ", + "ftsbench [-b RDBMS] [-c NCLIENTS] [-n NUMQUERY] [-l LEXFILE] [-g GAMMAFILE] [-f FLAGS] [-q] -d DBNAME\n" + " -b RDBMS\t- type of DB: ", stdout ); fputs( buf, stdout ); fputs( "\n" - " -l LEXFILE\t- file with words and its frequents\n" - " -g GAMMAFILE\t- file with doc's length distribution\n", + " -c NCLIENTS - number of clients in parallel\n" + " -n NUMQUERY - number of queries per client\n" + " -l LEXFILE - file with words and its frequents (default gendata/query-lex)\n" + " -g GAMMAFILE - file with doc's length distribution (default gendata/query-lens)\n" + " -l FLGAS - options for db's schema (see below)\n" + " -q - do not print progress message\n", + stdout + ); + fputs( + "FLAGS are comma-separate list of:\n" + " gin - use GIN index\n" + " gist - use GiST index\n" + " func - use functional index\n" + " and - AND'ing lexemes in query (default)\n" + " or - OR'ing lexemes in query\n", stdout ); exit(1); @@ -140,8 +155,6 @@ getFLAGS(char *flg) { flags |= FLG_AND; if ( strcasestr(flg,"or") ) flags |= FLG_OR; - if ( strcasestr(flg,"sort") ) - flags |= FLG_SORT; if ( (flags & FLG_GIST) && (flags & FLG_GIN) ) { fprintf(stderr,"GIN and GiST flags are mutually exclusive\n");