Bryan O'Sullivan avatar Bryan O'Sullivan committed 667702a

Give some benchmark groups better names.

Comments (0)

Files changed (1)

tests/Benchmarks.hs

 import qualified Data.ByteString.Lazy.Internal as BL
 import Control.Monad.Trans (liftIO)
 import Control.Exception (evaluate)
-import Control.Parallel.Strategies
 import Criterion.Main
 import Data.Char
 import qualified Codec.Binary.UTF8.Generic as UTF8
       , bench "bl" $ nf (BL.filter p0) bla
       , bench "l" $ nf (L.filter p0) la
       ],
-      bgroup "2filter" [
+      bgroup "filter.filter" [
         bench "ts" $ nf (TS.filter p1 . TS.filter p0) tsa
       , bench "tl" $ nf (TL.filter p1 . TL.filter p0) tla
       , bench "bs" $ nf (BS.filter p1 . BS.filter p0) bsa
       , bench "bl" $ nf (BL.map f) bla
       , bench "l" $ nf (L.map f) la
       ],
-      bgroup "2map" [
+      bgroup "map.map" [
         bench "ts" $ nf (TS.map f . TS.map f) tsa
       , bench "tl" $ nf (TL.map f . TL.map f) tla
       , bench "bs" $ nf (BS.map f . BS.map f) bsa
       , bench "bl" $ nf (BL.map f . BL.map f) bla
       , bench "l" $ nf (L.map f . L.map f) la
       ],
-      bgroup "replicate" [
+      bgroup "replicate char" [
         bench "ts" $ nf (TS.replicate bsa_len) (TS.singleton c)
       , bench "tl" $ nf (TL.replicate (fromIntegral bsa_len)) (TL.singleton c)
       , bench "bs" $ nf (BS.replicate bsa_len) c
       , bench "bl" $ nf (BL.replicate (fromIntegral bsa_len)) c
       , bench "l" $ nf (L.replicate bsa_len) c
       ],
-      bgroup "2replicate" [
+      bgroup "replicate string" [
         bench "ts" $ nf (TS.replicate (bsa_len `div` TS.length tsw)) tsw
       , bench "tl" $ nf (TL.replicate (fromIntegral bsa_len `div` TL.length tlw)) tlw
       , bench "l" $ nf (replicat (bsa_len `div` TS.length tsw)) lw
         , bench "bl" $ nf (BL.length . BL.filter p0) bla
         , bench "l" $ nf (L.length . L.filter p0) la
         ],
-        bgroup "2filter" [
+        bgroup "filter.filter" [
           bench "ts" $ nf (TS.length . TS.filter p1 . TS.filter p0) tsa
         , bench "tl" $ nf (TL.length . TL.filter p1 . TL.filter p0) tla
         , bench "bs" $ nf (BS.length . BS.filter p1 . BS.filter p0) bsa
         , bench "bl" $ nf (BL.length . BL.map f) bla
         , bench "l" $ nf (L.length . L.map f) la
         ],
-        bgroup "2map" [
+        bgroup "map.map" [
           bench "ts" $ nf (TS.length . TS.map f . TS.map f) tsa
         , bench "tl" $ nf (TL.length . TL.map f . TL.map f) tla
         , bench "bs" $ nf (BS.length . BS.map f . BS.map f) bsa
         , bench "l" $ nf (L.length . L.map f . L.map f) la
         ],
-        bgroup "replicate" [
+        bgroup "replicate char" [
           bench "ts" $ nf (TS.length . TS.replicate bsa_len) (TS.singleton c)
         , bench "tl" $ nf (TL.length . TL.replicate (fromIntegral bsa_len)) (TL.singleton c)
         , bench "bs" $ nf (BS.length . BS.replicate bsa_len) c
         , bench "bl" $ nf (BL.length . BL.replicate (fromIntegral bsa_len)) c
         , bench "l" $ nf (L.length . L.replicate bsa_len) c
         ],
-        bgroup "2replicate" [
+        bgroup "replicate string" [
           bench "ts" $ nf (TS.length . TS.replicate (bsa_len `div` TS.length tsw)) tsw
         , bench "tl" $ nf (TL.length . TL.replicate (fromIntegral bsa_len `div` TL.length tlw)) tlw
         , bench "l" $ nf (L.length . replicat (bsa_len `div` TS.length tsw)) lw
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.