diff options
-rw-r--r-- | bench/wtperf/wtperf.c | 24 | ||||
-rw-r--r-- | bench/wtperf/wtperf_opt.i | 32 |
2 files changed, 28 insertions, 28 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c index 9aedb9bf3d6..2243a8e3778 100644 --- a/bench/wtperf/wtperf.c +++ b/bench/wtperf/wtperf.c @@ -67,16 +67,16 @@ typedef struct { #define WT_PERF_POP 0x01 #define WT_PERF_READ 0x02 uint32_t phase; -#define PERF_INSERT_RMW 0x01 -#define PERF_RAND_PARETO 0x02 /* Use the Pareto random distribution. */ -#define PERF_RAND_WORKLOAD 0x04 +#define PERF_INSERT_RMW 0x01 +#define PERF_RAND_PARETO 0x02 /* Use the Pareto random distribution. */ +#define PERF_RAND_WORKLOAD 0x04 uint32_t flags; struct timeval phase_start_time; uint32_t elapsed_time; -#define PERF_SLEEP_LOAD 0x01 +#define PERF_SLEEP_LOAD 0x01 /* Fields changeable on command line are listed in wtperf_opt.i */ -#define OPT_DECLARE_STRUCT +#define OPT_DECLARE_STRUCT #include "wtperf_opt.i" #undef OPT_DECLARE_STRUCT @@ -98,7 +98,7 @@ typedef struct { /* All options changeable on command line using -o or -O are listed here. */ CONFIG_OPT config_opts[] = { -#define OPT_DEFINE_DESC +#define OPT_DEFINE_DESC #include "wtperf_opt.i" #undef OPT_DEFINE_DESC @@ -148,10 +148,10 @@ uint64_t wtperf_value_range(CONFIG *); const char *wtperftmp_subdir = "/wtperftmp"; /* Worker thread types. */ -#define WORKER_READ 0x01 -#define WORKER_INSERT 0x02 -#define WORKER_INSERT_RMW 0x03 -#define WORKER_UPDATE 0x04 +#define WORKER_READ 0x01 +#define WORKER_INSERT 0x02 +#define WORKER_INSERT_RMW 0x03 +#define WORKER_UPDATE 0x04 /* Default values. */ CONFIG default_cfg = { @@ -164,7 +164,7 @@ CONFIG default_cfg = { {0, 0}, /* phase_start_time */ 0, /* elapsed_time */ -#define OPT_DEFINE_DEFAULT +#define OPT_DEFINE_DEFAULT #include "wtperf_opt.i" #undef OPT_DEFINE_DEFAULT @@ -311,7 +311,7 @@ worker(CONFIG *cfg, uint32_t worker_type) continue; sprintf(key_buf, "%0*" PRIu64, cfg->key_sz, next_val); cursor->set_key(cursor, key_buf); - switch(worker_type) { + switch (worker_type) { case WORKER_READ: op_name = "read"; op_ret = cursor->search(cursor); diff --git a/bench/wtperf/wtperf_opt.i b/bench/wtperf/wtperf_opt.i index 57734d7508a..fedcee5f11e 100644 --- a/bench/wtperf/wtperf_opt.i +++ b/bench/wtperf/wtperf_opt.i @@ -29,33 +29,33 @@ */ #ifdef OPT_DECLARE_STRUCT -#define DEF_OPT_AS_STRING(name, initval, desc) const char *name; -#define DEF_OPT_AS_CONFIG_STRING(name, initval, desc) const char *name; -#define DEF_OPT_AS_BOOL(name, initval, desc) uint32_t name; -#define DEF_OPT_AS_UINT32(name, initval, desc) uint32_t name; -#define DEF_OPT_AS_FLAGVAL(name, bits, desc) +#define DEF_OPT_AS_STRING(name, initval, desc) const char *name; +#define DEF_OPT_AS_CONFIG_STRING(name, initval, desc) const char *name; +#define DEF_OPT_AS_BOOL(name, initval, desc) uint32_t name; +#define DEF_OPT_AS_UINT32(name, initval, desc) uint32_t name; +#define DEF_OPT_AS_FLAGVAL(name, bits, desc) #endif #ifdef OPT_DEFINE_DESC -#define DEF_OPT_AS_STRING(name, initval, desc) \ +#define DEF_OPT_AS_STRING(name, initval, desc) \ { #name, desc, #initval, STRING_TYPE, offsetof(CONFIG, name), 0 }, -#define DEF_OPT_AS_CONFIG_STRING(name, initval, desc) \ +#define DEF_OPT_AS_CONFIG_STRING(name, initval, desc) \ { #name, desc, #initval, CONFIG_STRING_TYPE, \ - offsetof(CONFIG, name), 0 }, -#define DEF_OPT_AS_BOOL(name, initval, desc) \ + offsetof(CONFIG, name), 0 }, +#define DEF_OPT_AS_BOOL(name, initval, desc) \ { #name, desc, #initval, BOOL_TYPE, offsetof(CONFIG, name), 0 }, -#define DEF_OPT_AS_UINT32(name, initval, desc) \ +#define DEF_OPT_AS_UINT32(name, initval, desc) \ { #name, desc, #initval, UINT32_TYPE, offsetof(CONFIG, name), 0 }, -#define DEF_OPT_AS_FLAGVAL(name, bits, desc) \ +#define DEF_OPT_AS_FLAGVAL(name, bits, desc) \ { #name, desc, "0", FLAG_TYPE, offsetof(CONFIG, flags), bits }, #endif #ifdef OPT_DEFINE_DEFAULT -#define DEF_OPT_AS_STRING(name, initval, desc) initval, -#define DEF_OPT_AS_CONFIG_STRING(name, initval, desc) initval, -#define DEF_OPT_AS_BOOL(name, initval, desc) initval, -#define DEF_OPT_AS_UINT32(name, initval, desc) initval, -#define DEF_OPT_AS_FLAGVAL(name, bits, desc) +#define DEF_OPT_AS_STRING(name, initval, desc) initval, +#define DEF_OPT_AS_CONFIG_STRING(name, initval, desc) initval, +#define DEF_OPT_AS_BOOL(name, initval, desc) initval, +#define DEF_OPT_AS_UINT32(name, initval, desc) initval, +#define DEF_OPT_AS_FLAGVAL(name, bits, desc) #endif /* |