Closed ahtrotta closed 1 year ago
@ahtrotta What should have been displayed? Loop 3 times because there is 3 calls to verbose
?
Is this happening wherever there is an async jump?
In both of the examples above, there was not a loop in the source code but the appmap reported that there was a loop. Is there any way to differentiate between sequential calls to a function and a loop? How do our other agents handle this situation?
There’s really no way. Anyway how is sequential calls to the same function actually different than a loop? :-)
On Fri, Apr 28, 2023 at 11:07 AM Adam Trotta @.***> wrote:
In both of the examples above, there was not a loop in the source code but the appmap reported that there was a loop. Is there any way to differentiate between sequential calls to a function and a loop? How do our other agents handle this situation?
— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-agent-js/issues/212#issuecomment-1527710647, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC62JL33CU3NBCS2LOJ3XDPMMPANCNFSM6AAAAAAWR2PDZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Yeah, that makes sense that there's no way. It's just semantically different in the source file.
Yeah the agent records function applications without context. It has no idea whether it is called inside a loop or not.
Okay, we can close this issue then.
Currently, the JS agent does not accurately report loops sometimes.
Example from this test:
Another example from this test.