diff options
author | Marius <mariausol@gmail.com> | 2013-03-13 20:40:18 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-03-13 20:40:18 +0200 |
commit | 81cdb024df2aaf01f5f9d76d956b4c1b80c2ae51 (patch) | |
tree | ffa5e7f78a20b108ebc95017de09162024a52e27 /tex/context/base/luat-run.lua | |
parent | 793a738b467b82ff9a5c8d2c7bd3b473ada7feba (diff) | |
download | context-81cdb024df2aaf01f5f9d76d956b4c1b80c2ae51.tar.gz |
beta 2013.03.13 19:31
Diffstat (limited to 'tex/context/base/luat-run.lua')
-rw-r--r-- | tex/context/base/luat-run.lua | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tex/context/base/luat-run.lua b/tex/context/base/luat-run.lua index 4f65370bb..34d45d096 100644 --- a/tex/context/base/luat-run.lua +++ b/tex/context/base/luat-run.lua @@ -9,10 +9,15 @@ if not modules then modules = { } end modules ['luat-run'] = { local format = string.format local insert = table.insert +-- trace_job_status is also controlled by statistics.enable that is set via the directive system.nostatistics + local trace_lua_dump = false trackers.register("system.dump", function(v) trace_lua_dump = v end) local trace_temp_files = false trackers.register("system.tempfiles", function(v) trace_temp_files = v end) +local trace_job_status = true trackers.register("system.jobstatus", function(v) trace_job_status = v end) +local trace_tex_status = false trackers.register("system.texstatus", function(v) trace_tex_status = v end) local report_lua = logs.reporter("system","lua") +local report_tex = logs.reporter("system","status") local report_tempfiles = logs.reporter("resolvers","tempfiles") luatex = luatex or { } @@ -24,9 +29,6 @@ local stopactions = { } function luatex.registerstartactions(...) insert(startactions, ...) end function luatex.registerstopactions (...) insert(stopactions, ...) end -luatex.showtexstat = luatex.showtexstat or function() end -luatex.showjobstat = luatex.showjobstat or statistics.showjobstat - local function start_run() if logs.start_run then logs.start_run() @@ -40,12 +42,12 @@ local function stop_run() for i=1,#stopactions do stopactions[i]() end - if luatex.showjobstat then - statistics.show(logs.report_job_stat) + if trace_job_status then + statistics.show() end - if luatex.showtexstat then - for k,v in next, status.list() do - logs.report_tex_stat(k,v) + if trace_tex_status then + for k, v in table.sortedhash(status.list()) do + report_tex("%S=%S",k,v) end end if logs.stop_run then @@ -75,7 +77,6 @@ end local function pre_dump_actions() lua.finalize(trace_lua_dump and report_lua or nil) - statistics.reportstorage("log") -- statistics.savefmtstatus("\jobname","\contextversion","context.tex") end |