pyutils / line_profiler

Line-by-line profiling for Python
Other
2.57k stars 118 forks source link

Fix hit counts on branches being messed up #214

Closed Theelx closed 1 year ago

Theelx commented 1 year ago

Fix #210. The correct numbers were being collected, but there was an issue when displaying them.

Erotemic commented 1 year ago

LGTM

Theelx commented 1 year ago

It's probably ready to merge, but please hold off for at least a day or two for comments from @zig1000 (in case I'm missing something). I'm also adding a test to ensure this doesn't happen again, hopefully I can get that pushed in a few minutes.

codecov[bot] commented 1 year ago

Codecov Report

Merging #214 (7cc4b6b) into main (d3de63c) will not change coverage. The diff coverage is n/a.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pyutils/line_profiler/pull/214/graphs/tree.svg?width=650&height=150&src=pr&token=xIK8nFU3K5&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)](https://app.codecov.io/gh/pyutils/line_profiler/pull/214?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) ```diff @@ Coverage Diff @@ ## main #214 +/- ## ======================================= Coverage 51.61% 51.61% ======================================= Files 4 4 Lines 279 279 Branches 40 40 ======================================= Hits 144 144 Misses 121 121 Partials 14 14 ``` ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/pyutils/line_profiler/pull/214?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/pyutils/line_profiler/pull/214?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Last update [d3de63c...7cc4b6b](https://app.codecov.io/gh/pyutils/line_profiler/pull/214?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).
Erotemic commented 1 year ago

Sounds good. Let me know when you want me to merge.

Theelx commented 1 year ago

Review comments have now been addressed by incorporating @zig1000's code sample (with some minor adjustments for syntax). The only thing left to do is for zig to confirm whether the line hit numbers I posted in a previous comment are correct, and if so then we can merge it @Erotemic!

Theelx commented 1 year ago

@Erotemic I believe this is ready to merge.