git.iko.soy/distributed-process
on master help sign in
Fix benchmark names.
6cf44a5Nicolas Wu
README.md+1−1
@@ -105,7 +105,7 @@ are sent between a server and client. Full details can be found in:
105### Send
105### Send
106
106
107This benchmark measures how quickly a number of bytes can be sent from
107This benchmark measures how quickly a number of bytes can be sent from
108−a client to a server. full details can be found in the following files:
108+a client to a server. Full details can be found in the following files:
109
109
110 ./benchmarks/SendTCP.hs
110 ./benchmarks/SendTCP.hs
111 ./benchmarks/SendTransport.hs
111 ./benchmarks/SendTransport.hs
benchmarks/PingTCP.hs+1−1
@@ -83,6 +83,6 @@ pong sock = do
83 return ()
83 return ()
84
84
85benchPing :: Socket -> Int64 -> Benchmark
85benchPing :: Socket -> Int64 -> Benchmark
86−benchPing sock n = bench "TCP Ping" $
86+benchPing sock n = bench "PingTCP" $
87 nfIO (replicateM_ (fromIntegral n) (ping sock))
87 nfIO (replicateM_ (fromIntegral n) (ping sock))
88
88
benchmarks/PingTransport.hs+1−1
@@ -87,6 +87,6 @@ ping sourceEndPing targetEndPong = do
87-- `n` pings down `sourceEndPing` using the `ping` function. The time
87-- `n` pings down `sourceEndPing` using the `ping` function. The time
88-- taken is benchmarked.
88-- taken is benchmarked.
89benchPing :: SourceEnd -> TargetEnd -> Int64 -> Benchmark
89benchPing :: SourceEnd -> TargetEnd -> Int64 -> Benchmark
90−benchPing sourceEndPing targetEndPong n = bench "Transport Ping" $
90+benchPing sourceEndPing targetEndPong n = bench "PingTransport" $
91 nfIO (replicateM_ (fromIntegral n) (ping sourceEndPing targetEndPong))
91 nfIO (replicateM_ (fromIntegral n) (ping sourceEndPing targetEndPong))
92
92
benchmarks/SendTransport.hs+3−3
@@ -54,7 +54,6 @@ main = do
54
54
55 "client" : host : service : sourceAddrFilePath : sizeStr : args' -> do
55 "client" : host : service : sourceAddrFilePath : sizeStr : args' -> do
56 let size = read sizeStr
56 let size = read sizeStr
57− let bs = BS.replicate size 0
58
57
59 -- establish transport
58 -- establish transport
60 transport <- mkTransport $ TCPConfig defaultHints host service
59 transport <- mkTransport $ TCPConfig defaultHints host service
@@ -67,7 +66,8 @@ main = do
67 (sourceAddrPong, targetEndPong) <- newConnection transport
66 (sourceAddrPong, targetEndPong) <- newConnection transport
68 send sourceEndPing [serialize sourceAddrPong]
67 send sourceEndPing [serialize sourceAddrPong]
69
68
70− -- benchmark the pings
69+ -- benchmark the data
70+ let bs = BS.replicate size 0
71 withArgs args' $ defaultMain [ benchSend sourceEndPing targetEndPong bs ]
71 withArgs args' $ defaultMain [ benchSend sourceEndPing targetEndPong bs ]
72
72
73-- | The effect of `ping sourceEndPing targetEndPong bs` is to send the
73-- | The effect of `ping sourceEndPing targetEndPong bs` is to send the
@@ -91,6 +91,6 @@ pong targetEndPing sourceEndPong = do
91-- `bs` pings down `sourceEndPing` using the `ping` function. The time
91-- `bs` pings down `sourceEndPing` using the `ping` function. The time
92-- taken is benchmarked.
92-- taken is benchmarked.
93benchSend :: SourceEnd -> TargetEnd -> ByteString -> Benchmark
93benchSend :: SourceEnd -> TargetEnd -> ByteString -> Benchmark
94−benchSend sourceEndPing targetEndPong bs = bench "Transport Ping" $
94+benchSend sourceEndPing targetEndPong bs = bench "SendTransport" $
95 nfIO (ping sourceEndPing targetEndPong bs)
95 nfIO (ping sourceEndPing targetEndPong bs)
96
96