@rzzx
2017-07-25T03:50:56.000000Z
字数 3871
阅读 801
Browser
备注:情报汇总数据是和图表数据放在一起的,以字段来控制
文档中主机名需要参考以下配置:
情报汇总(summary)字段表
| 字段 | 类型 | 说明 | 讲解 |
|---|---|---|---|
| serRepTime | string | 服务端响应时间 | 平均值,serRepTime可能没有(下同) |
| htmlLoadTime | string | HTML加载 | 平均值 |
| pageRender | string | 页面渲染 | 平均值 |
| fulLoad | obj[] | 完全加载 | 平均值 |
| satisfiedCount | string | 满意的次数 | 平均值 |
| tolerableCount | string | 可忍受的次数 | 平均值 |
| frustratedCount | string | 令人沮丧的次数 | 平均值 |
| SucPCount | string | 成功访问的次数 | 平均值 |
| realSamp | string | 真实样本 | 总值 |
| overSamp | string | 采样样本 | 总值 |
| ; | ; | ; | ; |
| indexStalled | String | Stalled | 总值 |
| indexDns | String | DNS | 总值 |
| indexConn | String | 建连 | 总值 |
| indexFirPacket | String | 首包 | 总值 |
| indexSerRepTime | String | 服务端响应时间 | 总值 |
| indexSsl | String | SSL | 总值 |
| indexRemPacket | String | 剩余包 | 总值 |
| indexDomDispose | String | DOM处理 | 总值 |
| indexResLoad | String | 资源加载 | 总值 |
| indexHtmlLoadTime | String | HTML加载 | 总值 |
| indexPageRender | String | 页面渲染 | 总值 |
| indexFulLoad | String | 完全加载 | 总值 |
| indexFirRenTime | String | 首次渲染时间 | 总值 |
| indexFirstInterTime | String | 首次交互时间 | 总值 |
| indexCusLoadTime | String | 自定义加载时间 | 总值 |
| ; | ; | ; | ; |
| throRate | String | 吞吐率 | 平均值 |
| jsErrRate | String | js错误率 | 平均值 |
图表JSON数据如果只需要中文,需请求数据头文件里声明'X-Accept-Language': 'zh-cn'
URL
/highcharts-chart-data/LATEST/account/browser/charts/{chartId}.json
示例URL
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
| browserAppId | true | string | browserAppID |
| chartId | true | string | 图表ID,一开始定死 |
| timePeriod | true | string | 时间间隔 相差多少分钟 |
| timeType | true | int | 时间计算类型(先默认为1) |
| showSummary | false | int | 是否展示情报汇总数据(1 or 0,默认是0) |
| showLabel | false | int | 是否展示图例数据(1 or 0,默认是0,只针对browser-map-region中国地图和browser-map-city省市地图有效) |
| endTime | false | string | 结束时间 格式如:yyyy-MM-dd HH:mm:ss |
| timeZone | false | String | 时区 |
图表标题(写死)
响应数据
/*成功响应*/{"status":200,"data":{"chart":{"series":[{"name":"服务端响应时间","type":"area","color":"#3598db","data":[{"x":1491494400000,"y":0.1},...],"params":"436"},...],"summary":{"serRepTime":{"value":"0.100秒","name":"服务端响应时间"},"htmlLoadTime":{"value":"1.385秒","name":"HTML加载"},"pageRender":{"value":"17.221秒","name":"页面渲染"}},"label":[{"gte":"0.0",//大于等于"lt":"1.0",//小于"label":"0-1"//显示的内容},{"gte":"1.0","lt":"2.0","label":"1-2"},...],"xAxis":[{"gridLineColor":"#c0c0c0","gridLineDashStyle":"ShortDot","gridLineWidth":1,"tickInterval":"MM-dd HH:mm","type":"datetime"}],"yAxis":[{"tickUnit":"秒"}]},"type":null}}/*错误响应*/{"status":-1,"data":"_ty_auth_token is NULL"}/*错误响应*/{"status":-500,"message":"system error."}
Label颜色:
(8种时从上到下)"#ea4139", "#eb6a37", "#f29a45", "#deca57", "#8fc178", "#68b960", "#54ac4c", "#4ea046"
(10种时从上到下)"#ea4139", "#eb6137", "#ef853f", "#ebaa4b", "#d5c95b", "#98c274", "#75bc68", "#5fb357", "#53a94b", "#4ea046"
URL
/highcharts-chart-data/LATEST/account/browser/charts/{chartId}.json
示例URL
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
| browserAppId | true | int | browserAppID |
| browserKeyPageId | true | string | 关键元素ID |
| chartId | true | string | 图表ID,一开始定死 |
| timePeriod | true | string | 时间间隔 相差多少分钟 |
| timeType | true | int | 时间计算类型(先默认为1) |
| endTime | false | string | 结束时间 格式如:yyyy-MM-dd HH:mm:ss |
| timeZone | false | String | 时区 |
图表标题(写死)
响应数据
/*成功响应*/{"status":200,"data":{"chart":{"series":[{"name":"服务端响应时间","type":"area","color":"#3598db","data":[{"x":1491494400000,"y":0.1},...],"params":"436"},...],"summary":{"serRepTime":{"value":"0.100秒","name":"服务端响应时间"},"htmlLoadTime":{"value":"1.385秒","name":"HTML加载"},"pageRender":{"value":"17.221秒","name":"页面渲染"}},"xAxis":[{"gridLineColor":"#c0c0c0","gridLineDashStyle":"ShortDot","gridLineWidth":1,"tickInterval":"MM-dd HH:mm","type":"datetime"}],"yAxis":[{"tickUnit":"秒"}]},"type":null}}/*错误响应*/{"status":-1,"data":"_ty_auth_token is NULL"}/*错误响应*/{"status":-500,"message":"system error."}