Created attachment 7277 Screenshot of xfce4-hardware-monitor-plugin 1.5.0 with the curve view of CPU and memory monitors updating at different. When multiple monitors that update at different rates are displayed using the curve or column views, their graphs don't have a consistent X axis. Steps to reproduce: 1. Add an xfce4-hardware-monitor-plugin widget. 2. In the Properties menu, add a memory device. 3. Switch the viewer to curve. If it's already curve, switch it to something else (say, text), and back. I tested on 64-bit Linux.
Created attachment 7278 configfile from description
Created attachment 7279 [PATCH 1/2] Initialize max_count in value_history
Created attachment 7280 [PATCH 2/2] Animate all graphed measurements at the same rate
Created attachment 7281 Screenshot after applying patches
Thanks, yes displaying different monitor types on one graph (rather than multiple monitors from the same resource type) is out of scope for the work I've done on this plugin, so nothing has been done to accommodate this before. I plan to look at this properly within a week.
At long last, I've had a proper look at this - in patch 1, why would you initialise max_value like this? 0 is much more legible to me. The changes are great for monitors with a 'tick rate' of 1 second, but in the worst case the disk usage monitor measures every 60 seconds, so the graph is now only going to display 1/60th of the data it would prior to the update. I don't use these very slow monitors myself, but I bet someone does. I'm going to open a discussion on xfce4-dev@xfce.org to see if I can get at any users that use the monitor like that, to see if there any objections. Its unlikely enough people are paying attention to the list though, so after a timeout of a week I'll likely include this change. Thanks for taking the time to implement this :)
I've finally got enough of a clue of how the graph updating works, have posted to the mailing list: https://mail.xfce.org/pipermail/xfce4-dev/2017-October/032042.html
I have implemented user-configurable monitor update rates, which sorts this issue without changing the default visualisation behaviour. I'm going to sit on it for a week to see if anything blows up before I make an official release.
New version finally released closing.