From 73986f7efc9b45d817b61763b08cf928eb4d1e89 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Aug 2016 13:55:31 -0400 Subject: oops --- ExpensiveHash.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ExpensiveHash.hs') 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 () -- cgit v1.2.3