Share via


az load test-run metrics

Note

This reference is part of the load extension for the Azure CLI (version 2.41.0 or higher). The extension will automatically install the first time you run an az load test-run metrics command. Learn more about extensions.

Command group 'load test-run' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Command group to retrieve load test run metrics.

Command group to retrieve load test run metrics with list, get-namespaces, get-definitions, get-dimension.

Commands

Name Description Type Status
az load test-run metrics get-definitions

Get all metric definitions for a load test run.

Extension Preview
az load test-run metrics get-dimensions

Get all metric dimension values for load test run.

Extension Preview
az load test-run metrics get-namespaces

Get all metric namespaces for a load test run.

Extension Preview
az load test-run metrics list

List metrics for a load test run.

Extension Preview

az load test-run metrics get-definitions

Preview

Command group 'load test-run metrics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get all metric definitions for a load test run.

az load test-run metrics get-definitions --load-test-resource
                                         --metric-namespace
                                         --test-run-id
                                         [--resource-group]

Examples

Get metric definitions for a given load test run and test run metric namespace.

az load test-run metrics get-definitions --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace LoadTestRunMetrics

Get metric definitions for a given load test run and engine health metric namespace.

az load test-run metrics get-definitions --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace EngineHealthMetrics

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--metric-namespace

Namespace of the metric. Allowed values: LoadTestRunMetrics, EngineHealthMetrics.

--test-run-id -r

Test run ID of the load test run.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load test-run metrics get-dimensions

Preview

Command group 'load test-run metrics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get all metric dimension values for load test run.

az load test-run metrics get-dimensions --load-test-resource
                                        --metric-definition-name
                                        --metric-dimension
                                        --metric-namespace
                                        --test-run-id
                                        [--end-time]
                                        [--interval]
                                        [--resource-group]
                                        [--start-time]

Examples

Get CPU metric dimension values for a given load test run.

az load test-run metrics get-dimensions --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace EngineHealthMetrics --metric-name CPU --metric-dimension EngineId

Get Response Time metric dimension values for a given load test run, time period and aggregation interval.

az load test-run metrics get-dimensions --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace LoadTestRunMetrics --metric-name ResponseTime --metric-dimension RequestName --start-time 2023-01-01T15:16:17Z --end-time 2023-01-01T16:17:18Z --interval PT5M

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--metric-definition-name --metric-name

Name of the metric.

--metric-dimension

Value of the metric dimension.

--metric-namespace

Namespace of the metric. Allowed values: LoadTestRunMetrics, EngineHealthMetrics.

--test-run-id -r

Test run ID of the load test run.

Optional Parameters

--end-time

ISO 8601 formatted end time.

--interval

ISO 8601 formatted interval. Allowed values: PT10S, PT1H, PT1M, PT5M, PT5S.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--start-time

ISO 8601 formatted start time.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load test-run metrics get-namespaces

Preview

Command group 'load test-run metrics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get all metric namespaces for a load test run.

az load test-run metrics get-namespaces --load-test-resource
                                        --test-run-id
                                        [--resource-group]

Examples

Get metric namespace for a load test run.

az load test-run metrics get-namespaces --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--test-run-id -r

Test run ID of the load test run.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load test-run metrics list

Preview

Command group 'load test-run metrics' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List metrics for a load test run.

az load test-run metrics list --load-test-resource
                              --metric-namespace
                              --test-run-id
                              [--aggregation]
                              [--dimension-filters]
                              [--end-time]
                              [--interval]
                              [--metric-definition-name]
                              [--resource-group]
                              [--start-time]

Examples

List all metrics for a given load test run and metric namespace.

az load test-run metrics list --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace LoadTestRunMetrics

List Virtual Users metrics for a given load test run.

az load test-run metrics list --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace LoadTestRunMetrics --metric-name VirtualUsers

List Virtual Users metrics for a given load test run, time period and aggregation interval.

az load test-run metrics list --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace LoadTestRunMetrics --metric-name VirtualUsers --start-time 2023-01-01T15:16:17Z --end-time 2023-01-01T16:17:18Z --interval PT5M

List Response Time metrics for a given load test run and all dimension filters.

az load test-run metrics list --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace LoadTestRunMetrics --metric-name ResponseTime --dimension-filters *

List Response Time metrics for a given load test run and all values for a specific dimension.

az load test-run metrics list --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace LoadTestRunMetrics --metric-name ResponseTime --dimension-filters RequestName=*

List Response Time metrics for a given load test run and specific dimensions.

az load test-run metrics list --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-namespace LoadTestRunMetrics --metric-name ResponseTime --dimension-filters RequestName=Homepage RequestName=Homepage-1

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--metric-namespace

Namespace of the metric. Allowed values: LoadTestRunMetrics, EngineHealthMetrics.

--test-run-id -r

Test run ID of the load test run.

Optional Parameters

--aggregation

Operation used to aggregate the metrics.

--dimension-filters

Space and comma-separated dimension filters: key1[=value1] key1[=value2] key2[=value3] format ...]. * is supported as a wildcard for both key and value. Example: --dimension-filters key1=value1 key2=*, --dimension-filters *.

--end-time

ISO 8601 formatted end time.

--interval

ISO 8601 formatted interval. Allowed values: PT10S, PT1H, PT1M, PT5M, PT5S.

--metric-definition-name --metric-name

Name of the metric.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--start-time

ISO 8601 formatted start time.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.