Skip to content

Scan time budget reads the CPU clock twice per pattern check #93

Closed

Description

@rennf93

Every pattern check pays for the scan time budget: scanPatternCharged calls getrusage() twice per pattern check (allocating an array each time) whenever a budget is active, and the performance monitor sanitizes each anomaly before it knows whether any callback is registered. The Python reference engine fixed the same overhead in Guard-Core/guard-core#172. I am charging the budget per pass at 2 ms slice boundaries and skipping the sanitized copy when there are no callbacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions