diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/luat-fio.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/luat-fio.lua | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/context/base/luat-fio.lua b/Master/texmf-dist/tex/context/base/luat-fio.lua index 5deb704f607..8e7988c4ee8 100644 --- a/Master/texmf-dist/tex/context/base/luat-fio.lua +++ b/Master/texmf-dist/tex/context/base/luat-fio.lua @@ -10,6 +10,8 @@ local texiowrite_nl = (texio and texio.write_nl) or print local texiowrite = (texio and texio.write) or print local format = string.format +local concat = table.concat +local sequenced = table.sequenced texconfig.kpse_init = false texconfig.shell_escape = 't' @@ -36,6 +38,8 @@ if not resolvers.instance then local register = callbacks.register + -- register('process_jobname' , function(name) return name end, true) + register('find_read_file' , function(id,name) return findtexfile(name) end, true) register('open_read_file' , function( name) return opentexfile(name) end, true) @@ -81,6 +85,34 @@ if not resolvers.instance then end -statistics.register("input load time", function() - return format("%s seconds", statistics.elapsedtime(resolvers.instance)) +local report_system = logs.reporter("system","files") +local report_files = logs.reporter("used files") + +luatex.registerstopactions(function() + local foundintrees = resolvers.instance.foundintrees + if #foundintrees > 0 then + logs.pushtarget("logfile") + logs.newline() + report_system("start used files") + logs.newline() + for i=1,#foundintrees do + report_files("%4i: %s",i,sequenced(foundintrees[i])) + end + logs.newline() + report_system("stop used files") + logs.newline() + logs.poptarget() + end +end) + +statistics.register("resource resolver", function() + local scandata = resolvers.scandata() + return format("loadtime %s seconds, %s scans with scantime %s seconds, %s shared scans, %s found files, scanned paths: %s", + resolvers.loadtime(), + scandata.n, + scandata.time, + scandata.shared, + #resolvers.instance.foundintrees, + concat(scandata.paths," ") + ) end) |