Skip to content

Commit beecb14

Browse files
committed
feat: 添加 AlistStrm 重定向 URL 耗时日志
1 parent 376d824 commit beecb14

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

internal/handler/strm.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"context"
88
"fmt"
99
"net/http"
10+
"time"
1011

1112
"github.com/allegro/bigcache/v3"
1213
)
@@ -63,6 +64,11 @@ func getHTTPStrmHandler() (StrmHandlerFunc, error) {
6364
}
6465

6566
func alistStrmHandler(content string, alistAddr string) string {
67+
startTime := time.Now()
68+
defer func() {
69+
logging.Debugf("获取 AlistStrm 重定向 URL 耗时:%s", time.Since(startTime))
70+
}()
71+
6672
alistClient, err := service.GetAlistClient(alistAddr)
6773
if err != nil {
6874
logging.Warning("获取 AlistClient 失败:", err)

0 commit comments

Comments
 (0)