summaryrefslogtreecommitdiff
path: root/bench/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'bench/Main.hs')
-rw-r--r--bench/Main.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/bench/Main.hs b/bench/Main.hs
new file mode 100644
index 00000000..411282a0
--- /dev/null
+++ b/bench/Main.hs
@@ -0,0 +1,17 @@
1{-# LANGUAGE OverloadedStrings #-}
2module Main (main) where
3
4import Criterion.Main
5import Remote.KRPC
6
7
8addr :: RemoteAddr
9addr = (0, 6000)
10
11echo :: Method [Int] [Int]
12echo = method "echo" ["x"] ["x"]
13
14main :: IO ()
15main = defaultMain $ map mkbench [1, 10, 100, 1000]
16 where
17 mkbench n = bench (show n) $ nfIO $ call addr echo [1..n] \ No newline at end of file