LGTM, thanks

On Fri, 24 Jul 2015 at 13:31 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> The Xen CPU data collector gets as raw data accumulated CPU usage
> since an arbitrary start date. If the value gets too large, the
> counter rolls over. The XenCpuLoad collector is aware of this
> happening and adjusts the observed values accordingly. However,
> the condition for detecting a rollover was wrong: on an rollover,
> the value strictly goes down. The value can stay the same over
> an interval, e.g., for very idle guests; not that the accuracy
> of the reported accumulated value can be as coarse as a whole
> CPU second.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  src/Ganeti/DataCollectors/XenCpuLoad.hs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/Ganeti/DataCollectors/XenCpuLoad.hs
> b/src/Ganeti/DataCollectors/XenCpuLoad.hs
> index 2a66513..10c39cd 100644
> --- a/src/Ganeti/DataCollectors/XenCpuLoad.hs
> +++ b/src/Ganeti/DataCollectors/XenCpuLoad.hs
> @@ -115,7 +115,7 @@ combineWithRollover new old | Seq.null new || Seq.null
> old = new Seq.>< old
>  combineWithRollover new old =
>    let (t2, x2) = Seq.index new $ Seq.length new - 1
>        (t1, x1) = Seq.index old 0
> -  in if x2 > x1
> +  in if x2 >= x1
>         then new Seq.>< old
>         else let delta_t = diffClockTimes t2 t1
>                  deltax = x2 - x1
> --
> 2.5.0.rc2.392.g76e840b
>
> --

Helga Velroyen
Software Engineer
[email protected]

Google Germany GmbH
Dienerstraße 12
80331 München

Geschäftsführer: Graham Law, Christine Elizabeth Flores
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

This e-mail is confidential. If you are not the right addressee please do
not forward it, please inform the sender, and please erase this e-mail
including any attachments. Thanks.

Reply via email to