diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-01-01 16:13:16 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-01-01 16:13:16 -0400 |
commit | 3732d4a2673cbe5e7b4c39b7fa2c211da0689d84 (patch) | |
tree | 54fd747ae61cb691fcbf2a5892808df4cb3a4a4c /Command | |
parent | 782956d7fbfd420d08c212538df887f5b22eb4a6 (diff) |
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.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Info.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Command/Info.hs b/Command/Info.hs index d22c23c04..763279612 100644 --- a/Command/Info.hs +++ b/Command/Info.hs @@ -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 |