Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement rule profiling support #502

Open
dspruell opened this issue Aug 12, 2016 · 3 comments
Open

Implement rule profiling support #502

dspruell opened this issue Aug 12, 2016 · 3 comments

Comments

@dspruell
Copy link

Wanted to suggest adding ability to profile rule performance in the YARA engine in a manner similar to how done in NIDS projects like Suricata and Snort. It would be valuable to be able to run a ruleset with profiling enabled and understand which rules perform well or take undue resources, which regexes take longest, etc.

@plusvic
Copy link
Member

plusvic commented Oct 24, 2017

This is already implemented. It's disabled by default and should be enabled with ./configure --enable-profiling. That will add a member clock_ticks to both YR_RULE and YR_STRING structures that can be used as an indicator of which rules are the slowest. Search for yr_rules_print_profiling_info in rules.c for more details. Please notice that this is not a supported API yet. So, it can change in the future.

I'm not closing this issue as we probably need to support it officially.

@sbruno
Copy link
Contributor

sbruno commented Aug 27, 2020

Is the profiling support still unofficial?

I just created an issue for yara-python (VirusTotal/yara-python#155) because it relies on the mentioned implementation of having clock_ticks as a member of both YR_RULE and YR_STRING which has changed.

Would supporting the new code require too many changes? I might be able to help if it isn't a big change.

@LloydLabs
Copy link

LloydLabs commented May 10, 2022

Bump for this. Would be great to have it in the newest version of YARA, can the old profiling code be easily ported to newer versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants