Replies: 2 comments
-
Hey @wengyao04, this is explained a little in https://www.openpolicyagent.org/docs/latest/policy-performance/#sort-criteria-for-the-profile-results where the docs show how the compiled Rego lines sometimes contain more expressions than the source policy. I replicated your policy with some traces and you can see that the policy is only being evaluated once through as you'd expect.
|
Beta Was this translation helpful? Give feedback.
-
The compiler rewrites line 11 into 3 expressions (Hence
REDO is the number of times a statement was re-evaluated to check for alternative values. REDOs occur when the evaluation succeeds but there could be further results: in some cases, these could yield conflicts, in others, they could yield further results. |
Beta Was this translation helpful? Give feedback.
-
Hi, I try to understand opa profile
This is my rego
My policy data is
My input is
I try to run opa eval profile
I don't quite understand why line 11 is evaluated 3 times and line 14 is evaluate twice. Could anyone also help explain what does REDO mean ?
Beta Was this translation helpful? Give feedback.
All reactions