gcloud beta spanner samples workload - generate gRPC traffic for a given sample app's backend service
gcloud beta spanner samples workload APPNAME [--duration=DURATION; default="1h"] [--port=PORT] [--target-qps=TARGET_QPS] [GCLOUD_WIDE_FLAG ...]
(BETA) Before sending traffic to the backend service, create the database and start the service with:
$ gcloud beta spanner samples init APPNAME --instance-id=INSTANCE_ID $ gcloud beta spanner samples backend APPNAME \ --instance-id=INSTANCE_ID
To run all three steps together, use:
$ gcloud beta spanner samples run APPNAME --instance-id=INSTANCE_ID
To generate traffic for the 'finance' sample app, run:
$ gcloud beta spanner samples workload finance
- APPNAME
The sample app name, e.g. "finance".
- --duration=DURATION; default="1h"
Duration of time allowed to run before stopping the workload.
- --port=PORT
Port of the running backend service.
- --target-qps=TARGET_QPS
Target requests per second.
These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
This command is currently in beta and might change without notice. These variants are also available:
$ gcloud spanner samples workload
$ gcloud alpha spanner samples workload