-
-
Notifications
You must be signed in to change notification settings - Fork 434
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
feat: Diagnostics panel #793
Conversation
This is needed in preparation for user-defined cards in layouts, as the default state cannot reflect those and the old method would would simply replace them with the default state. Tested to work with added components and removed components. Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
todo: modify config modals Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
I have this working to a point where data is automatically collected and charts will dynamically be rendered. |
Adding the ability to script metrics would be very handy (think Math.PI * (printer.printer.extruder.filament_diameter / 2) ** 2 * printer.printer.motion_report.live_extruder_velocity to calculate volumetric flow), but this would require some sort of sandbox or custom parsing.. The alternative would be creating a fixed list of loggable metrics, but this kinda locks this feature down a lot. |
That would be really neat!! I guess the "hammer" approach would be to use |
Correct. I guess the best approach here would be injecting a sandboxed iframe which would then evaluate the code in an isolated context. Should be fairly easy to implement tbh, I'll work on that later. |
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
This saves a lot of performance, and I don't think anything outside of the printer state is required for logging. Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Signed-off-by: Mathis Mensing <[email protected]>
Really, REALLY love this new feature!! I think this will make a lot of users very happy!! I'm not sure of these buttons: Either change to round ones, or instead of icons just add text to them (either way matching what we do on the other dialogs) "Add Card" is correct, but I think "Add Chart" would make more sense (these are all charts, correct?) |
Signed-off-by: Mathis Mensing <[email protected]>
The impact isn't negligible (about a 5.7% decrease in idle time from what I've measured). |
Signed-off-by: Mathis Mensing <[email protected]>
I did notice that during printing, the 250ms update rate makes the configuration dialog pretty much unusable (with the charts being re-rendered every time). Edit: Also looks like the entire UI becomes unresponsive after a couple minutes, will definitely need to check that out... |
Works for me! 🙂 |
Signed-off-by: Mathis Mensing <[email protected]>
reduces the call time of onDiagnosticsMetricsUpdate by ~43% Signed-off-by: Mathis Mensing <[email protected]>
reduces the call time of onDiagnosticsMetricsUpdate by another ~59% Signed-off-by: Mathis Mensing <[email protected]>
Well, looks like it indeed is "polluting" the state, I didn't think storing the metrics in the state would make this much difference.. Basically, with a retention of 10 minutes, there's up to 3000 data points in the state during printing (compared to 600 max per other chart). Not sure how to solve this.. |
I've stumbled across this thread on the Vue forum which describes a similar problem, and it looks like the performance issues aren't there in the production build (we disable strict mode in production builds). |
I will try to take a look into this too (later today if I manage, or tomorrow), but I'm starting to wonder if this shouldn't actually be done on Moonraker (offload to the server) |
Signed-off-by: Mathis Mensing <[email protected]>
Adds a new opt-in diagnostics panel with customizable metrics logging.
Closes #454