summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/core-uti.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-01-19 13:13:21 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-01-19 13:13:21 +0100
commit3861c9ef2ffeffe824f05a255534d61800e27e7a (patch)
tree023d3e32dd6d7ef55f3eed41e23e012c32b07894 /tex/context/base/mkiv/core-uti.lua
parent823bd4a7d8ff32c05807b02e650ecbd60b43e95d (diff)
downloadcontext-3861c9ef2ffeffe824f05a255534d61800e27e7a.tar.gz
2019-01-19 12:15:00
Diffstat (limited to 'tex/context/base/mkiv/core-uti.lua')
-rw-r--r--tex/context/base/mkiv/core-uti.lua17
1 files changed, 7 insertions, 10 deletions
diff --git a/tex/context/base/mkiv/core-uti.lua b/tex/context/base/mkiv/core-uti.lua
index 9074d1da9..7c70cee7a 100644
--- a/tex/context/base/mkiv/core-uti.lua
+++ b/tex/context/base/mkiv/core-uti.lua
@@ -432,6 +432,7 @@ end)
-- local used_wood_factor = watts_per_core * kg_per_watt_per_second / speedup_by_other_engine
-- local used_wood_factor = (50 / 15000000) / 1.2
+
function statistics.formatruntime(runtime)
if not environment.initex then -- else error when testing as not counters yet
-- stoptiming(statistics) -- to be sure
@@ -440,19 +441,15 @@ function statistics.formatruntime(runtime)
if pages > shipped then
pages = shipped
end
+ runtime = tonumber(runtime)
if shipped > 0 or pages > 0 then
- runtime = tonumber(runtime)
local persecond = (runtime > 0) and (shipped/runtime) or pages
- if pages == 0 then pages = shipped end
- -- if TEXENGINE == "luajittex" then
- -- local saved = watts_per_core * runtime * kg_per_watt_per_second / speedup_by_other_engine
- -- local saved = used_wood_factor * runtime
- -- return format("%s seconds, %i processed pages, %i shipped pages, %.3f pages/second, %f mg tree saved by using luajittex",runtime,pages,shipped,persecond,saved*1000*1000)
- -- else
- return format("%s seconds, %i processed pages, %i shipped pages, %.3f pages/second",runtime,pages,shipped,persecond)
- -- end
+ if pages == 0 then
+ pages = shipped
+ end
+ return format("%0.3f seconds, %i processed pages, %i shipped pages, %.3f pages/second",runtime,pages,shipped,persecond)
else
- return format("%s seconds",runtime)
+ return format("%0.3f seconds",runtime)
end
end
end