diff options
Diffstat (limited to '')
-rwxr-xr-x | tests/bench.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/bench.lua b/tests/bench.lua index 0709209..0299ff2 100755 --- a/tests/bench.lua +++ b/tests/bench.lua | |||
@@ -10,7 +10,7 @@ local json_module = os.getenv("JSON_MODULE") or "cjson" | |||
10 | 10 | ||
11 | require "socket" | 11 | require "socket" |
12 | local json = require(json_module) | 12 | local json = require(json_module) |
13 | local misc = require "cjson-misc" | 13 | local util = require "cjson.util" |
14 | 14 | ||
15 | local function find_func(mod, funcnames) | 15 | local function find_func(mod, funcnames) |
16 | for _, v in ipairs(funcnames) do | 16 | for _, v in ipairs(funcnames) do |
@@ -68,7 +68,7 @@ function benchmark(tests, seconds, rep) | |||
68 | end | 68 | end |
69 | 69 | ||
70 | function bench_file(filename) | 70 | function bench_file(filename) |
71 | local data_json = misc.file_load(filename) | 71 | local data_json = util.file_load(filename) |
72 | local data_obj = json_decode(data_json) | 72 | local data_obj = json_decode(data_json) |
73 | 73 | ||
74 | local function test_encode() | 74 | local function test_encode() |
@@ -86,9 +86,9 @@ function bench_file(filename) | |||
86 | end | 86 | end |
87 | 87 | ||
88 | -- Optionally load any custom configuration required for this module | 88 | -- Optionally load any custom configuration required for this module |
89 | local success, data = pcall(misc.file_load, string.format("bench-%s.lua", json_module)) | 89 | local success, data = pcall(util.file_load, string.format("bench-%s.lua", json_module)) |
90 | if success then | 90 | if success then |
91 | misc.run_script(data, _G) | 91 | util.run_script(data, _G) |
92 | configure(json) | 92 | configure(json) |
93 | end | 93 | end |
94 | 94 | ||