提交 275ecdea 编写于 作者: C chenjiandongx

Chore

上级 db0ab163
......@@ -33,31 +33,29 @@ func pushData(c *gin.Context) {
return
}
recvMetricValues := []*dataobj.MetricValue{}
var recvMetricValues []*dataobj.MetricValue
errors.Dangerous(c.ShouldBindJSON(&recvMetricValues))
err := funcs.Push(recvMetricValues)
render.Message(c, err)
return
}
func getStrategy(c *gin.Context) {
var resp []interface{}
port := stra.GetPortCollects()
for _, stra := range port {
resp = append(resp, stra)
for _, s := range port {
resp = append(resp, s)
}
proc := stra.GetProcCollects()
for _, stra := range proc {
resp = append(resp, stra)
for _, s := range proc {
resp = append(resp, s)
}
logStras := strategy.GetListAll()
for _, stra := range logStras {
resp = append(resp, stra)
for _, s := range logStras {
resp = append(resp, s)
}
render.Data(c, resp, nil)
......
......@@ -349,7 +349,6 @@ func (gc *GlobalCounter) cleanStrategyData(id int64) {
return
}
sCount.TmsPoints = make(map[int64]*PointsCounter)
return
}
// countEqual意味着不会对统计的结构产生影响
......
......@@ -211,7 +211,7 @@ func (w *Worker) producer(line string, strategy *stra.Strategy) (*AnalysPoint, e
t := reg.FindString(line)
if len(t) <= 0 {
return nil, errors.New(fmt.Sprintf("cannot get timestamp:[sname:%s][sid:%d][timeFormat:%v]", strategy.Name, strategy.ID, timeFormat))
return nil, fmt.Errorf("cannot get timestamp:[sname:%s][sid:%d][timeFormat:%v]", strategy.Name, strategy.ID, timeFormat)
}
// 如果没有年,需添加当前年
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册