Much better! LGTM

On Tue, 13 Oct 2015 at 15:15 Klaus Aehlig <[email protected]> wrote:

> > consider using more expressive variables names. It takes quite some time
> to
> > guess what 'bidx', 'nl', 'ini_cv', 'ini_tbl' are supposed to mean.
>
> I suggest adding the following interdiff
>
> commit 55dad8ca4834331272f20258976308221d82bc7f
> Author: Klaus Aehlig <[email protected]>
> Date:   Tue Oct 13 14:47:32 2015 +0200
>
>     Interdiff [PATCH master 2/4] Add a function estimating the redundancy
> of a group
>
> diff --git a/src/Ganeti/HTools/RedundancyLevel.hs
> b/src/Ganeti/HTools/RedundancyLevel.hs
> index efd6a26..ca77a10 100644
> --- a/src/Ganeti/HTools/RedundancyLevel.hs
> +++ b/src/Ganeti/HTools/RedundancyLevel.hs
> @@ -65,12 +65,12 @@ redundancy opts nl il =
>          $ IntMap.toAscList nl
>     in case sortedNodes of
>       [] -> 0
> -     (bidx, bNode):_ ->
> -       let bNode' = bNode { Node.offline = True }
> -           nl' = Container.add bidx bNode' nl
> -           ini_cv = Metrics.compCV nl'
> -           ini_tbl = Cluster.Table nl' il ini_cv []
> +     (indexBigNode, bigNode):_ ->
> +       let bigNode' = bigNode { Node.offline = True }
> +           nl' = Container.add indexBigNode bigNode' nl
> +           initialMetrics = Metrics.compCV nl'
> +           initialTable = Cluster.Table nl' il initialMetrics []
>             Cluster.Table nl'' il' _ _ =
> -             runListHead ini_tbl id . reverse
> -             $ iterateJust (Cluster.tryBalance opts) ini_tbl
> +             runListHead initialTable id . reverse
> +             $ iterateJust (Cluster.tryBalance opts) initialTable
>         in 1 + redundancy opts nl'' il'
>
>
> --
> Klaus Aehlig
> Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle
>
-- 

Helga Velroyen
Software Engineer
[email protected]

Google Germany GmbH
Dienerstraße 12
80331 München

Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
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