Revision 592601b3
b/htools/Ganeti/HTools/Program/Hcheck.hs | ||
---|---|---|
132 | 132 |
printBool True False = "0" |
133 | 133 |
printBool False b = show b |
134 | 134 |
|
135 |
-- | Print mapping from group idx to group uuid (only in machine readable mode). |
|
136 |
printGroupsMappings :: Group.List -> IO () |
|
137 |
printGroupsMappings gl = do |
|
138 |
let extract_vals = \g -> (printf "GROUP_UUID_%d" $ Group.idx g :: String, |
|
139 |
printf "%s" $ Group.uuid g :: String) |
|
140 |
printpairs = map extract_vals (Container.elems gl) |
|
141 |
printKeysHTC printpairs |
|
142 |
|
|
135 | 143 |
-- | Print all the statistics on a group level. |
136 | 144 |
printGroupStats :: Int -> Bool -> Phase -> Group.Group -> [Int] -> Double -> IO () |
137 | 145 |
printGroupStats _ True phase grp stats score = do |
... | ... | |
246 | 254 |
let splitinstances = Cluster.findSplitInstances nlf ilf |
247 | 255 |
splitcluster = Cluster.splitCluster nlf ilf |
248 | 256 |
|
257 |
when machineread $ printGroupsMappings gl |
|
249 | 258 |
|
250 | 259 |
groupsstats <- mapM (perGroupChecks verbose machineread Initial gl) splitcluster |
251 | 260 |
let clusterstats = map sum (transpose groupsstats) :: [Int] |
Also available in: Unified diff