summaryrefslogtreecommitdiff
path: root/bench/wtperf/wtperf.h
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2017-02-03 03:28:50 +1100
committersueloverso <sue@mongodb.com>2017-02-02 11:28:50 -0500
commit3e68fb2d7da35eeb122308971f02203c58caa538 (patch)
treeef563addbea357f1738eb7042a931f57758756fd /bench/wtperf/wtperf.h
parent0562f92104f0b2d8ef218d9fe465ef718bc2d9cd (diff)
downloadmongo-3e68fb2d7da35eeb122308971f02203c58caa538.tar.gz
WT-3139 Enhance wtperf to support periodic table scans (#3268)
* Enhance wtperf to support periodic table scans * Implement scans as read_range. * Use a random cursor to set key in table properly. * Don't allow insert workload with table specifier. * Reset the rand cursor so it isn't positioned. * Make wtperf pre_load_data an option.
Diffstat (limited to 'bench/wtperf/wtperf.h')
-rw-r--r--bench/wtperf/wtperf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/bench/wtperf/wtperf.h b/bench/wtperf/wtperf.h
index 81d74e134f6..db88d0b0271 100644
--- a/bench/wtperf/wtperf.h
+++ b/bench/wtperf/wtperf.h
@@ -66,6 +66,9 @@ typedef struct {
uint64_t throttle; /* Maximum operations/second */
/* Number of operations per transaction. Zero for autocommit */
int64_t ops_per_txn;
+ int64_t pause; /* Time between scans */
+ int64_t read_range; /* Range of reads */
+ int32_t table_index; /* Table to focus ops on */
int64_t truncate; /* Truncate ratio */
uint64_t truncate_pct; /* Truncate Percent */
uint64_t truncate_count; /* Truncate Count */
@@ -225,6 +228,7 @@ typedef struct {
struct __wtperf_thread { /* Per-thread structure */
WTPERF *wtperf; /* Enclosing configuration */
+ WT_CURSOR *rand_cursor; /* Random key cursor */
WT_RAND_STATE rnd; /* Random number generation state */
@@ -241,6 +245,7 @@ struct __wtperf_thread { /* Per-thread structure */
TRACK ckpt; /* Checkpoint operations */
TRACK insert; /* Insert operations */
TRACK read; /* Read operations */
+ TRACK scan; /* Scan operations */
TRACK update; /* Update operations */
TRACK truncate; /* Truncate operations */
TRACK truncate_sleep; /* Truncate sleep operations */