diff options
Diffstat (limited to 'bench/Main.hs')
-rw-r--r-- | bench/Main.hs | 17 |
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 #-} | ||
2 | module Main (main) where | ||
3 | |||
4 | import Criterion.Main | ||
5 | import Remote.KRPC | ||
6 | |||
7 | |||
8 | addr :: RemoteAddr | ||
9 | addr = (0, 6000) | ||
10 | |||
11 | echo :: Method [Int] [Int] | ||
12 | echo = method "echo" ["x"] ["x"] | ||
13 | |||
14 | main :: IO () | ||
15 | main = 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 | ||