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

report: Fix profile count aggregation #707

Merged
merged 1 commit into from
May 8, 2024
Merged

Conversation

charlieegan3
Copy link
Member

AddProfileEntries was creating a copy from the supplied update rather than the global store of counts.

Fixes #457

profCopy.NumEval += entry.NumEval
profCopy.NumRedo += entry.NumRedo
profCopy.NumGenExpr += entry.NumGenExpr
profCopy.TotalTimeNs += entry.TotalTimeNs
profCopy.Location = entry.Location
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't seem required.

Copy link
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

AddProfileEntries was creating a copy from the supplied update rather
than the global store of counts.

Signed-off-by: Charlie Egan <[email protected]>
@charlieegan3
Copy link
Member Author

cloc is now closer to 10.5k

$ find . -name '*.rego' | xargs wc |tail -n 1
   10679   30649  273889 total

The numbers I see now are closer to that ~12626 rather than jumping up and down.

@charlieegan3 charlieegan3 merged commit d826f64 into main May 8, 2024
3 checks passed
@charlieegan3 charlieegan3 deleted the fix-profiling-counting branch May 8, 2024 15:37
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
AddProfileEntries was creating a copy from the supplied update rather
than the global store of counts.

Signed-off-by: Charlie Egan <[email protected]>
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.

Lint with --profile showing suspiciously low num_eval count
2 participants