1: 需求:
查询线上某个接口(如:list_new)的成功率和时延
查接口时延的写法在网上找了一堆,都是语法错误,最后在阿里云官方api找到了正确的

2:贴一下阿里云官方文档:
3:成功率:
3.1:在ngix_ssl查询200的所有接口数
* and request_uri: "/camera/worthcloud/v3/cam/list_new" and status:200

3.2: 再查询失败的接口数:
* and request_uri: "/camera/worthcloud/v3/cam/list_new" and status>200

3.3:每页是20条数据;所以可以计算下:
总条数:2101811×20+116×20
成功的条数:2101811×20
成功率:成功条数/总条数%=99.994481%
4:时延:
时延字段:upstream_response_time
查询upstream_response_time字段的平均数:
| SELECT avg(upstream_response_time) AS upstream_response_time
查询list_new 接口成功的时延迟:
* and request_uri: "/camera/worthcloud/v3/cam/list_new" and status:200 | SELECT avg(upstream_response_time) AS upstream_response_time

