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

Query Profiler #236

Closed
tsandall opened this issue Jan 30, 2017 · 1 comment
Closed

Query Profiler #236

tsandall opened this issue Jan 30, 2017 · 1 comment
Assignees

Comments

@tsandall
Copy link
Member

tsandall commented Jan 30, 2017

When policies need to be optimized by hand, the first step is to understand where time is spent in evaluating the policy. Without a query profiler this task can be quite difficult because it requires deep knowledge of the policy (which may be quite large, e.g., hundreds of lines split across multiple files.)

To start, we should add basic query profiling support to the eval subcommand.

For example:

opa eval --profile --data somedir 'data.example.allow == true'

The profiler should provide a per-expression breakdown of time spent, # of invocations, etc. The the command should also be able to sort and return the top-N expressions.

@tsandall
Copy link
Member Author

Initial version added in #818 and #808

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

2 participants