diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-30 13:55:31 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-30 13:55:31 -0400 |
commit | 73986f7efc9b45d817b61763b08cf928eb4d1e89 (patch) | |
tree | 55e643586b29e3d69d331bc459c05836534a961f /ExpensiveHash.hs | |
parent | 3ccd6fe4c21d333d4798da519fe3c7bf83a5c99f (diff) | |
download | keysafe-73986f7efc9b45d817b61763b08cf928eb4d1e89.tar.gz |
oops
Diffstat (limited to 'ExpensiveHash.hs')
-rw-r--r-- | ExpensiveHash.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ExpensiveHash.hs b/ExpensiveHash.hs index 6d1e6c8..93fb115 100644 --- a/ExpensiveHash.hs +++ b/ExpensiveHash.hs @@ -79,7 +79,8 @@ getNumCores = getmax . mapMaybe parse . lines <$> readFile "/proc/cpuinfo" getmax [] = error "Unknown number of physical cores." getmax l = maximum l + 1 -- add 1 because /proc/cpuinfo counts from 0 parse l - | "core id" `isPrefixOf` l = readMaybe $ dropWhile (/= ':') l + | "core id" `isPrefixOf` l = + readMaybe $ drop 1 $ dropWhile (/= ':') l | otherwise = Nothing benchmarkTunables :: Tunables -> IO () |