diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-01-13 23:10:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-01-13 23:10:00 +0100 |
commit | de678e954438110850d93c5f35a0d6bf14129901 (patch) | |
tree | 32e0481227cdde042cebbdfc6b99f5efbf5c5756 /tex/context/base/trac-inf.lua | |
parent | de9b101fa556fa74bf531774293a6913705ff5db (diff) | |
download | context-de678e954438110850d93c5f35a0d6bf14129901.tar.gz |
beta 2013.01.13 23:10
Diffstat (limited to 'tex/context/base/trac-inf.lua')
-rw-r--r-- | tex/context/base/trac-inf.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tex/context/base/trac-inf.lua b/tex/context/base/trac-inf.lua index 699e2b668..5575639eb 100644 --- a/tex/context/base/trac-inf.lua +++ b/tex/context/base/trac-inf.lua @@ -12,6 +12,7 @@ if not modules then modules = { } end modules ['trac-inf'] = { -- and rawget. local format, lower = string.format, string.lower +local concat = table.concat local clock = os.gettimeofday or os.clock -- should go in environment local write_nl = texio and texio.write_nl or print @@ -121,6 +122,14 @@ function statistics.show(reporter) local total, indirect = status.callbacks or 0, status.indirect_callbacks or 0 return format("%s direct, %s indirect, %s total", total-indirect, indirect, total) end) + if jit then + local status = { jit.status() } + if status[1] then + register("luajit status", function() + return concat(status," ",2) + end) + end + end collectgarbage("collect") register("current memory usage", statistics.memused) register("runtime",statistics.runtime) |