gcloud alpha spanner samples workload Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha spanner samples workload - generate gRPC traffic for a given sample app's backend service
- SYNOPSIS
gcloud alpha spanner samples workloadAPPNAME[--duration=DURATION; default="1h"][--port=PORT][--target-qps=TARGET_QPS][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Before sending traffic to the backend service, create thedatabase and start the service with:gcloudalphaspannersamplesinitAPPNAME--instance-id=INSTANCE_IDgcloudalphaspannersamplesbackendAPPNAME--instance-id=INSTANCE_IDTo run all three steps together, use:
gcloudalphaspannersamplesrunAPPNAME--instance-id=INSTANCE_ID- EXAMPLES
- To generate traffic for the 'finance' sample app, run:
gcloudalphaspannersamplesworkloadfinance - POSITIONAL ARGUMENTS
APPNAME- The sample app name, e.g. "finance".
- FLAGS
--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.
- GCLOUD WIDE FLAGS
- 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 helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudspannersamplesworkloadgcloudbetaspannersamplesworkload
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.