Improves flow handling and adds runtime stats APIs
Refactors TCP and UDP flow managers to enhance analyzer selection and flow binding accuracy, including O(1) UDP stream rebinding by 5-tuple. Introduces runtime stats tracking for engine and ruleset operations, exposing new APIs for granular performance and error metrics. Optimizes GeoMatcher with result caching and supports efficient geosite set matching, reducing redundant computation in ruleset expressions.
This commit is contained in:
@@ -142,7 +142,7 @@ func TestTCPFlowUsesUpdatedRuleset(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("create node: %v", err)
|
||||
}
|
||||
mgr := newTCPFlowManager(0, noopTestLogger{}, nil, node)
|
||||
mgr := newTCPFlowManager(0, noopTestLogger{}, nil, node, nil)
|
||||
mgr.updateRuleset(fixedRuleset{action: ruleset.ActionAllow}, 0)
|
||||
|
||||
l3 := L3Info{
|
||||
@@ -180,7 +180,7 @@ func TestTCPFlowReevaluatesAfterRulesetVersionChange(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("create node: %v", err)
|
||||
}
|
||||
mgr := newTCPFlowManager(0, noopTestLogger{}, nil, node)
|
||||
mgr := newTCPFlowManager(0, noopTestLogger{}, nil, node, nil)
|
||||
mgr.updateRuleset(fixedRuleset{action: ruleset.ActionAllow}, 0)
|
||||
|
||||
l3 := L3Info{
|
||||
|
||||
Reference in New Issue
Block a user