Rework of the Graphstats webpage

I have reworked the web implementation of Klipper’s graphstats.py script.
Notable changes are:

  • It now displays printer starts and shutdowns
  • Displays all found MCUs automatically
  • Displays all found heaters / temperatures automatically
  • Add some advanced MCU stats
  • It aligns the Klipper internal timestamps with human-readable time
  • Allows to drill down to a session. A session is always detected between a printer start and a shutdown
  • Fixes an issue, where under certain conditions (e.g. reboot of the host) a negative time jump could occur in the graphed data

Currently, I have not replaced the old implementation, as I would appreciate some feedback and testing before doing so.

The new version can be tested here: Graph Klipper Stats

Any testing, feedback or improvements are more than welcome. If anybody with more web-dev skills feels like improving the looks of it, I’d very much appreciate as well.

3 Likes

Thanks, very nice improvements.

I tried to process the klippy.log from Klipper restarts mid print and canceling print
Flawless.

Then I was looking for a bigger klippy.log. MCU ‘sb2040’ shutdown: Timer too close
Didn’t process. I renamed the file to klippy.log, still no procession.

I did it with “Microsoft Edge Version 125.0.2535.79 (Official build) (64-bit)” under
Edition Windows 10 Pro
Version 22H2
Installed on ‎16.‎07.‎2021
OS build 19045.4412
Experience Windows Feature Experience Pack 1000.19056.1000.0

I’ll try other scenarios.

Edit: Tried the failed log with your old “https://sineos.github.io/”.
Flawless.


Edit: Tried the failed log with

Flawless.

Thanks for destroying all my illusions that it would work right from the start!

Just kidding, your tests are very much appreciated. Indeed, it seems that Edge is more sensitive and I have to admit I only tested in FF and Chrome.

I’ll see what I can do to make it more robust.
In any case, throwing a 60MB log at will take some time to be processed and graphed, especially since the graphs are dynamic.

Yes, it takes a while.

Should work now on Edge as well. No need to rename the logs. It doesn’t care about the extension.

Yes, sir. Thanks a bunch. Nice tool to investigate a “klippy.log” :sunglasses:

I threw a 240MB log at it (I just copied a large log over and over and appended at the bottom). It broke everything. Locked up my tab. Didn’t display anything. 0/10.

I blame Sineos for Chrome trying to use 5GB of ram to read a 240MB file.

Most likely true. Luckily, I can probably live with the fact that a 240MB won’t parse.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.