[PATCH]add expr_matcher hit pattern statistics

This commit is contained in:
liuwentan
2023-12-27 12:04:15 +08:00
parent 102c8ac0f8
commit 6d5fea298a
36 changed files with 1643 additions and 1080 deletions

View File

@@ -404,6 +404,9 @@ static void hs_lit_stream_reset(struct hs_lit_stream *hs_lit_stream)
scratches[hs_lit_stream->thread_id],
matched_event_cb, hs_lit_stream->matched_pat);
}
utarray_clear(hs_lit_stream->matched_pat->pattern_ids);
bloom_reset(hs_lit_stream->matched_pat->ref_bloom);
}
static void hs_regex_stream_reset(struct hs_regex_stream *hs_regex_stream)
@@ -418,6 +421,9 @@ static void hs_regex_stream_reset(struct hs_regex_stream *hs_regex_stream)
scratches[hs_regex_stream->thread_id],
matched_event_cb, hs_regex_stream->matched_pat);
}
utarray_clear(hs_regex_stream->matched_pat->pattern_ids);
bloom_reset(hs_regex_stream->matched_pat->ref_bloom);
}
static int gather_hit_pattern_id(struct matched_pattern *matched_pat,
@@ -436,8 +442,6 @@ static int gather_hit_pattern_id(struct matched_pattern *matched_pat,
}
*n_pattern_id = array_index;
utarray_clear(matched_pat->pattern_ids);
bloom_reset(matched_pat->ref_bloom);
return 0;
}