tweak
This commit is contained in:
parent
33e6425d10
commit
75a3f5027f
1 changed files with 2 additions and 2 deletions
|
@ -11,6 +11,7 @@ import Control.Monad.State
|
|||
import Data.Maybe
|
||||
import System.IO
|
||||
import Data.List
|
||||
import Data.Tuple
|
||||
import qualified Data.Map as M
|
||||
|
||||
import qualified Annex
|
||||
|
@ -129,11 +130,10 @@ backend_usage :: Stat
|
|||
backend_usage = stat "backend usage" $
|
||||
return . usage =<< cachedKeysReferenced
|
||||
where
|
||||
usage (ks, _) = pp "" $ sort $ map tflip $ splits ks
|
||||
usage (ks, _) = pp "" $ sort $ map swap $ splits ks
|
||||
splits :: [Key] -> [(String, Integer)]
|
||||
splits ks = M.toList $ M.fromListWith (+) $ map tcount ks
|
||||
tcount k = (keyBackendName k, 1)
|
||||
tflip (a, b) = (b, a)
|
||||
pp c [] = c
|
||||
pp c ((n, b):xs) = "\n\t" ++ b ++ ": " ++ show n ++ pp c xs
|
||||
|
||||
|
|
Loading…
Reference in a new issue