mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Remove stale signature benchmarking code (-L command-line option).
I don't think this is seeing much use or will ever see much use, and unless compilers optimize it out, it's just wasting cycles.
This commit is contained in:
parent
56a7bf7936
commit
2aae90d4f2
4 changed files with 0 additions and 36 deletions
|
@ -577,9 +577,6 @@ RuleFileMagicState* RuleMatcher::InitFileMagic() const
|
|||
{
|
||||
RuleFileMagicState* state = new RuleFileMagicState();
|
||||
|
||||
if ( rule_bench == 3 )
|
||||
return state;
|
||||
|
||||
loop_over_list(root->psets[Rule::FILE_MAGIC], i)
|
||||
{
|
||||
RuleHdrTest::PatternSet* set = root->psets[Rule::FILE_MAGIC][i];
|
||||
|
@ -630,9 +627,6 @@ RuleMatcher::MIME_Matches* RuleMatcher::Match(RuleFileMagicState* state,
|
|||
return rval;
|
||||
}
|
||||
|
||||
if ( rule_bench >= 2 )
|
||||
return rval;
|
||||
|
||||
#ifdef DEBUG
|
||||
if ( debug_logger.IsEnabled(DBG_RULES) )
|
||||
{
|
||||
|
@ -712,9 +706,6 @@ RuleEndpointState* RuleMatcher::InitEndpoint(analyzer::Analyzer* analyzer,
|
|||
RuleEndpointState* state =
|
||||
new RuleEndpointState(analyzer, from_orig, opposite, pia);
|
||||
|
||||
if ( rule_bench == 3 )
|
||||
return state;
|
||||
|
||||
rule_hdr_test_list tests;
|
||||
tests.append(root);
|
||||
|
||||
|
@ -837,9 +828,6 @@ void RuleMatcher::Match(RuleEndpointState* state, Rule::PatternType type,
|
|||
// for 'accepted' (that depends on the average number of matching
|
||||
// patterns).
|
||||
|
||||
if ( rule_bench >= 2 )
|
||||
return;
|
||||
|
||||
bool newmatch = false;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -956,9 +944,6 @@ void RuleMatcher::Match(RuleEndpointState* state, Rule::PatternType type,
|
|||
|
||||
void RuleMatcher::FinishEndpoint(RuleEndpointState* state)
|
||||
{
|
||||
if ( rule_bench == 3 )
|
||||
return;
|
||||
|
||||
// Send EOL to payload matchers.
|
||||
Match(state, Rule::PAYLOAD, (const u_char *) "", 0, false, true, false);
|
||||
|
||||
|
@ -1110,9 +1095,6 @@ void RuleMatcher::ExecRule(Rule* rule, RuleEndpointState* state, bool eos)
|
|||
|
||||
void RuleMatcher::ClearEndpointState(RuleEndpointState* state)
|
||||
{
|
||||
if ( rule_bench == 3 )
|
||||
return;
|
||||
|
||||
state->payload_size = -1;
|
||||
|
||||
loop_over_list(state->matchers, j)
|
||||
|
@ -1121,9 +1103,6 @@ void RuleMatcher::ClearEndpointState(RuleEndpointState* state)
|
|||
|
||||
void RuleMatcher::ClearFileMagicState(RuleFileMagicState* state) const
|
||||
{
|
||||
if ( rule_bench == 3 )
|
||||
return;
|
||||
|
||||
loop_over_list(state->matchers, j)
|
||||
state->matchers[j]->state->Clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue