GNOME Bugzilla – Bug 568985
Make the load graphs smoother
Last modified: 2018-05-22 12:06:57 UTC
Please describe the problem: Currently the load graphs are rendered smoothly with the naive assumption that the slope of the curve at each point is zero. I propose to compute an approximation of the real slope using two surrounding points, making the curve smoother and the interpolation more precise. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 127162 [details] [review] Patch implementing the above proposition It surely adds some computation, but I think the enhancement is worth it.
Created attachment 127163 [details] Load graphs - before and after Screenshots showing what is changed. The improvement is pretty obvious against the sinusoïd. Some of the artificial "steps" present in the current rendering are also soften.
Don't you think this should go in cairo instead ? There's nothing specific about gsm in your nice patch.
I'm not circumventing cairo here, I'm just using the cairo curve drawing code differently (basically two values passed to cairo_curve_to() are computed differently). So no I don't think it should go into cairo. It's your call if it doesn't go into gsm.
[Adding missing "QA Contact" entry so system monitor bug report changes can still be watched via the "Users to watch" list on https://bugzilla.gnome.org/userprefs.cgi?tab=email when the assignee is changed to an individual.]
Review of attachment 127162 [details] [review]: I would like this improvement (3 years later), but after applying the patch and fixing the problems (g-> renamed to graph->) the graphs don't look smoother for me, but have some rough edges. I will experiment on how to fix it, but if you can do it, I would take an updated patch.
*** Bug 618781 has been marked as a duplicate of this bug. ***
@Christophe Dehais: I have managed to get the patch working at a certain degree, however at the beginning there is a peak (probably the first value is not calculated correctly - best seen on memory usage). Could you please take a look at that and provide an updated patch?
Uber-graph will help us have smoother graphs, thus I am marking this as a duplicate of the uber-graph ticket. *** This bug has been marked as a duplicate of bug 636343 ***
I just want to point out that there's two sorts of "smooth": 1/ the temporal smoothness (as in how much fps we we get), which is what the uber-graph and other bugs are addressing and 2/ The spatial smoothness, which is what this bug is about, by trying to remove the artificial staircase in the graph. The sysmon demo in uber-graph does not seem to avoid them. Unfortunately I lack the time to look into the patch wrt current state of GSM.
Thanks for the clarification. In this case I am reopening, but marking as blocked on the uber-graph bug, as it wouldn't make much sense implementing this in the current loadgraphs if they are going to be replaced by ubergraph (hopefully will happen soon)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-system-monitor/issues/25.