git.iko.soy/typeable/attoparsec
on master help sign in
Fix the benchmark running order

--HG-- extra : amend_source : b5e8560381cf1e3adba724347010cf3c6e639e4f

commit287a2fce1aeb8bd66e0c1f6b873679eb2d3ad71f authorBryan O'Sullivan <bos@serpentine.com> dateSun 11 May 2014, 22:17 (12 years ago) parent0bbf132
1 file changed+2−1
benchmarks/Aeson.hs+2−1
benchmarks/Aeson.hs+2−1
@@ -18,6 +18,7 @@ import Data.Attoparsec.ByteString.Char8 (Parser, char, endOfInput, scientific,
1818import Data.Bits ((.|.), shiftL)
1919import Data.ByteString (ByteString)
2020import Data.Char (chr)
21+import Data.List (sort)
2122import Data.Monoid (mappend, mempty)
2223import Data.Text (Text)
2324import Data.Text.Encoding (decodeUtf8')
@@ -311,7 +312,7 @@ toByteString = L.toStrict . toLazyByteString
311312aeson :: IO Benchmark
312313aeson = do
313314 let path = "json-data"
314− names <- filter (`notElem` [".", ".."]) <$> getDirectoryContents path
315+ names <- sort . filter (`notElem` [".", ".."]) <$> getDirectoryContents path
315316 benches <- forM names $ \name -> do
316317 bs <- B.readFile (path </> name)
317318 return . bench (dropExtension name) $ nf (A.parseOnly jsonEOF') bs