github.com/TeaOSLab/EdgeNode@v1.3.8/internal/nodes/http_request_stat.go (about) 1 package nodes 2 3 import ( 4 "github.com/TeaOSLab/EdgeNode/internal/stats" 5 ) 6 7 // 统计 8 func (this *HTTPRequest) doStat() { 9 if this.ReqServer == nil || this.web == nil || this.web.StatRef == nil { 10 return 11 } 12 13 // 内置的统计 14 stats.SharedHTTPRequestStatManager.AddRemoteAddr(this.ReqServer.Id, this.requestRemoteAddr(true), this.writer.SentBodyBytes(), this.isAttack) 15 stats.SharedHTTPRequestStatManager.AddUserAgent(this.ReqServer.Id, this.requestHeader("User-Agent"), this.remoteAddr) 16 }