diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-02-08 10:06:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-02-08 10:06:00 +0100 |
commit | 13fe57ae547e79f911229fe4586591f7a8439c69 (patch) | |
tree | e30b07f26511067cd49a3cc0333720a75f157076 /tex/context/base/trac-inf.lua | |
parent | 6f1048d50cb4376e5bf17c8c9221f61e4af9f778 (diff) | |
download | context-13fe57ae547e79f911229fe4586591f7a8439c69.tar.gz |
beta 2011.02.08 10:06
Diffstat (limited to 'tex/context/base/trac-inf.lua')
-rw-r--r-- | tex/context/base/trac-inf.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tex/context/base/trac-inf.lua b/tex/context/base/trac-inf.lua index aa224cf38..79007953a 100644 --- a/tex/context/base/trac-inf.lua +++ b/tex/context/base/trac-inf.lua @@ -137,19 +137,21 @@ function statistics.show(reporter) end end - -local template, nn = nil, 0 -- we only calcute it once +local template, report_statistics, nn = nil, nil, 0 -- we only calcute it once function statistics.showjobstat(tag,data,n) - if type(data) == "table" then + if not logs then + -- sorry + elseif type(data) == "table" then for i=1,#data do statistics.showjobstat(tag,data[i],n) end else if not template or n > nn then - template, n = format("%%-%ss: %%-%ss - %%s",15,n), nn + template, n = format("%%-%ss - %%s",n), nn + report_statistics = logs.new("mkiv lua stats") end - write_nl(format(template,"mkiv lua stats",tag,data)) + report_statistics(format(template,tag,data)) end end @@ -170,7 +172,7 @@ function statistics.runtime() end function statistics.timed(action,report) - report = report or logs.simple + report = report or logs.new("system") starttiming("run") action() stoptiming("run") |