cbworkloadgen
=============

We use this tool to generate workload for couchbase server. The tool can generate predefined workload or run in loop mode until it is stopped.

Run command
------------

    cbworkloadgen OPTIONS

OPTIONS:

  `-n HOST[:PORT]`, --node=HOST[:PORT] Default port is 8091

  `-u USERNAME`, --user=USERNAME       REST username of the cluster.

  `-p PASSWORD`, --password=PASSWORD   REST password of the cluster.

  `-b BUCKETNAME`, --bucket=BUCKETNAME Specific bucket name. Default is default bucket. Data can be inserted to a different bucket other than default.

  `-i ITEMS`, --item=ITEMS             Number of items to be inserted.

  `-r RATIO`, --ratio=RATIO            set/get operation ratio, which is a value between 0 and 1. Default .95 means 95% are set operations.

  `-s SIZE`, --size=SIZE               minimum value size. Default is 10 bytes.

  `-j`, --json                         Insert json format data. Default is false

  `-l`, --loop                         Loop forever until it is interrupted by users

  `-t THREADS`, --threads=THREADS      Number of concurrent workers to generate loads. Default is 1.

  `--prefix`                           prefix to use for memcached keys for json doc ids. Default is 'pymc'

  `-v`, --verbose                      Verbose logging; more -v's provide more verbosity

  `-h` --help                          Show this help message and exit

Example
-------


Upload 10000 json documents to localhost and to default bucket

    ./cbworkloadgen -n localhost -i 10000 -j


Generate continuous workload to node 10.3.121.192 with 75% set and 25% get operations

    ./cbworkloadgen -n 10.3.121.192:8091 -r .75 -l

Errors
------

These are kinds of error cases to consider ...

* If inserted to bucket other than default, REST username and password are needed

Add functional spec for cbworloadgen
CBD-599: Add functional spec for cbworloadgen

Change-Id: I7f06a27bcc81f5acf2565ffc22f3b074ceda1cb0
Reviewed-on: http://review.couchbase.org/21250
Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
Tested-by: Bin Cui <ed18693fff32c00e22495f4877a3b901bed09041@gmail.com>
