summaryrefslogtreecommitdiff
path: root/tex/context/base/trac-inf.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-02-08 12:00:13 +0200
committerMarius <mariausol@gmail.com>2011-02-08 12:00:13 +0200
commit9c6992a3436a0db6a01790b29d7c0c3c65460f94 (patch)
treec384372b23cfb6a5379641b4857bae07057bb3be /tex/context/base/trac-inf.lua
parent801c806a2489c5c96578fe95945bef589329c4e0 (diff)
downloadcontext-9c6992a3436a0db6a01790b29d7c0c3c65460f94.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.lua14
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")