aboutsummaryrefslogtreecommitdiff
path: root/tests/bench.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtests/bench.lua8
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
11require "socket" 11require "socket"
12local json = require(json_module) 12local json = require(json_module)
13local misc = require "cjson-misc" 13local util = require "cjson.util"
14 14
15local function find_func(mod, funcnames) 15local 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)
68end 68end
69 69
70function bench_file(filename) 70function 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)
86end 86end
87 87
88-- Optionally load any custom configuration required for this module 88-- Optionally load any custom configuration required for this module
89local success, data = pcall(misc.file_load, string.format("bench-%s.lua", json_module)) 89local success, data = pcall(util.file_load, string.format("bench-%s.lua", json_module))
90if success then 90if success then
91 misc.run_script(data, _G) 91 util.run_script(data, _G)
92 configure(json) 92 configure(json)
93end 93end
94 94