diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-19 12:43:08 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-19 05:38:07 +0200 |
commit | a941b19e5d747a5468b3c10d4a1c95f539c476ac (patch) | |
tree | d67b02b8e5c05d68c62c2e9cf073eae907657efe | |
parent | 87f871aae392279b9475ea74ffe3bb9149e02e7c (diff) | |
download | samba-a941b19e5d747a5468b3c10d4a1c95f539c476ac.tar.gz samba-a941b19e5d747a5468b3c10d4a1c95f539c476ac.tar.bz2 samba-a941b19e5d747a5468b3c10d4a1c95f539c476ac.zip |
ntdb: reduce default hashsize on ntdbtorture.
Just like tdbtorture, having a hashsize of 2 stresses us much more!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | lib/ntdb/tools/ntdbtorture.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/ntdb/tools/ntdbtorture.c b/lib/ntdb/tools/ntdbtorture.c index d611563a7a..717f5dd1f5 100644 --- a/lib/ntdb/tools/ntdbtorture.c +++ b/lib/ntdb/tools/ntdbtorture.c @@ -46,6 +46,7 @@ static int loopnum; static int count_pipe; static union ntdb_attribute log_attr; static union ntdb_attribute seed_attr; +static union ntdb_attribute hsize_attr; static void ntdb_log(struct ntdb_context *ntdb, enum ntdb_log_level level, @@ -247,7 +248,7 @@ static void usage(void) #if TRANSACTION_PROB " [-t]" #endif - " [-k] [-n NUM_PROCS] [-l NUM_LOOPS] [-s SEED] [-S]\n"); + " [-k] [-n NUM_PROCS] [-l NUM_LOOPS] [-s SEED] [-S] [-H HASH_SIZE]\n"); exit(0); } @@ -364,9 +365,12 @@ int main(int argc, char * const *argv) log_attr.base.next = &seed_attr; log_attr.log.fn = ntdb_log; seed_attr.base.attr = NTDB_ATTRIBUTE_SEED; - seed_attr.base.next = NULL; + seed_attr.base.next = &hsize_attr; + hsize_attr.base.attr = NTDB_ATTRIBUTE_HASHSIZE; + hsize_attr.base.next = NULL; + hsize_attr.hashsize.size = 2; /* stress it by default. */ - while ((c = getopt(argc, argv, "n:l:s:thkS")) != -1) { + while ((c = getopt(argc, argv, "n:l:s:thkSH:")) != -1) { switch (c) { case 'n': num_procs = strtol(optarg, NULL, 0); @@ -391,6 +395,9 @@ int main(int argc, char * const *argv) case 'k': kill_random = 1; break; + case 'H': + hsize_attr.hashsize.size = strtol(optarg, NULL, 0); + break; default: usage(); } |