diff options
author | Don Anderson <dda@ddanderson.com> | 2013-08-13 14:22:19 -0400 |
---|---|---|
committer | Don Anderson <dda@ddanderson.com> | 2013-08-13 14:22:19 -0400 |
commit | 969c8fd10631d54218fc09b3a20fa345bf2560c1 (patch) | |
tree | cad58a5695cfe4e41c901089acc6acc6a3097709 | |
parent | d75aa55f658b4eecea4541d80bdecfa49bffdf0b (diff) | |
download | mongo-969c8fd10631d54218fc09b3a20fa345bf2560c1.tar.gz |
added comments to describe DEF_OPT_* usage, reformatted entries. refs #593
-rw-r--r-- | bench/wtperf/wtperf_opt.i | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/bench/wtperf/wtperf_opt.i b/bench/wtperf/wtperf_opt.i index 6190a3f8c5c..66683e268d7 100644 --- a/bench/wtperf/wtperf_opt.i +++ b/bench/wtperf/wtperf_opt.i @@ -54,8 +54,26 @@ #endif /* - * CONFIG struct fields that may be altered on command line via -o and -O. - * The default values are tiny, we want the basic run to be fast. + * Each option listed here represents a CONFIG struct field that may be + * altered on command line via -o and -O. Each option appears here as: + * DEF_OPT_AS_STRING(name, initval, desc) + * DEF_OPT_AS_BOOL(name, initval, desc) + * DEF_OPT_AS_UINT32(name, initval, desc) + * DEF_OPT_AS_FLAGVAL(name, bit, desc) + * + * The first three forms (*_{STRING|BOOL|UINT}) have these parameters: + * name: a C identifier, this identifier will be a field in CONFIG, + * and identifies the option for -o or -O. + * initval: a default initial value for the field. + * The default values are tiny, we want the basic run to be fast. + * desc: a description that will appear in the usage message. + * + * DEF_OPT_AS_FLAGVAL defines an option that sets a bit in the CONFIG->flags + * field. It has these parameters: + * name: an identifier used with -o or -O. + * bit: the bit(s) to be set in CONFIG->flags when <name>=true. + * The bits will be 0 by default, or when <name>=false. + * desc: a description that will appear in the usage message. */ DEF_OPT_AS_UINT32(checkpoint_interval, 0, "checkpoint every <int> report intervals, zero to disable") @@ -63,41 +81,30 @@ DEF_OPT_AS_STRING(conn_config, "create,cache_size=200MB", "connection configuration string") DEF_OPT_AS_BOOL(create, 1, "do population phase; set to false to use existing database") -DEF_OPT_AS_UINT32(data_sz, 100, - "data item size") -DEF_OPT_AS_UINT32(icount, 5000, - "number of records to insert") +DEF_OPT_AS_UINT32(data_sz, 100, "data item size") +DEF_OPT_AS_UINT32(icount, 5000, "number of records to insert") DEF_OPT_AS_FLAGVAL(insert_rmw, PERF_INSERT_RMW, "execute a read prior to each insert in populate") -DEF_OPT_AS_UINT32(insert_threads, 0, - "number of insert worker threads") -DEF_OPT_AS_UINT32(key_sz, 20, - "key item size") +DEF_OPT_AS_UINT32(insert_threads, 0, "number of insert worker threads") +DEF_OPT_AS_UINT32(key_sz, 20, "key item size") DEF_OPT_AS_FLAGVAL(pareto, PERF_RAND_PARETO, "use pareto 80/20 distribution for random numbers") -DEF_OPT_AS_UINT32(populate_threads, 1, - "number of populate threads") -DEF_OPT_AS_UINT32(rand_seed, 14023954, - "seed for random number generator") +DEF_OPT_AS_UINT32(populate_threads, 1, "number of populate threads") +DEF_OPT_AS_UINT32(rand_seed, 14023954, "seed for random number generator") DEF_OPT_AS_UINT32(random_range, 0, - "if non-zero, use random inserts in workload, reads" - " and updates\nignore WT_NOTFOUND") -DEF_OPT_AS_UINT32(read_threads, 2, - "number of read threads") + "if non-zero, use random inserts in workload, reads and updates\n" + "ignore WT_NOTFOUND") +DEF_OPT_AS_UINT32(read_threads, 2, "number of read threads") DEF_OPT_AS_UINT32(report_interval, 2, "how often to output throughput information") -DEF_OPT_AS_UINT32(run_time, 2, - "number of seconds to run workload phase") +DEF_OPT_AS_UINT32(run_time, 2, "number of seconds to run workload phase") DEF_OPT_AS_UINT32(stat_interval, 0, "log statistics every <int> report intervals, zero to disable") DEF_OPT_AS_STRING(table_config, DEFAULT_LSM_CONFIG, "table configuration string") -DEF_OPT_AS_UINT32(update_threads, 0, - "number of update threads") -DEF_OPT_AS_STRING(uri, - "lsm:test", "table uri") -DEF_OPT_AS_UINT32(verbose, 0, - "verbosity") +DEF_OPT_AS_UINT32(update_threads, 0, "number of update threads") +DEF_OPT_AS_STRING(uri, "lsm:test", "table uri") +DEF_OPT_AS_UINT32(verbose, 0, "verbosity") #undef DEF_OPT_AS_STRING #undef DEF_OPT_AS_BOOL |