From 05447b67ffc9144ddeb9ddeb5de8ae460f48ebbe Mon Sep 17 00:00:00 2001 From: Aapo Talvensaari Date: Tue, 26 Apr 2016 14:19:03 +0300 Subject: [PATCH] Small fixes to microbenchmark. --- lib/resty/template/microbenchmark.lua | 42 ++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/lib/resty/template/microbenchmark.lua b/lib/resty/template/microbenchmark.lua index 7d89438..1160de3 100644 --- a/lib/resty/template/microbenchmark.lua +++ b/lib/resty/template/microbenchmark.lua @@ -6,7 +6,7 @@ if not ok then end local function run(iterations) - local total, print, parse, compile, iterations, clock, format = 0, ngx and ngx.say or print, template.parse, template.compile, iterations or 1000, os.clock, string.format + local gc, total, print, parse, compile, iterations, clock, format = collectgarbage, 0, ngx and ngx.say or print, template.parse, template.compile, iterations or 1000, os.clock, string.format local view = [[