setData分析
setData列表
方法:POST
http://${域名}/mp-api/setData/setDataSqeList
请求参数
字段 |
类型 |
必选 |
说明 |
备注 |
mpId |
Int |
是 |
应用ID |
例如:1 |
dimensions |
String |
是 |
展示主机、URL、参数 |
例如:host,uri,pageParams |
timePeriod |
String |
是 |
查询时间范围 |
单位:分钟,可传值:60 |
endTime |
String |
是 |
查询结束事件 |
可传值:2020-07-23 17:18 |
orderByExprs |
Int |
否 |
指标排序规则 |
例如:setDataCount desc |
limit |
int |
否 |
返回条数 |
默认:10000,建议1000 |
返回参数
字段 |
类型 |
setDataCount |
String |
setDataTime |
integer |
setDataPending |
integer |
setDataUpdate |
integer |
path |
String |
setDataSizeMax |
String |
setDataRpsMax |
integer |
pathAlias |
String |
请求示例
{
"datasource":"MP_SETDATA",
"timePeriod":43201,
"endTime":"2023-02-23 16:57",
"dimensions":[
"path"
],
"filters":[
{
"name":"mpId",
"value":[
155
],
"operator":"IN"
}
],
"limit":1000,
"metrics":[
"setDataCount", //调用次数
"setDataTime", //耗时
"setDataPending", //队列耗时
"setDataUpdate", //运算耗时
"setDataRpsMax", //峰值频率
"setDataSizeMax" //峰值渲染大小
],
"orderByExprs":"setDataCount desc",
"render":"list"
}
返回示例
[
{
"path":"",
"setDataSizeMax":"363.29",
"setDataCount":"53",
"setDataUpdate":7701,
"setDataPending":105262,
"setDataTime":95963,
"setDataRpsMax":4,
"pathAlias":""
}
]
setData-慢耗时详情列表
方法:POST
http://${域名/mp-api/setData/setDataTrace?label=slow
请求参数
字段 |
类型 |
必选 |
说明 |
备注 |
mpId |
Int |
是 |
应用ID |
例如:1 |
dimensions |
String |
是 |
展示主机、URL、参数 |
例如:host,uri,pageParams |
timePeriod |
String |
是 |
查询时间范围 |
单位:分钟,可传值:60 |
endTime |
String |
是 |
查询结束事件 |
可传值:2020-07-23 17:18 |
orderByExprs |
Int |
否 |
指标排序规则 |
例如:setDataCount desc |
limit |
int |
否 |
返回条数 |
默认:10000,建议1000 |
返回参数
字段 |
类型 |
duration |
String |
traceId |
String |
pendingDur |
String |
pageTime |
String |
updateDur |
String |
renderSize |
String |
deviationTime |
String |
userId |
String |
dataPath |
String |
请求示例
{
"datasource":"mp_setdata_trace",
"timePeriod":43201,
"endTime":"2023-02-23 17:05",
"dimensions":[
"dataPath", //dataPath
"pageTime", //页面打开时间
"userId", //用户ID
"traceId" //traceID
],
"filters":[
{
"name":"mpId",
"value":[
155
],
"operator":"IN"
},
{
"name":"path",
"value":[
"/pages/index/index/xin/nn"
],
"operator":"IN"
}
],
"limit":1000,
"metrics":[
"deviationTime", //时间偏移量
"duration", //耗时
"pendingDur", //队列耗时
"updateDur", //运算耗时
"renderSize" //大小
],
"orderByExprs":"pageTime desc",
"render":"list",
"groupBy":false
}
返回示例
[
{
"duration":"66001",
"traceId":"6f8ca9b9a75f456ba13282e31a19b9eb",
"pendingDur":"65701",
"pageTime":"2022-12-08 15:29:21 965",
"updateDur":"301",
"renderSize":"363.29",
"deviationTime":"6",
"userId":"wjn_12-30",
"dataPath":"items"
}
]