| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Simply string.format() calls with OO method notation.
|
|
|
|
|
|
|
|
|
| |
Update benchmark script to average the best half (round up) of the
result set. Ensure the initial call rate is calculated from a run of at
least 1ms.
Remove garbage collection control since any variations due to garbage
collection are better handled by averaging multiple results.
|
| |
|
|
|
|
|
|
| |
- Select via JSON_MODULE environment variable (default "cjson")
- Custom runtime configuration can be stored in bench-MODNAME.lua
- Add run_script() to cjson-misc and update lua2cjson.lua
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update all Lua scripts to use new module init style everywhere:
local json = require "cjson"
Lua CJSON does not register a global table under Lua 5.2. The global
table can be disabled under Lua 5.1 with DISABLE_CJSON_GLOBAL.
Other changes:
- Store CJSON configuration as an upvalue for each function.
- Add "cjson.new" function to create another module table with a
separate configuration.
- Add _NAME and _VERSION variables.
|
|
|
|
|
| |
Roughly calculate the number of iterations required to run the benchmark
for the chosen duration.
|
| |
|
|
|
|
|
| |
Move benchmark() into bench.lua since it not used elsewhere.
Replace posix.gettimeofday() with socket.gettime() to improve portability.
|
|
|
|
|
|
|
|
| |
- Add run_test(): Test a function and verify its output
- Add run_test_group(): Execute a test batch
- Add serialise_value(): Serialise a Lua value into the Lua syntax
- Add file_save() helper function
- Add NaN comparison support to compare_values()
|
|
|