diff options
author | Mark Pulford <mark@kyne.com.au> | 2012-01-13 07:17:48 +1030 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2012-03-04 18:54:34 +1030 |
commit | 73d33f25760d4d4ffb7fa8acf6a67d0f7e19fec7 (patch) | |
tree | 29e1bf0e1d0fb892eb0bdc6959f61da4b6cb639a /tests/bench.lua | |
parent | 5fb9fe1c67a070d1e83497c44b7b7364da9f1975 (diff) | |
download | lua-cjson-73d33f25760d4d4ffb7fa8acf6a67d0f7e19fec7.tar.gz lua-cjson-73d33f25760d4d4ffb7fa8acf6a67d0f7e19fec7.tar.bz2 lua-cjson-73d33f25760d4d4ffb7fa8acf6a67d0f7e19fec7.zip |
Rename "cjson-misc" module to "cjson.util"
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 | ||