Conversation
e12e678 to
6bec2bf
Compare
3c3fcde to
0410f39
Compare
|
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html There are some steps that you can take now:
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available. Best regards, PS: I'm just an automated script, not a human being. |
Print the last N timers with their time usage That allows us to deeply debug who has blocked anything Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
0410f39 to
50e003c
Compare
While reading logs and now rare TTC, I sometimes had an itch idea to track if step generations takes more time then there is time between flushes, so if generation happens every 50ms, and takes 51ms we are lagging behind.
But adding such tracker inside "each" function seems suboptiomal.
Then there is logs like in #7168 where something paused the klippy.
Or when webhook request is large (Exclude object and
msgspec).So, I had an idea: "what if we log if timer takes > X time (idk, 50ms?)".
But even so, if this indicates something, this can be okayish.
So, it seems to me that ability to "profile" timers, and by so distinct calls can shine a light upon what happens and where.
This is an attempt to achive this.
Upon shutdown, there is a new output:
This is the whole raw idea.
Probably it makes sense to filter timer events <0.001s.
Probably there is a different way to run analyze shutdown.
Overall, even if I know the practical usage for this, I'm not sure about practical application.
Pros:
Cons:
Runtime overheadseems to be too smallThanks,
-Timofey