git.iko.soy/distributed-process
on master help sign in
Whoops, left some debugging code in
commitc7f72cec0f52bf7f2cee35df2f1add35a3431934 authorEdsko de Vries <edsko@well-typed.com> dateFri 13 Apr 2012, 16:21 (15 years ago) parent610efb9
2 files changed+4−4
benchmarks/Indirection.gnuplot+1−1 benchmarks/JustPingTransport.hs+3−3
benchmarks/Indirection.gnuplot+1−1
@@ -5,7 +5,7 @@ plot "JustPingWithHeader.data" smooth bezier with lines title "JustPingWithHeade
55 "JustPingThroughMVar.data" smooth bezier with lines title "JustPingThroughMVar", \
66 "JustPingTransport.data" smooth bezier with lines title "JustPingTransport"
77set terminal postscript color
8−set output "Headers.ps"
8+set output "Indirection.ps"
99plot "JustPingWithHeader.data" smooth bezier with lines title "JustPingWithHeader", \
1010 "JustPingThroughChan.data" smooth bezier with lines title "JustPingThroughChan", \
1111 "JustPingThroughMVar.data" smooth bezier with lines title "JustPingThroughMVar", \
benchmarks/JustPingTransport.hs+3−3
@@ -78,10 +78,10 @@ ping sourceEndPing targetEndPong pings = go pings
7878 putStrLn $ "client did " ++ show pings ++ " pings"
7979 go !i = do
8080 before <- getCurrentTime
81− send sourceEndPing (replicate i pingMessage)
81+ send sourceEndPing [pingMessage]
8282 [bs] <- receive targetEndPong
8383 after <- getCurrentTime
84− putStrLn $ "client received " ++ unpack bs
84+ -- putStrLn $ "client received " ++ unpack bs
8585 let latency = (1e6 :: Double) * realToFrac (diffUTCTime after before)
8686 hPutStrLn stderr $ show i ++ " " ++ show latency
8787 go (i - 1)
@@ -89,7 +89,7 @@ ping sourceEndPing targetEndPong pings = go pings
8989pong :: TargetEnd -> SourceEnd -> IO ()
9090pong targetEndPing sourceEndPong = do
9191 [bs] <- receive targetEndPing
92− putStrLn $ "server received " ++ unpack bs
92+ -- putStrLn $ "server received " ++ unpack bs
9393 when (BS.length bs > 0) $ do
9494 send sourceEndPong [bs]
9595 pong targetEndPing sourceEndPong