diff options
Diffstat (limited to 'tests/bench.lua')
-rwxr-xr-x | tests/bench.lua | 5 |
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 | ||
9 | require "common" | ||
10 | require "socket" | 9 | require "socket" |
11 | |||
12 | local json = require "cjson" | 10 | local json = require "cjson" |
11 | local misc = require "cjson-misc" | ||
13 | 12 | ||
14 | function benchmark(tests, seconds, rep) | 13 | function 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) | |||
54 | end | 53 | end |
55 | 54 | ||
56 | function bench_file(filename) | 55 | function 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 () |