From 9d7bd06ad57832cfe6bba22acc7d7b8c74cdf8b8 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Sun, 29 May 2011 18:05:39 +0930 Subject: Add trivial types.json example --- tests/bench.lua | 2 ++ tests/types.json | 1 + 2 files changed, 3 insertions(+) create mode 100644 tests/types.json diff --git a/tests/bench.lua b/tests/bench.lua index c1808cf..0e2a75c 100755 --- a/tests/bench.lua +++ b/tests/bench.lua @@ -12,12 +12,14 @@ local json = require "cjson" function benchmark(tests, iter, rep) local function bench(func, iter) + -- collectgarbage("stop") collectgarbage("collect") local t = socket.gettime() for i = 1, iter do func(i) end t = socket.gettime() - t + -- collectgarbage("restart") return (iter / t) end diff --git a/tests/types.json b/tests/types.json new file mode 100644 index 0000000..c01e7d2 --- /dev/null +++ b/tests/types.json @@ -0,0 +1 @@ +{ "array": [ 10, true, null ] } -- cgit v1.2.3-55-g6feb