-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Add BRANCH_TAKEN and BRANCH_NOT_TAKEN events to sys.monitoring #122548
Comments
|
The interactions between So, here's the updated proposal:
This is still fully backwards compatible, and will allow us to implement |
|
If I try to just use the old |
|
Fixed. |
Ah, sorry about that! Ironically, that's what I intended by reporting it here -- but it was the code in #122564 that I saw that on. |
|
Since monitoring shouldn't impact performance when not used, we don't want to restrict the bytecode compiler in its optimizations, or how it lays out code. With that in mind, I think we need to drop the "taken"/"not taken" labels and use something like "left" and "right". In the code: if cond:
x
yIt could be surprising if the branch from I therefore proposed renaming |
Ok! I've modified my code, so as far as I'm concerned, you can remove the taken/not_taken names. |
|
Continuing from #122564 (comment) and #122564 (comment)
Maybe first we should decide: from the user's point of view, does line 1 have two possible destinations (line 2 and line 3) or does it not? Should line 1 be considered a branch for the purposes of branch coverage? If we can't map the collected data back to a user-understandable interpretation, then we haven't finished the feature. Can you help me puzzle through this? I'd like to get efficient branch coverage measurement. So far, we seem to be talking about different things (byte codes vs lines) and we aren't meeting in the middle. |
Correct magic number comment
|


Feature or enhancement
Proposal:
Proposal:
BRANCH_TAKENandBRANCH_NOT_TAKENevents tosys.monitoringBRANCHevent (as it will be redundant)BRANCHevents implicitly monitors both theBRANCH_TAKENandBRANCH_NOT_TAKENeventsBRANCH_TAKENevent will implicitly disable the matchingBRANCHevent, but only for the taken branchBRANCH_NOT_TAKENevent will implicitly disable the matchingBRANCHevent, but only for the not-taken branchBRANCHevent will implicitly disable the both the matchingBRANCH_TAKENandBRANCH_NOT_TAKENeventsThis is fully backwards compatible.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
Discussion which also links to prior discussions.
Linked PRs
Tasks
matchcases showing incorrectly #123044None#123048forloop not showing correctly #123050FOR_ITERis poor asDISABLEdoesn't remove the instrumentation. #128375The text was updated successfully, but these errors were encountered: