Commit ced859f3 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add a header to node lists and print more data

This prints the total memory/disk and also adds a header.
parent c622fa7c
......@@ -569,7 +569,11 @@ printNodes ktn nl =
snl' = map (\ n -> ((fromJust $ lookup (Node.idx n) ktn), n)) snl
m_name = maximum . (map length) . fst . unzip $ snl'
helper = Node.list m_name
in unlines $ map (uncurry helper) snl'
header = printf "%2s %-*s %5s %5s %5s %5s %5s %3s %3s %7s %7s"
"N1" m_name "Name" "t_mem" "f_mem" "r_mem"
"t_dsk" "f_dsk"
"pri" "sec" "p_fmem" "p_fdsk"
in unlines $ (header:map (uncurry helper) snl')
-- | Compute the mem and disk covariance.
compDetailedCV :: NodeList -> (Double, Double, Double, Double)
......@@ -212,8 +212,9 @@ list mname n t =
dp = p_dsk t
fn = failN1 t
printf " %c %-*s %5d %5d %5d %3d %3d %.5f %.5f"
printf " %c %-*s %5.0f %5d %5d %5.0f %5d %3d %3d %.5f %.5f"
(if fn then '*' else ' ')
mname n (f_mem t) (r_mem t) ((f_dsk t) `div` 1024)
mname n (t_mem t) (f_mem t) (r_mem t)
((t_dsk t) / 1024) ((f_dsk t) `div` 1024)
(length pl) (length sl)
mp dp
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment