summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/trac-deb.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/trac-deb.lua')
-rw-r--r--tex/context/base/mkiv/trac-deb.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/trac-deb.lua b/tex/context/base/mkiv/trac-deb.lua
index 782be154f..d1168a3a9 100644
--- a/tex/context/base/mkiv/trac-deb.lua
+++ b/tex/context/base/mkiv/trac-deb.lua
@@ -372,3 +372,15 @@ implement { name = "disableexperiments", actions = experiments.disable, argument
implement { name = "showdebuginfo", actions = lmx.showdebuginfo }
implement { name = "overloaderror", actions = lmx.overloaderror }
implement { name = "showlogcategories", actions = logs.show }
+
+directives.register("system.profile",function()
+ luatex.registerstopactions(function()
+ debugger.disable()
+ debugger.savestats("luatex-profile.log")
+ report_nl()
+ logs.report("system","profiler stopped, log saved in %a","luatex-profile.log")
+ report_nl()
+ end)
+ logs.report("system","profiler started")
+ debugger.enable()
+end)