summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-profile.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-03-21 15:00:17 +0200
committerMarius <mariausol@gmail.com>2013-03-21 15:00:17 +0200
commit6bb39561d4571fb85aac56a686b837a9f3c910cd (patch)
tree87f9b55ac771b742532fec258c637c0b15ec7dae /scripts/context/lua/mtx-profile.lua
parent41df6a896ad3ab1d8bb6286423e9540b2b34f576 (diff)
downloadcontext-6bb39561d4571fb85aac56a686b837a9f3c910cd.tar.gz
beta 2013.03.21 13:42
Diffstat (limited to 'scripts/context/lua/mtx-profile.lua')
-rw-r--r--scripts/context/lua/mtx-profile.lua20
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/context/lua/mtx-profile.lua b/scripts/context/lua/mtx-profile.lua
index 35cf1fc47..3550474f3 100644
--- a/scripts/context/lua/mtx-profile.lua
+++ b/scripts/context/lua/mtx-profile.lua
@@ -12,8 +12,22 @@ if not modules then modules = { } end modules ['mtx-profile'] = {
local match, format, find = string.match, string.format, string.find
local helpinfo = [[
---analyze analyze lua calls
---trace analyze tex calls
+<?xml version="1.0"?>
+<application>
+ <metadata>
+ <entry name="name">mtx-profile</entry>
+ <entry name="detail">ConTeXt MkIV LuaTeX Profiler</entry>
+ <entry name="version">1.00</entry>
+ </metadata>
+ <flags>
+ <category name="basic">
+ <subcategory>
+ <flag name="analyze"><short>analyze lua calls</short></flag>
+ <flag name="trace"><short>analyze tex calls</short></flag>
+ </subcategory>
+ </category>
+ </flags>
+</application>
]]
local application = logs.application {
@@ -166,6 +180,8 @@ if environment.argument("analyze") then
scripts.profiler.analyze(environment.files[1] or "luatex-profile.log")
elseif environment.argument("trace") then
scripts.profiler.analyze(environment.files[1] or "temp.log")
+elseif environment.argument("exporthelp") then
+ application.export(environment.argument("exporthelp"),environment.files[1])
else
application.help()
end