|
@ -469,6 +469,7 @@ func (th *TimeArrowHelper) GetHitTimeArrow(t time.Time, group string, expandTags |
|
|
defer func() { |
|
|
defer func() { |
|
|
log.Println("GetHitTimeArrow耗时:", time.Since(startTime)) |
|
|
log.Println("GetHitTimeArrow耗时:", time.Since(startTime)) |
|
|
}() |
|
|
}() |
|
|
|
|
|
log.Println("GetHitTimeArrow", t, group, expandTags) |
|
|
dataStartTime := time.Now() |
|
|
dataStartTime := time.Now() |
|
|
ta, err := th.GetData(group) |
|
|
ta, err := th.GetData(group) |
|
|
dataEndTime := time.Now() |
|
|
dataEndTime := time.Now() |
|
@ -486,14 +487,20 @@ func (th *TimeArrowHelper) GetHitTimeArrow(t time.Time, group string, expandTags |
|
|
forStart := time.Now() |
|
|
forStart := time.Now() |
|
|
for e := range ta { |
|
|
for e := range ta { |
|
|
//当天具体时间判断
|
|
|
//当天具体时间判断
|
|
|
|
|
|
isInTimeOfDayStart := time.Now() |
|
|
if !isInTimeOfDay(t, ta[e]) { |
|
|
if !isInTimeOfDay(t, ta[e]) { |
|
|
|
|
|
log.Println("isInTimeOfDay耗时:", time.Since(isInTimeOfDayStart)) |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
|
|
|
log.Println("isInTimeOfDay耗时:", time.Since(isInTimeOfDayStart)) |
|
|
|
|
|
|
|
|
//扩展标签判断
|
|
|
//扩展标签判断
|
|
|
|
|
|
isInExpandTagsStart := time.Now() |
|
|
if !isInExpandTags(ta[e], strings.Join(expandTags, "-")) { |
|
|
if !isInExpandTags(ta[e], strings.Join(expandTags, "-")) { |
|
|
|
|
|
log.Println("isInExpandTags耗时:", time.Since(isInExpandTagsStart)) |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
|
|
|
log.Println("isInExpandTags耗时:", time.Since(isInExpandTagsStart)) |
|
|
|
|
|
|
|
|
switch ta[e].Type { |
|
|
switch ta[e].Type { |
|
|
case TimeArrowTypeDayOfWeek: |
|
|
case TimeArrowTypeDayOfWeek: |
|
|