summaryrefslogtreecommitdiff
path: root/bench/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'bench/Main.hs')
-rw-r--r--bench/Main.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/bench/Main.hs b/bench/Main.hs
index ecfefcea..a7b937ff 100644
--- a/bench/Main.hs
+++ b/bench/Main.hs
@@ -5,9 +5,9 @@ import Control.DeepSeq
5import Criterion.Main 5import Criterion.Main
6import Network 6import Network
7 7
8import Network.BitTorrent as BT
9import Network.BitTorrent.Exchange.Protocol as BT 8import Network.BitTorrent.Exchange.Protocol as BT
10import Data.Bitfield as BT 9import Data.Torrent.Block as BT
10import Data.Torrent.Bitfield as BT
11 11
12 12
13instance NFData PortNumber where 13instance NFData PortNumber where
@@ -29,6 +29,7 @@ instance NFData Message where
29 rnf (Cancel b) = rnf b 29 rnf (Cancel b) = rnf b
30 rnf (Port i) = rnf i 30 rnf (Port i) = rnf i
31 rnf _ = () -- other fields are forced by pattern matching 31 rnf _ = () -- other fields are forced by pattern matching
32
32{- 33{-
33encodeMessages :: [Message] -> ByteString 34encodeMessages :: [Message] -> ByteString
34encodeMessages xs = runPut (mapM_ put xs) 35encodeMessages xs = runPut (mapM_ put xs)
@@ -36,5 +37,6 @@ encodeMessages xs = runPut (mapM_ put xs)
36decodeMessages :: ByteString -> Either String [Message] 37decodeMessages :: ByteString -> Either String [Message]
37decodeMessages = runGet (many get) 38decodeMessages = runGet (many get)
38-} 39-}
40
39main :: IO () 41main :: IO ()
40main = defaultMain [] 42main = defaultMain []