提交 aad96805 编写于 作者: G Ganlin Zhao

[TD-6452]<feature>: taoskeeper add request metrics

上级 a5301e97
......@@ -704,17 +704,18 @@ static int32_t monBuildDnodeReqSql(char *sql) {
SDnodeStatisInfo dInfo = dnodeGetStatisInfo();
SVnodeStatisInfo vInfo = vnodeGetStatisInfo();
int32_t monQueryReqCnt = monFetchQueryReqCnt();
int32_t monSubmitReqCnt = monFetchSubmitReqCnt();
float interval = tsMonitorInterval * 1.0;
float httpReqRate = dInfo.httpReqNum / interval;
float queryReqRate = dInfo.queryReqNum / interval;
float submitReqRate = dInfo.submitReqNum / interval;
float queryReqRate = (dInfo.queryReqNum - monQueryReqCnt)/ interval;
float submitReqRate = (dInfo.submitReqNum - monSubmitReqCnt) / interval;
dnodeClearStatisInfo();
float submitRowRate = vInfo.submitRowNum / interval;
float submitRowRate = (vInfo.submitRowNum - monSubmitReqCnt) / interval;
vnodeClearStatisInfo();
int32_t monQueryReqCnt = monFetchQueryReqCnt();
int32_t monSubmitReqCnt = monFetchSubmitReqCnt();
return sprintf(sql, ", %d, %f, %d, %f, %d, %d, %f, %d, %d, %f", dInfo.httpReqNum, httpReqRate,
dInfo.queryReqNum - monQueryReqCnt, queryReqRate,
vInfo.submitRowNum - monSubmitReqCnt, vInfo.submitRowSucNum - monSubmitReqCnt, submitRowRate,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册