From 93ef9379cb3b87de80585ba18e080ea7bead1651 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Mon, 14 Aug 2023 15:33:14 +0300 Subject: [PATCH] CCBC-1584: update documentation on how to use collections with pillowfight Change-Id: I3c06dcb247bc116b43916848d7398c2d000adb44 Reviewed-on: https://review.couchbase.org/c/libcouchbase/+/195328 Reviewed-by: Charles Dixon Tested-by: Build Bot Tested-by: Sergey Avseyev --- doc/cbc-pillowfight.markdown | 11 +++++++++++ doc/man/cbc-pillowfight.1 | 20 +++++++++++++++++++- doc/man/cbc.1 | 15 ++++++++++++++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/doc/cbc-pillowfight.markdown b/doc/cbc-pillowfight.markdown index 826e67d36..9ac5aae0a 100644 --- a/doc/cbc-pillowfight.markdown +++ b/doc/cbc-pillowfight.markdown @@ -69,6 +69,12 @@ The following options control workload generation: Set the prefix to prepend to all keys in the cluster. Useful if you do not wish the items to conflict with existing data. +* `--collection`=_scopeName.collectionName_: + Access data based on full collection name path. Multiple `--collection` filters can + specify the different scopes with different collection names. Note that default + collection will not be used if the collection was specified, to enable default collection + along with the named ones, it should be specified explicitly `--collection=_default._default`. + * `-t`, `--num-threads`=_NTHREADS_: Set the number of threads (and thus the number of client instances) to run concurrently. Each thread is assigned its own client object. @@ -260,6 +266,11 @@ Run against a bucket (`a_bucket`) on a cluster on a remote host: cbc-pillowfight -U couchbase://192.168.33.101/a_bucket +Run against a bucket (`a_bucket`) and use collections `app.users` and `backup.stage`: + + cbc-pillowfight --spec couchbase://127.0.0.1/a_bucket --username Administrator --password password \ + --collection app.users --collection backup.stage + ### BENCHMARK EXAMPLES The following examples show how to configure different types of workloads with diff --git a/doc/man/cbc-pillowfight.1 b/doc/man/cbc-pillowfight.1 index fcf435515..c7f7c1810 100644 --- a/doc/man/cbc-pillowfight.1 +++ b/doc/man/cbc-pillowfight.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CBC\-PILLOWFIGHT" "1" "April 2019" "" "" +.TH "CBC\-PILLOWFIGHT" "1" "August 2023" "" "" . .SH "NAME" \fBcbc\-pillowfight\fR \- Stress Test for Couchbase Client and Cluster @@ -65,6 +65,10 @@ Set the \fItotal\fR number of items the workload will access within the cluster\ Set the prefix to prepend to all keys in the cluster\. Useful if you do not wish the items to conflict with existing data\. . .TP +\fB\-\-collection\fR=\fIscopeName\.collectionName\fR +Access data based on full collection name path\. Multiple \fB\-\-collection\fR filters can specify the different scopes with different collection names\. Note that default collection will not be used if the collection was specified, to enable default collection along with the named ones, it should be specified explicitly \fB\-\-collection=_default\._default\fR\. +. +.TP \fB\-t\fR, \fB\-\-num\-threads\fR=\fINTHREADS\fR Set the number of threads (and thus the number of client instances) to run concurrently\. Each thread is assigned its own client object\. . @@ -438,6 +442,20 @@ cbc\-pillowfight \-U couchbase://192\.168\.33\.101/a_bucket . .IP "" 0 . +.P +Run against a bucket (\fBa_bucket\fR) and use collections \fBapp\.users\fR and \fBbackup\.stage\fR: +. +.IP "" 4 +. +.nf + +cbc\-pillowfight \-\-spec couchbase://127\.0\.0\.1/a_bucket \-\-username Administrator \-\-password password \e + \-\-collection app\.users \-\-collection backup\.stage +. +.fi +. +.IP "" 0 +. .SS "BENCHMARK EXAMPLES" The following examples show how to configure different types of workloads with pillowfight\. . diff --git a/doc/man/cbc.1 b/doc/man/cbc.1 index fdfe486be..1feb9a337 100644 --- a/doc/man/cbc.1 +++ b/doc/man/cbc.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CBC" "1" "December 2020" "" "" +.TH "CBC" "1" "August 2023" "" "" . .SH "NAME" \fBcbc\fR \- Couchbase Client Commandline Utility @@ -61,6 +61,9 @@ \fBcbc admin\fR \fI\-P PASSWORD\fR \fIRESTAPI\fR [\fIOPTIONS\fR] . .br +\fBcbc bucket\-list\fR \fI\-P PASSWORD\fR [\fIOPTIONS\fR] +. +.br \fBcbc bucket\-create\fR \fI\-P PASSWORD\fR \fINAME\fR [\fIOPTIONS\fR] . .br @@ -488,6 +491,16 @@ In addition to the \fIOPTIONS\fR specified above, the following options are reco \fB\-X\fR, \fB\-\-method\fR=\fIGET|PUT|POST|DELETE\fR Specify the HTTP method to use for the specific request\. The default method is \fBGET\fR\. . +.SS "bucket\-list" +List the buckets in the cluster +. +.P +In addition to the \fIOPTIONS\fR specified above, the following options are recognized: +. +.TP +\fB\-r\fR, \fB\-\-raw\fR +Print unformatted server response in JSON form\. +. .SS "bucket\-create" Create a bucket in the cluster\. .