-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Feature Request]: Print last n frames. #11
Comments
Hi @DevX86, thanks for the feedback and for pointing out this problem; it makes a lot of sense to me. |
Awesome! Thank you @ztrue |
implemented in the way discussed in upstream issue: ztrue#11
👋 just implemented something about that in this commit @ztrue interested in a pull-request? |
Sorry for not getting back to this issue in time. @fabien-marty, thank you for the link! Overall the change looks right and you are welcome to make a PR. There are some minor adjustments I would consider:
I know unit tests in this project are a bit of a mess, but this kind of change would require to have unit tests as well. |
@ztrue thanks for your review => I'm going to make a PR with requested changes for unit tests, I totally agree with you but they don't run on my env because of hardcoded paths somewhere on your own :) maybe we should fix that... before (in another PR)
|
The path suffix |
just opened a specific issue for unit tests not passing out of the box: #12 |
implemented in the way discussed in upstream issue: ztrue#11
This is awesome guys! |
Incredible project! Such a beautiful night and day difference.
Currently, we can control the amount of lines before and after the trace line in methods such as:
Is would be incredibly helpful if we could also specify the amount of stack frames printed. For example:
Or some similar signature, getting everything every trace down to the runtime assembly is rather cool but in the majority of cases you only want the last 3-4 stack frames in any given trace for debugging. This will reduce output in terminal and show only the level of granularity we need.
Another potential attack vector which would potentially help performance:
This could potentially be mitigated if an environmental variable such as
STACK_FRAME_LIMIT
was added to control the max stack length big-endian style. Only the last n stack frames would be tracked, and as a frame is added, the earliest frame is popped off. This would reduce the stack trace depth and potentially decrease performance overhead on deep traces.The text was updated successfully, but these errors were encountered: