-
Notifications
You must be signed in to change notification settings - Fork 6
profile_diffs.py: script to compare Go coverage profiles, outputs new… #32
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
base: main
Are you sure you want to change the base?
Conversation
… blocks This python script accepts two paths to Go coverage profiles and outputs the new code blocks that were hit in the second profile and not the first. If the script is used on both permutations of coverage profiles, it's possible to see whether coverage increased or decreased fairly easily. The script should be adapted in the future to: - use branch coverage (see something like: https://github.com/junhwi/gobco/) - automatically parse this output data and tell how many new branches were hit and how many old branches were not hit. - compare the number of hit counters instead of "hit" vs. "not hit". Help from ChatGPT 4o
|
Example output on #26 when comparing it to |
|
I think this needs some work to actually be useful for an end-user. |
|
Two questions before I go ahead and do a more thorough review.
|
|
For 1, yes it should be run both ways and ideally the output would be more helpful. Maybe it could summarize per file the branch difference. The tooling in llvm is way better than go tooling, I'm not sure if there's any sort of port or if we can fuzz with libfuzzer and lcov to get pretty coverage maps. |
|
@gijswijs: review reminder |
… blocks
This python script accepts two paths to Go coverage profiles and outputs the new code blocks that were hit in the second profile and not the first. If the script is used on both permutations of coverage profiles (e.g.
<profile1> <profile2>in one run and<profile2> <profile1>in the other run), it's possible to see whether coverage increased or decreased fairly easily. The script should be adapted in the future to:Help from ChatGPT 4o
Usage:
python python_diffs.py <path_to_coverage_profile1> <path_to_coverage_profile2> <path_to_output_file>