Revision 084565ac htools/Ganeti/HTools/Cluster.hs

b/htools/Ganeti/HTools/Cluster.hs
305 305
                 , (1,  "disk_load_cv")
306 306
                 , (1,  "net_load_cv")
307 307
                 , (2,  "pri_tags_score")
308
                 , (1,  "spindles_cv")
308 309
                 ]
309 310

  
310 311
-- | Holds the weights used by 'compCVNodes' for each metric.
......
349 350
      -- metric: conflicting instance count
350 351
      pri_tags_inst = sum $ map Node.conflictingPrimaries nodes
351 352
      pri_tags_score = fromIntegral pri_tags_inst::Double
353
      -- metric: spindles %
354
      spindles_cv = map (\n -> Node.instSpindles n / Node.hiSpindles n) nodes
352 355
  in [ mem_cv, dsk_cv, n1_score, res_cv, off_score, off_pri_score, cpu_cv
353 356
     , stdDev c_load, stdDev m_load , stdDev d_load, stdDev n_load
354
     , pri_tags_score ]
357
     , pri_tags_score, stdDev spindles_cv ]
355 358

  
356 359
-- | Compute the /total/ variance.
357 360
compCVNodes :: [Node.Node] -> Double

Also available in: Unified diff