Changeset 5113
- Timestamp:
- 07/23/09 04:19:46 (4 years ago)
- Files:
-
- 1 modified
-
luci/trunk/libs/core/luasrc/debug.lua (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
luci/trunk/libs/core/luasrc/debug.lua
r5101 r5113 1 1 local debug = require "debug" 2 2 local io = require "io" 3 local collectgarbage = collectgarbage3 local collectgarbage, floor = collectgarbage, math.floor 4 4 5 5 module "luci.debug" … … 14 14 local function trap(what, line) 15 15 local info = debug.getinfo(2, "Sn") 16 if collectgarbage("count") > peak then 17 peak = collectgarbage("count") 16 local size = floor(collectgarbage("count")) 17 if size > peak then 18 peak = size 18 19 end 19 20 if tracefile then … … 22 23 (info.namewhat or ""), "\t", 23 24 (info.name or ""), "\t", 24 collectgarbage("count"), " (", peak, ")\n"25 size, " (", peak, ")\n" 25 26 ) 26 27 end
