in pkg/profiling/continuous/checker/common/http_checker.go [145:173]
func (n *HTTPBasedChecker[Data]) ReceiveBufferEvent(event network.BufferEvent) {
info := n.PidWithInfos[event.Pid()]
if info == nil {
return
}
for _, policyInfo := range info.PolicyWithWindows {
var matchesWindows *base.TimeWindows[network.BufferEvent, float64]
// match with the regex or URI list
if len(policyInfo.uriWithTimeWindows) > 0 {
for uri, windows := range policyInfo.uriWithTimeWindows {
if event.RequestURI() == uri {
matchesWindows = windows
}
}
if matchesWindows == nil {
continue
}
} else if policyInfo.uriRegex != nil && !policyInfo.uriRegex.MatchString(event.RequestURI()) {
continue
}
if matchesWindows == nil {
matchesWindows = policyInfo.defaultTimeWindows
}
matchesWindows.Add(event.StartTime(), event)
}
}