aboutsummaryrefslogtreecommitdiff
path: root/tests/bench.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bench.lua')
-rwxr-xr-xtests/bench.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/bench.lua b/tests/bench.lua
index c81213d..2b5177b 100755
--- a/tests/bench.lua
+++ b/tests/bench.lua
@@ -6,10 +6,9 @@
6-- 6--
7-- Mark Pulford <mark@kyne.com.au> 7-- Mark Pulford <mark@kyne.com.au>
8 8
9require "common"
10require "socket" 9require "socket"
11
12local json = require "cjson" 10local json = require "cjson"
11local misc = require "cjson-misc"
13 12
14function benchmark(tests, seconds, rep) 13function benchmark(tests, seconds, rep)
15 local function bench(func, iter) 14 local function bench(func, iter)
@@ -54,7 +53,7 @@ function benchmark(tests, seconds, rep)
54end 53end
55 54
56function bench_file(filename) 55function bench_file(filename)
57 local data_json = file_load(filename) 56 local data_json = misc.file_load(filename)
58 local data_obj = json.decode(data_json) 57 local data_obj = json.decode(data_json)
59 58
60 local function test_encode () 59 local function test_encode ()