dos-group/dstat-tools

dstat-plot: Option Invert Graph -i, --invert VALUE

joh-mue opened this issue · 2 comments

default f_(x) = 100 - f(x)
otherwise f_(x) = VALUE - f(x)

100 as a fix value makes only sense for cpu usage...

A generic solution with global maximum - f(x) makes no sense. For example if the maxima for the cpu usage is 80% ... 80-80=0% ... But the real cpu usage is 20% and not 0 %

I think a good solution is to set a fix parameter with -i VALUE ... In this case '-i 100'

I think the inverse values from the csv should be plotted but I implemented the -i, -invert [VALUE] option anyway

-i, --invert inverts with f'(x) = 100 - f(x)
-i, --invert VALUE inverts with f'(x) = VALUE - f(x) and automatically sets the y-range to VALUE (otherwise the plots are nonsense)

there is an "inverted" indicator in the plot-title and the filename

fixed with PR #31