lkr
Usage:
$ lkr [OPTIONS] COMMAND [ARGS]...
Options:
--env-file FILE
: Path to the environment file to load [default: /Users/bryanweber/projects/load-tests/.env]--client-id TEXT
: Looker API client ID--client-secret TEXT
: Looker API client secret--base-url TEXT
: Looker API base URL--install-completion
: Install completion for the current shell.--show-completion
: Show completion for the current shell, to copy it or customize the installation.--help
: Show this message and exit.
Commands:
load-test
lkr load-test
Usage:
$ lkr load-test [OPTIONS] COMMAND [ARGS]...
Options:
--help
: Show this message and exit.
Commands:
debug
: Check that the environment variables are...dashboard
query
render
embed-observability
: Open dashboards with observability metrics.delete-embed-users
: Remove all embed users for a dashboard
lkr load-test debug
Check that the environment variables are set correctly
Usage:
$ lkr load-test debug [OPTIONS] TYPE:{looker}
Arguments:
TYPE:{looker}
: Type of debug to run (looker) [required]
Options:
--help
: Show this message and exit.
lkr load-test dashboard
Usage:
$ lkr load-test dashboard [OPTIONS]
Options:
--dashboard TEXT
: Dashboard ID to run the test on. Keeps dashboard open for user, turn on auto-refresh to keep dashboard updated [required]--model TEXT
: Model to run the test on. Specify multiple models as --model model1 --model model2 [required]--group TEXT
: Looker group IDs to add to the user. Useful when you have a closed system and need to test with content in a shared folder. Accepts multiple arguments --group 123 --group 456--users INTEGER RANGE
: Number of users to run the test with [default: 25; 1<=x<=1000]--spawn-rate FLOAT RANGE
: Number of users to spawn per second [default: 1; 0<=x<=100]--run-time INTEGER RANGE
: How many minutes to run the load test for [default: 5; x>=1]--attribute TEXT
: Looker attributes to run the test on. Specify them as attribute:value like --attribute store:value. Excepts multiple arguments --attribute store:acme --attribute team:managers. Accepts random.randint(0,1000) format--stop-timeout INTEGER
: How many seconds to wait for the load test to stop [default: 15]--help
: Show this message and exit.
lkr load-test query
Usage:
$ lkr load-test query [OPTIONS]
Options:
--query TEXT
: Query ID (from explore url) to run the test on [required]--users INTEGER RANGE
: Number of users to run the test with [default: 25; 1<=x<=1000]--spawn-rate FLOAT RANGE
: Number of users to spawn per second [default: 1; 0<=x<=100]--run-time INTEGER RANGE
: How many minutes to run the load test for [default: 5; x>=1]--model TEXT
: Model to run the test on. Specify multiple models as --model model1 --model model2--attribute TEXT
: Looker attributes to run the test on. Specify them as attribute:value like --attribute store:value. Accepts multiple arguments --attribute store:acme --attribute team:managers. Accepts random.randint(0,1000) format--group TEXT
: Looker group IDs to add to the user. Useful when you have a closed system and need to test with content in a shared folder. Accepts multiple arguments --group 123 --group 456--wait-time-min INTEGER RANGE
: User tasks have a random wait time between this and the max wait time [default: 1; 1<=x<=100]--wait-time-max INTEGER RANGE
: User tasks have a random wait time between this and the min wait time [default: 15; 1<=x<=100]--sticky-sessions / --no-sticky-sessions
: Keep the same user logged in for the duration of the test. sticky_sessions=True is currently not supported with the Looker SDKs, we are working around it in the User class. [default: no-sticky-sessions]--query-async / --no-query-async
: Run the query asynchronously [default: no-query-async]--async-bail-out INTEGER
: How many iterations to wait for the async query to complete (roughly number of seconds) [default: 120]--help
: Show this message and exit.
lkr load-test render
Usage:
$ lkr load-test render [OPTIONS]
Options:
--dashboard TEXT
: Dashboard ID to render [required]--users INTEGER RANGE
: Number of users to run the test with [default: 25; 1<=x<=1000]--spawn-rate FLOAT RANGE
: Number of users to spawn per second [default: 1; 0<=x<=100]--run-time INTEGER RANGE
: How many minutes to run the load test for [default: 5; x>=1]--model TEXT
: Model to run the test on. Specify multiple models as --model model1 --model model2--group TEXT
: Looker group IDs to add to the user. Useful when you have a closed system and need to test with content in a shared folder. Accepts multiple arguments --group 123 --group 456--attribute TEXT
: Looker attributes to run the test on. Specify them as attribute:value like --attribute store:value. Excepts multiple arguments --attribute store:acme --attribute team:managers. Accepts random.randint(0,1000) format--result-format TEXT
: Format of the rendered output (pdf, png, jpg) [default: pdf]--render-bail-out INTEGER
: How many iterations to wait for the render task to complete (roughly number of seconds) [default: 120]--run-once / --no-run-once
: Make each user run its render task only once. [default: no-run-once]--help
: Show this message and exit.
lkr load-test embed-observability
Open dashboards with observability metrics. The metrics are collected through Looker's JavaScript events and logged with the specified prefix. This command will:
- Start an embed server to host the dashboard iframe
- Spawn multiple users that will:
- Open the dashboard in an iframe
- Wait for the dashboard to load
- Track timing metrics for:
- dashboard:loaded - Dashboard load time
- dashboard:run:start - Query start time
- dashboard:run:complete - Query completion time
- dashboard:tile:start - Individual tile start time
- dashboard:tile:complete - Individual tile completion time
- Will also track start and end times for the whole process (looker_embed_task_start and looker_embed_task_complete)
- Log all events with timing information to help analyze performance in a JSON format. Events begin with <log_event_prefix>:*
- Automatically stop after the specified run time
Usage:
$ lkr load-test embed-observability [OPTIONS]
Options:
--dashboard TEXT
: Dashboard ID to render [required]--users INTEGER RANGE
: Number of users to run the test with [default: 5; 1<=x<=1000]--spawn-rate FLOAT RANGE
: Number of users to spawn per second [default: 1; 0<=x<=100]--run-time INTEGER RANGE
: How many minutes to run the load test for [default: 5; x>=1]--port INTEGER
: Port to run the embed server on [default: 4000]--min-wait INTEGER RANGE
: Minimum wait time between tasks [default: 60; x>=1]--max-wait INTEGER RANGE
: Maximum wait time between tasks [default: 120; x>=1]--model TEXT
: Model to run the test on. Specify multiple models as --model model1 --model model2--group TEXT
: Looker group IDs to add to the user. Useful when you have a closed system and need to test with content in a shared folder. Accepts multiple arguments --group 123 --group 456--completion-timeout INTEGER RANGE
: Timeout in seconds for the dashboard run complete event [default: 120; x>=1]--attribute TEXT
: Looker attributes to run the test on. Specify them as attribute:value like --attribute store:value. Excepts multiple arguments --attribute store:acme --attribute team:managers. Accepts random.randint(0,1000) format--log-event-prefix TEXT
: Prefix to add to the log event [default: looker-embed-observability]--open-url / --no-open-url
: Do not open the URL in the observability browser, useful for viewing a user's embed dashboard when running locally [default: open-url]--debug
: Enable debug mode--help
: Show this message and exit.
lkr load-test delete-embed-users
Remove all embed users for a dashboard
Usage:
$ lkr load-test delete-embed-users [OPTIONS]
Options:
--first-name TEXT
: First name of the user to remove [default: Embed]--dry-run / --no-dry-run
: Do not delete the users, just print the users that would be deleted [default: dry-run]--limit INTEGER
: Limit the number of users to remove [default: 100]--help
: Show this message and exit.