• Iustin Pop's avatar
    hcheck: rework output mode · 4b77c2a2
    Iustin Pop authored
    
    
    Looking at the output of hcheck, in human readable mode, it looks like
    it always starts with a blank line. This is not nice, so I wanted to
    redo this to start cleanly.
    
    However, looking at the code, I realised that we need some internal
    cleanup; 'perGroupChecks' was doing both pure computation (computing
    the score/stats) and I/O work (printing the stats), which is ugly, so
    I split that in two; this allows perGroupChecks to be simpler, and we
    can therefore first compute the group stats, and start the output with
    the mode in which we run.
    
    So right now, hcheck will first output whether we need to run a
    rebalance, or if no-simulation is selected, etc., and only then
    display the actual stats, making the output a bit more consistent.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
    4b77c2a2
Hcheck.hs 11.6 KB