Revision e60fa4af htools/Ganeti/HTools/Program/Hspace.hs

b/htools/Ganeti/HTools/Program/Hspace.hs
183 183

  
184 184
  printKeysHTS $ printStats PFinal fin_stats
185 185
  printKeysHTS [ ("ALLOC_USAGE", printf "%.8f"
186
                                ((fromIntegral num_instances::Double) /
187
                                 fromIntegral fin_instances))
188
            , ("ALLOC_INSTANCES", printf "%d" allocs)
189
            , ("ALLOC_FAIL_REASON", map toUpper . show . fst $ head sreason)
190
            ]
186
                                   ((fromIntegral num_instances::Double) /
187
                                   fromIntegral fin_instances))
188
               , ("ALLOC_INSTANCES", printf "%d" allocs)
189
               , ("ALLOC_FAIL_REASON", map toUpper . show . fst $ head sreason)
190
               ]
191 191
  printKeysHTS $ map (\(x, y) -> (printf "ALLOC_%s_CNT" (show x),
192
                               printf "%d" y)) sreason
192
                                  printf "%d" y)) sreason
193 193

  
194 194
printResults False ini_nl fin_nl _ allocs sreason = do
195 195
  putStrLn "Normal (fixed-size) allocation results:"
......
290 290
  printKeysHTS $ map (\(a, fn) -> (prefix ++ "_" ++ a, fn ispec)) specData
291 291
  printKeysHTS [ (prefix ++ "_RQN", printf "%d" req_nodes) ]
292 292
  printKeysHTS [ (prefix ++ "_DISK_TEMPLATE",
293
               diskTemplateToRaw disk_template) ]
293
                  diskTemplateToRaw disk_template) ]
294 294
      where req_nodes = Instance.requiredNodes disk_template
295 295
            prefix = specPrefix spec
296 296

  

Also available in: Unified diff