From ab31f9cbda82d44976955edbb821c7247ffd2b2b Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sat, 29 Sep 2007 03:17:32 -0700 Subject: [PATCH] Added parameter to memslap so that key generation can be controlled through parameters. --- src/client_options.h | 1 + src/memslap.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/client_options.h b/src/client_options.h index 204135aa..cc427213 100644 --- a/src/client_options.h +++ b/src/client_options.h @@ -9,4 +9,5 @@ typedef enum { OPT_SET, OPT_REPLACE, OPT_ADD, + OPT_SLAP_DEFAULT_PAIRS, } memcached_options; diff --git a/src/memslap.c b/src/memslap.c index 0ea9cca3..ade9e11e 100644 --- a/src/memslap.c +++ b/src/memslap.c @@ -89,6 +89,7 @@ void options_parse(int argc, char *argv[]) {"debug", no_argument, &opt_verbose, OPT_DEBUG}, {"servers", required_argument, NULL, OPT_SERVERS}, {"flag", no_argument, &opt_displayflag, OPT_FLAG}, + {"default-pairs", required_argument, NULL, OPT_SLAP_DEFAULT_PAIRS}, {0, 0, 0, 0}, }; @@ -120,6 +121,9 @@ void options_parse(int argc, char *argv[]) case OPT_SERVERS: /* --servers or -s */ opt_servers= strdup(optarg); break; + case OPT_SLAP_DEFAULT_PAIRS: + opt_default_pairs= strtol(optarg, (char **)NULL, 10); + break; case '?': /* getopt_long already printed an error message. */ exit(1); -- 2.30.2