Merge in SNORT/snort3 from ~VHORBATO/snort3:rp_percent to master
Squashed commit of the following:
commit
a11edea62ed46ae86fbba5ff6f377ef0bc21bd18
Author: vhorbato <vhorbato@cisco.com>
Date: Wed Dec 6 15:12:12 2023 +0200
profiler: change time tracking for "rule_time (%)" field in rule_profiler output
TimeProfilerStats::set_enabled(sc->profiler->time.show);
RuleContext::set_enabled(sc->profiler->rule.show);
+ if ( sc->profiler->rule.show )
+ RuleContext::set_start_time(get_time_curr());
+
if ( Snort::is_reloading() && strcmp(fqn, "profiler") == 0 )
sc->register_reload_handler(new ProfilerReloadTuner(sc->profiler->rule.show,
sc->profiler->time.show));
for ( unsigned i = 0; i < ThreadConfig::get_instance_max(); ++i )
prepare_rule_profiler_stats(nodes, stats, i);
+ RuleContext::set_end_time(get_time_curr());
print_rule_profiler_stats(config, stats, nullptr);
}