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