summaryrefslogtreecommitdiff
path: root/bench/Main.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-05-12 07:17:15 +0400
committerSam T <pxqr.sta@gmail.com>2013-05-12 07:17:15 +0400
commiteff48f66c6d8e7231eef0ef3c3561e19865a2637 (patch)
tree151c2473d34958d0e7964f2bc905e517b90b1ce1 /bench/Main.hs
parent5ee611585e4eb6acb89b34e6679d89e25098e23b (diff)
+ Add basic bench.
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