跳到主要内容

setData分析

setData列表

方法:POST

http://${域名}/mp-api/setData/setDataSqeList

请求参数

字段类型必选说明备注
mpIdInt应用ID例如:1
dimensionsString展示主机、URL、参数例如:host,uri,pageParams
timePeriodString查询时间范围单位:分钟,可传值:60
endTimeString查询结束事件可传值:2020-07-23 17:18
orderByExprsInt指标排序规则例如:setDataCount desc
limitint返回条数默认:10000,建议1000

返回参数

字段类型
setDataCountString
setDataTimeinteger
setDataPendinginteger
setDataUpdateinteger
pathString
setDataSizeMaxString
setDataRpsMaxinteger
pathAliasString

请求示例

{
"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

请求参数

字段类型必选说明备注
mpIdInt应用ID例如:1
dimensionsString展示主机、URL、参数例如:host,uri,pageParams
timePeriodString查询时间范围单位:分钟,可传值:60
endTimeString查询结束事件可传值:2020-07-23 17:18
orderByExprsInt指标排序规则例如:setDataCount desc
limitint返回条数默认:10000,建议1000

返回参数

字段类型
durationString
traceIdString
pendingDurString
pageTimeString
updateDurString
renderSizeString
deviationTimeString
userIdString
dataPathString

请求示例

{
"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",//traceID
"pendingDur":"65701",//队列耗时
"pageTime":"2022-12-08 15:29:21 965", //页面打开时间
"updateDur":"301",//运算耗时
"renderSize":"363.29", //大小
"deviationTime":"6",//时间偏移量
"userId":"wjn_12-30",//用户ID
"dataPath":"items"//dataPath
}
]