diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-05-12 07:17:15 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-05-12 07:17:15 +0400 |
commit | eff48f66c6d8e7231eef0ef3c3561e19865a2637 (patch) | |
tree | 151c2473d34958d0e7964f2bc905e517b90b1ce1 /bench/Main.hs | |
parent | 5ee611585e4eb6acb89b34e6679d89e25098e23b (diff) |
+ Add basic bench.
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 | ||