diff options
author | Marius <mariausol@gmail.com> | 2013-01-14 00:20:22 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-01-14 00:20:22 +0200 |
commit | fe55ae49d8deddeb8f02557e3902c847804b0086 (patch) | |
tree | e7d92e04f7acaf2773c23ea081c4d2fe0dc0a167 /tex/context/base/trac-inf.lua | |
parent | d38d94fe9542984e38b9839eb2383656328b9da9 (diff) | |
download | context-fe55ae49d8deddeb8f02557e3902c847804b0086.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) |