|
@@ -29,7 +29,7 @@ var (
|
|
|
ObjSpeedDicOfTpperception: make(map[uint32]float64),
|
|
|
}
|
|
|
// 每个触发器5秒触发一次
|
|
|
- triggerInterval = 5.0
|
|
|
+ triggerInterval = 3.0
|
|
|
// 保存时间窗口需要锁,防止数据竟态
|
|
|
saveTimeWindowMutex sync.Mutex
|
|
|
// /cicv_location
|
|
@@ -1846,6 +1846,9 @@ func saveTimeWindow(faultLabel string, faultHappenTime string, lastTimeWindow *c
|
|
|
latestTimeWindowEnd = latestEnd
|
|
|
lastTimeWindow.TimeWindowEnd = latestTimeWindowEnd
|
|
|
lastTimeWindow.Length = util.CalculateDifferenceOfTimeCustom(lastTimeWindow.TimeWindowBegin, lastTimeWindow.TimeWindowEnd)
|
|
|
+ } else {
|
|
|
+ lastTimeWindow.TimeWindowEnd = expectEnd
|
|
|
+ lastTimeWindow.Length = util.CalculateDifferenceOfTimeCustom(lastTimeWindow.TimeWindowBegin, lastTimeWindow.TimeWindowEnd)
|
|
|
}
|
|
|
// 更新label
|
|
|
labels := lastTimeWindow.Labels
|