44
55import Gauge.Main (defaultMain ,bgroup ,bench ,whnf )
66
7+ import Metrics1024 (encodedMetrics1024 )
78import Twitter100 (encodedTwitter100 ,byteStringTwitter100 )
89import Url100 (encodedUrl100 ,byteStringUrl100 )
910
@@ -23,6 +24,9 @@ main = do
2324 valueUrl100 <- case J. decode (Bytes. fromByteArray encodedUrl100) of
2425 Left _ -> fail " json-syntax failed to decode url-100"
2526 Right v -> pure v
27+ valueMetrics1024 <- case J. decode (Bytes. fromByteArray encodedMetrics1024) of
28+ Left _ -> fail " json-syntax failed to decode metrics-1024"
29+ Right v -> pure v
2630 aesonValueTwitter100 <- case Aeson. decodeStrict' byteStringTwitter100 of
2731 Nothing -> fail " aeson failed to decode twitter-100"
2832 Just (v :: Aeson. Value ) -> pure v
@@ -36,7 +40,7 @@ main = do
3640 , bench " encode" $ whnf
3741 (\ v -> Chunks. length (BLDR. run 128 (J. encode v)))
3842 valueTwitter100
39- , bench " encode-smile-simple " $ whnf
43+ , bench " encode-smile" $ whnf
4044 (\ v -> Chunks. length (BLDR. run 128 (Smile. encode v)))
4145 valueTwitter100
4246 ]
@@ -49,11 +53,21 @@ main = do
4953 , bench " encode" $ whnf
5054 (\ v -> Chunks. length (BLDR. run 128 (J. encode v)))
5155 valueUrl100
52- , bench " encode-smile-simple " $ whnf
56+ , bench " encode-smile" $ whnf
5357 (\ v -> Chunks. length (BLDR. run 128 (Smile. encode v)))
5458 valueUrl100
5559 ]
5660 ]
61+ , bgroup " metrics"
62+ [ bgroup " 1024"
63+ [ bench " encode" $ whnf
64+ (\ v -> Chunks. length (BLDR. run 128 (J. encode v)))
65+ valueMetrics1024
66+ , bench " encode-smile" $ whnf
67+ (\ v -> Chunks. length (BLDR. run 128 (Smile. encode v)))
68+ valueMetrics1024
69+ ]
70+ ]
5771 ]
5872 , bgroup " aeson"
5973 [ bgroup " twitter"
0 commit comments