From b1c52ceeed9934ad8f1d7eede3b0ade2c25594a4 Mon Sep 17 00:00:00 2001 From: public_host Date: Mon, 6 Jan 2025 14:26:49 +0800 Subject: [PATCH] update --- core.go | 7 +++++++ 1 file changed, 7 insertions(+) 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: