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

Improve rules profiling. The most relevant changes in this commit are: #829

Merged
merged 8 commits into from
Feb 16, 2018

Conversation

plusvic
Copy link
Member

@plusvic plusvic commented Feb 15, 2018

  • Stop using time() and difftime() for measuring time. Use yr_stopwatch_elapsed_ns instead.

  • clock_ticks field in YR_RULE and YR_STRING structures has been renamed to time_cost.

  • When the time_cost for some YR_STRING structure is incremented, it's incremented for its associated YR_RULE structure too. Iterating over the YR_STRING structures is not necessary for computing the total cost for some YR_STRING.

  • A time_cost field was added to the YR_RULES structure. The ratio between YR_RULES structure's time_cost and YR_RULE structure's time_cost offers a better measure of how costly a rule is.

* Stop using time() and difftime() for measuring time. Use yr_stopwatch_elapsed_ns instead.

* clock_ticks field in YR_RULE and YR_STRING structures has been renamed to time_cost.

*  When the time_cost for some YR_STRING structure is incremented, it's incremented for its associated YR_RULE structure too. Iterating over the YR_STRING structures is not necessary for computing the total cost for some YR_STRING.

* A time_cost field was added to the YR_RULES structure. The ratio between YR_RULES structure's time_cost and YR_RULE structure's time_cost offers a better measure of how costly a rule is.
…st in Linux the actual resolution was microsecond) and implement it for Windows.
@plusvic plusvic merged commit 6c39006 into master Feb 16, 2018
@plusvic plusvic deleted the improve_profiling branch February 16, 2018 16:00
tarterp pushed a commit to mandiant/yara that referenced this pull request Mar 31, 2022
* Improve rules profiling. The most relevant changes are:

* Stop using time() and difftime() for measuring time. Use yr_stopwatch_elapsed_ns instead.

* clock_ticks field in YR_RULE and YR_STRING structures has been renamed to time_cost.

*  When the time_cost for some YR_STRING structure is incremented, it's incremented for its associated YR_RULE structure too. Iterating over the YR_STRING structures is not necessary for computing the total cost for some YR_STRING.

* A time_cost field was added to the YR_RULES structure. The ratio between YR_RULES structure's time_cost and YR_RULE structure's time_cost offers a better measure of how costly a rule is.
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

Successfully merging this pull request may close these issues.

1 participant