info: Fix "backend usage" numbers, which were counting present keys twice.
Let's just count the referenced keys for that, and not present keys at all.
This commit is contained in:
parent
67532c7b49
commit
09a2fcb643
2 changed files with 3 additions and 4 deletions
|
@ -403,11 +403,8 @@ disk_size = simpleStat "available local disk space" $
|
|||
|
||||
backend_usage :: Stat
|
||||
backend_usage = stat "backend usage" $ json fmt $
|
||||
calc
|
||||
<$> (backendsKeys <$> cachedReferencedData)
|
||||
<*> (backendsKeys <$> cachedPresentData)
|
||||
sort . M.toList . backendsKeys <$> cachedReferencedData
|
||||
where
|
||||
calc x y = sort $ M.toList $ M.unionWith (+) x y
|
||||
fmt = multiLine . map (\(n, b) -> b ++ ": " ++ show n) . map swap
|
||||
|
||||
numcopies_stats :: Stat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue