summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/trac-inf.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-08-24 20:03:53 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-08-24 20:03:53 +0200
commit89f7bbac9616406b3990b8608c17c542f5fb476d (patch)
tree9e487938454fd224025391d975ae85dff85a10f8 /tex/context/base/mkiv/trac-inf.lua
parent4ba731dd6ff370a42984b4df050906fd9a884bc8 (diff)
downloadcontext-89f7bbac9616406b3990b8608c17c542f5fb476d.tar.gz
2020-08-24 19:49:00
Diffstat (limited to 'tex/context/base/mkiv/trac-inf.lua')
-rw-r--r--tex/context/base/mkiv/trac-inf.lua39
1 files changed, 16 insertions, 23 deletions
diff --git a/tex/context/base/mkiv/trac-inf.lua b/tex/context/base/mkiv/trac-inf.lua
index daf478199..3db912be1 100644
--- a/tex/context/base/mkiv/trac-inf.lua
+++ b/tex/context/base/mkiv/trac-inf.lua
@@ -223,20 +223,10 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown", environment.texos or "unknown")
end)
- -- register("luatex banner", function()
- -- return lower(status.banner)
- -- end)
- if LUATEXENGINE == "luametatex" then
- register("used engine", function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE, LUATEXVERSION, LUATEXFUNCTIONALITY, LUATEXFORMATID, status.used_compiler)
- end)
- else
- register("used engine", function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE, LUATEXVERSION, LUATEXFUNCTIONALITY, lower(status.banner))
- end)
- end
+ register("used engine", function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE, LUATEXVERSION, LUATEXFUNCTIONALITY, lower(status.banner))
+ end)
register("used hash slots", function()
return format("%s of %s + %s", status.cs_count, status.hash_size,status.hash_extra)
end)
@@ -251,17 +241,11 @@ function statistics.show()
end
end
-- so far
- -- collectgarbage("collect")
register("lua properties",function()
- local hashchar = tonumber(status.luatex_hashchars)
- local mask = lua.mask or "ascii"
+ local hash = 2^status.luatex_hashchars
+ local mask = load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask == "utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua", LUAVERSION, statistics.memused(), hash, mask, mask == "utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline() -- initial newline
@@ -328,3 +312,12 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+
+function status.getreadstate()
+ return {
+ filename = status.filename or "?",
+ linenumber = status.linenumber or 0,
+ iocode = status.inputid or 0,
+ }
+end
+