有奖捉虫:办公协同&微信生态&物联网文档专题 HOT

1. 接口描述

接口请求域名: pts.tencentcloudapi.com 。

查询系统支持的指标

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:DescribeAvailableMetrics。
Version String 公共参数,本接口取值:2021-07-28。
Region String 公共参数,本接口不需要传递此参数。

3. 输出参数

参数名称 类型 描述
MetricSet Array of MetricInfo 系统支持的所有指标
RequestId String 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 查询系统支持的指标

输入示例

POST / HTTP/1.1
Host: pts.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAvailableMetrics
<公共请求参数>

{}

输出示例

{
    "Response": {
        "MetricSet": [
            {
                "Alias": "RequestsCount",
                "Description": "请求数量",
                "Metric": "pts_engine_req_total",
                "MetricType": "counter",
                "Unit": "reqs",
                "Aggregations": [
                    {
                        "Aggregation": "Rate",
                        "Legend": "请求RPS"
                    },
                    {
                        "Aggregation": "Count",
                        "Legend": "请求总数"
                    },
                    {
                        "Aggregation": "ErrorPercentage",
                        "Legend": "请求失败率"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "RequestDuration",
                "Description": "请求响应时间",
                "Metric": "pts_engine_req_duration_seconds",
                "MetricType": "histogram",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Percentiles",
                        "Legend": "响应时间Percentiles"
                    },
                    {
                        "Aggregation": "Timings",
                        "Legend": "各阶段平均耗时分布"
                    },
                    {
                        "Aggregation": "Avg",
                        "Legend": "平均响应时间"
                    },
                    {
                        "Aggregation": "P50",
                        "Legend": "响应时间P50"
                    },
                    {
                        "Aggregation": "P90",
                        "Legend": "响应时间P90"
                    },
                    {
                        "Aggregation": "P95",
                        "Legend": "响应时间P95"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "ChecksCount",
                "Description": "检查点数量",
                "Metric": "pts_engine_checks_total",
                "MetricType": "counter",
                "Unit": "checks",
                "Aggregations": [
                    {
                        "Aggregation": "Rate",
                        "Legend": "检查点RPS"
                    },
                    {
                        "Aggregation": "Count",
                        "Legend": "检查点总数"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "NumberVirtualUsers",
                "Description": "并发用户数",
                "Metric": "pts_engine_num_vus",
                "MetricType": "gauge",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Gauge",
                        "Legend": "并发数"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "SendBytesCount",
                "Description": "发送字节数",
                "Metric": "pts_engine_send_bytes_total",
                "MetricType": "counter",
                "Unit": "bytes",
                "Aggregations": [
                    {
                        "Aggregation": "Rate",
                        "Legend": "发送速率"
                    },
                    {
                        "Aggregation": "Count",
                        "Legend": "发送总数"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "ReceiveBytesCount",
                "Description": "接收字节数",
                "Metric": "pts_engine_receive_bytes_total",
                "MetricType": "counter",
                "Unit": "bytes",
                "Aggregations": [
                    {
                        "Aggregation": "Rate",
                        "Legend": "接收速率"
                    },
                    {
                        "Aggregation": "Count",
                        "Legend": "接收总数"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "IterationsCount",
                "Description": "场景迭代数",
                "Metric": "pts_engine_iterations_total",
                "MetricType": "counter",
                "Unit": "iters",
                "Aggregations": [
                    {
                        "Aggregation": "Rate",
                        "Legend": "场景执行TPS"
                    },
                    {
                        "Aggregation": "Count",
                        "Legend": "场景执行总数"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "IterationDuration",
                "Description": "场景执行耗时",
                "Metric": "pts_engine_iterations_duration_seconds",
                "MetricType": "histogram",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Percentiles",
                        "Legend": "场景执行Percentiles"
                    },
                    {
                        "Aggregation": "Avg",
                        "Legend": "场景执行平均耗时"
                    },
                    {
                        "Aggregation": "P50",
                        "Legend": "场景执行P50"
                    },
                    {
                        "Aggregation": "P90",
                        "Legend": "场景执行P90"
                    },
                    {
                        "Aggregation": "P95",
                        "Legend": "场景执行P95"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "RequestSendingDuration",
                "Description": "发送请求阶段耗时",
                "Metric": "pts_engine_req_send_duration_seconds",
                "MetricType": "histogram",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Percentiles",
                        "Legend": "发送耗时Percentiles"
                    },
                    {
                        "Aggregation": "Avg",
                        "Legend": "发送请求平均耗时"
                    },
                    {
                        "Aggregation": "P50",
                        "Legend": "发送耗时P50"
                    },
                    {
                        "Aggregation": "P90",
                        "Legend": "发送耗时P90"
                    },
                    {
                        "Aggregation": "P95",
                        "Legend": "发送耗时P95"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "RequestWaitingDuration",
                "Description": "等待响应阶段耗时",
                "Metric": "pts_engine_req_wait_duration_seconds",
                "MetricType": "histogram",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Percentiles",
                        "Legend": "等待响应Percentiles"
                    },
                    {
                        "Aggregation": "Avg",
                        "Legend": "等待响应平均耗时"
                    },
                    {
                        "Aggregation": "P50",
                        "Legend": "等待响应P50"
                    },
                    {
                        "Aggregation": "P90",
                        "Legend": "等待响应P90"
                    },
                    {
                        "Aggregation": "P95",
                        "Legend": "等待响应P95"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "RequestReceivingDuration",
                "Description": "下载响应体耗时",
                "Metric": "pts_engine_req_receive_duration_seconds",
                "MetricType": "histogram",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Percentiles",
                        "Legend": "下载响应体Percentiles"
                    },
                    {
                        "Aggregation": "Avg",
                        "Legend": "下载响应体平均耗时"
                    },
                    {
                        "Aggregation": "P50",
                        "Legend": "下载响应体P50"
                    },
                    {
                        "Aggregation": "P90",
                        "Legend": "下载响应体P90"
                    },
                    {
                        "Aggregation": "P95",
                        "Legend": "下载响应体P95"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "RequestBlockingDuration",
                "Description": "等待连接耗时",
                "Metric": "pts_engine_req_block_duration_seconds",
                "MetricType": "histogram",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Percentiles",
                        "Legend": "等待连接Percentiles"
                    },
                    {
                        "Aggregation": "Avg",
                        "Legend": "等待连接平均耗时"
                    },
                    {
                        "Aggregation": "P50",
                        "Legend": "等待连接P50"
                    },
                    {
                        "Aggregation": "P90",
                        "Legend": "等待连接P90"
                    },
                    {
                        "Aggregation": "P95",
                        "Legend": "等待连接P95"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "RequestConnectingDuration",
                "Description": "建立连接耗时",
                "Metric": "pts_engine_req_connect_duration_seconds",
                "MetricType": "histogram",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Percentiles",
                        "Legend": "建立连接Percentiles"
                    },
                    {
                        "Aggregation": "Avg",
                        "Legend": "建立连接平均耗时"
                    },
                    {
                        "Aggregation": "P50",
                        "Legend": "建立连接P50"
                    },
                    {
                        "Aggregation": "P90",
                        "Legend": "建立连接P90"
                    },
                    {
                        "Aggregation": "P95",
                        "Legend": "建立连接P95"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "RequestHandshakingDuration",
                "Description": "TLS握手耗时",
                "Metric": "pts_engine_req_tls_handshake_duration_seconds",
                "MetricType": "histogram",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Percentiles",
                        "Legend": "TLS握手Percentiles"
                    },
                    {
                        "Aggregation": "Avg",
                        "Legend": "TLS握手平均耗时"
                    },
                    {
                        "Aggregation": "P50",
                        "Legend": "TLS握手P50"
                    },
                    {
                        "Aggregation": "P90",
                        "Legend": "TLS握手P90"
                    },
                    {
                        "Aggregation": "P95",
                        "Legend": "TLS握手P95"
                    }
                ],
                "InnerMetric": false
            },
            {
                "Alias": "RequestMaxDuration",
                "Description": "请求最大响应时间",
                "Metric": "pts_engine_req_max_duration_seconds",
                "MetricType": "gauge",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Max",
                        "Legend": "最大响应时间"
                    }
                ],
                "InnerMetric": true
            },
            {
                "Alias": "RequestMinDuration",
                "Description": "请求最小响应时间",
                "Metric": "pts_engine_req_min_duration_seconds",
                "MetricType": "gauge",
                "Unit": "s",
                "Aggregations": [
                    {
                        "Aggregation": "Min",
                        "Legend": "最小响应时间"
                    }
                ],
                "InnerMetric": true
            }
        ],
        "RequestId": "mzs29tyki4uxl-9pp6thbjeldh34a4xd"
    }
}

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

该接口暂无业务逻辑相关的错误码,其他错误码详见 公共错误码