Commit Graph

25 Commits

Author SHA1 Message Date
Kevin O'Connor 3efb424d66 graphstats: Add support for graphing system load
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 21:35:09 -04:00
Kevin O'Connor 064804b688 graphstats: Fix matplotlib import error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-10 10:18:31 -05:00
Kevin O'Connor 8cce3cc8e7 graphstats: Add support for interactive graphs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-19 21:12:26 -04:00
Kevin O'Connor cb2ecc68d2 graphstats: Add option to graph temperatures from log
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-13 22:00:08 -05:00
Kevin O'Connor 7699304f9b graphstats: Change stats filter to use print_time instead of bytes_write=0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-26 17:37:04 -05:00
Kevin O'Connor bf301a977e graphstats: Make check for stats prefixes more robust
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-05-23 18:19:50 -04:00
Kevin O'Connor e99c0f53f8 graphstats: Support selecting an mcu to graph from the command-line
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-19 23:12:14 -05:00
Kevin O'Connor 97f7735c6a graphstats: Set size on frequency graph
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-18 20:42:28 -05:00
Kevin O'Connor d1c209c689 graphstats: Fix multi-mcu parsing with reordered stats
The mcu stats (that contain a prefix) may occur before some other
stats - make sure to only apply the stats prefix to those stats that
need it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-02-03 18:43:52 -05:00
Kevin O'Connor 47bb8b7cc2 graphstats: Fix for print_stall detection
The print_stall logic could cause large portions of the graph to show
up as 100% host utilized.  Rework the logic to avoid that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-28 10:50:52 -05:00
Kevin O'Connor 6770aa96c9 graphstats: Use alpha transparency when plotting the stats
Use an alpha transparency on each of the stats, so that it is possible
to see how the values overlap.

Also, always enable the "awake time" stat - just use a lower alpha
transparency for it.

Also, explicitly set the graph size as some version of matplotlib have
a different default.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-14 10:46:48 -05:00
Kevin O'Connor 896c31fd05 graphstats: Fix filtering of normal buffer_time runoff stats
Update the mechanism to filter out cases where buffer_time is below
MAXBUFFER so that it works with the statistics currently generated.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-01-14 10:16:16 -05:00
Kevin O'Connor cf4c31cb88 graphstats: Add support for generating a graph of mcu frequency
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-30 18:29:58 -05:00
Kevin O'Connor f10bd5726d graphstats: Use a smaller font in the graph legend
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-30 18:27:44 -05:00
Kevin O'Connor 7db6fa7bfc graphstats: Fix case where an Xwindows display may not be available
Matplotlib will try to open a display by default - tell it not to do
that so that it can run in batch mode on headless machines.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-30 18:26:49 -05:00
Kevin O'Connor 8463a83324 graphstats: Fix graphing script
Update the graphstats.py graphing script so that it works with recent
stats changes - the stats can now contain groups that end with a ':'
and the print_time is no longer reset to zero on a new print.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-10-29 20:36:33 -04:00
Kevin O'Connor 5583b050a0 graphstats: Increase maximum expected task duration
Now that tasks are only run when needed it's common for there to be a
larger variation in task execution time.  When graphing load, consider
a 99-percentile task duration of 2.5ms to be 100% loaded (up from
1ms).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-08-09 19:12:27 -04:00
Kevin O'Connor 19090bdd5b graphstats: Fix so that older files (predating mcu_awake) still work
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-07-21 14:19:59 -04:00
Kevin O'Connor c4b8d3ea8b graphstats: Support graphing "mcu_awake" statistic
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-07-19 14:14:01 -04:00
Kevin O'Connor d2fafbdd9e build: Request python2 for all directly executed python binaries
Some systems point python to python3 instead of python2 - explicitly
request python2 to avoid conflicts.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-27 20:26:02 -04:00
Kevin O'Connor fa193e9618 graphstats: The times are no longer in UTC time
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-11 13:40:25 -04:00
Kevin O'Connor ab1eb70d1c toolhead: Rework lookahead flush to be more stable during high cpu
Change the lookahead queue so that it attempts to buffer at least
buffer_time_high amount of moves when first starting a print.  This
helps ensure the buffer is normally always full.

If the buffer falls below buffer_time_low then it is either due to the
end of a print or because octoprint/klippy is unable to keep up.
Change the code so that in this case the lookahead queue will attempt
to gather buffer_time_high amount of moves before restarting movement.

Update the default buffer_time_low to 1 second and buffer_time_high to
2 seconds.  With the above changes a smaller buffer_time_high and a
larger buffer_time_low are more practical.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-02-12 17:20:40 -05:00
Kevin O'Connor 4194ebf9df graphstats: Display host buffer stats in graph
Prune host buffer stats near the start and end of the print.  Graph
the remaining buffer stats.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-02-02 10:46:48 -05:00
Kevin O'Connor 12d4888321 graphstats: Updates for recent stats changes
Update the graphstats helper script to account for recent changes in
the statistics output.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-12-06 11:10:52 -05:00
Kevin O'Connor f58d93c0bf graphstats: Add new helper script that generates graphs of MCU load
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-10-31 11:15:38 -04:00