git.iko.soy/distributed-process
on master help sign in
Fix benchmark names.
commit6cf44a5ed3206b2e2ba178f1a45cba34bfacd908 authorNicolas Wu <nick@well-typed.com> dateTue 31 Jan 2012, 09:50 (15 years ago) parent4606f17
4 files changed+6−6
README.md+1−1 benchmarks/PingTCP.hs+1−1 benchmarks/PingTransport.hs+1−1 benchmarks/SendTransport.hs+3−3
README.md+1−1
@@ -105,7 +105,7 @@ are sent between a server and client. Full details can be found in:
105105### Send
106106
107107This 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:
109109
110110 ./benchmarks/SendTCP.hs
111111 ./benchmarks/SendTransport.hs
benchmarks/PingTCP.hs+1−1
@@ -83,6 +83,6 @@ pong sock = do
8383 return ()
8484
8585benchPing :: Socket -> Int64 -> Benchmark
86−benchPing sock n = bench "TCP Ping" $
86+benchPing sock n = bench "PingTCP" $
8787 nfIO (replicateM_ (fromIntegral n) (ping sock))
8888
benchmarks/PingTransport.hs+1−1
@@ -87,6 +87,6 @@ ping sourceEndPing targetEndPong = do
8787-- `n` pings down `sourceEndPing` using the `ping` function. The time
8888-- taken is benchmarked.
8989benchPing :: SourceEnd -> TargetEnd -> Int64 -> Benchmark
90−benchPing sourceEndPing targetEndPong n = bench "Transport Ping" $
90+benchPing sourceEndPing targetEndPong n = bench "PingTransport" $
9191 nfIO (replicateM_ (fromIntegral n) (ping sourceEndPing targetEndPong))
9292
benchmarks/SendTransport.hs+3−3
@@ -54,7 +54,6 @@ main = do
5454
5555 "client" : host : service : sourceAddrFilePath : sizeStr : args' -> do
5656 let size = read sizeStr
57− let bs = BS.replicate size 0
5857
5958 -- establish transport
6059 transport <- mkTransport $ TCPConfig defaultHints host service
@@ -67,7 +66,8 @@ main = do
6766 (sourceAddrPong, targetEndPong) <- newConnection transport
6867 send sourceEndPing [serialize sourceAddrPong]
6968
70− -- benchmark the pings
69+ -- benchmark the data
70+ let bs = BS.replicate size 0
7171 withArgs args' $ defaultMain [ benchSend sourceEndPing targetEndPong bs ]
7272
7373-- | The effect of `ping sourceEndPing targetEndPong bs` is to send the
@@ -91,6 +91,6 @@ pong targetEndPing sourceEndPong = do
9191-- `bs` pings down `sourceEndPing` using the `ping` function. The time
9292-- taken is benchmarked.
9393benchSend :: SourceEnd -> TargetEnd -> ByteString -> Benchmark
94−benchSend sourceEndPing targetEndPong bs = bench "Transport Ping" $
94+benchSend sourceEndPing targetEndPong bs = bench "SendTransport" $
9595 nfIO (ping sourceEndPing targetEndPong bs)
9696