summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/m-timing.mkiv
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-22 22:14:39 +0000
committerKarl Berry <karl@freefriends.org>2016-04-22 22:14:39 +0000
commitfc4466b32ed330a956ac603b00fd145524cff49a (patch)
tree2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base/m-timing.mkiv
parent50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff)
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-timing.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/m-timing.mkiv102
1 files changed, 0 insertions, 102 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-timing.mkiv b/Master/texmf-dist/tex/context/base/m-timing.mkiv
deleted file mode 100644
index 5502768f697..00000000000
--- a/Master/texmf-dist/tex/context/base/m-timing.mkiv
+++ /dev/null
@@ -1,102 +0,0 @@
-%D \module
-%D [ file=m-timing,
-%D version=2007.12.23,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Timing,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\ifdefined\ShowNamedUsage \endinput \fi
-
-%D Written at the end of 2007, this module is dedicated to Taco. Reaching this
-%D point in \LUATEX\ was a non trivial effort. By visualizing a bit what happens
-%D when pages come out of \LUATEX, you may get an idea what is involved. It took
-%D much time an dedication to reach this point in the development. Add to that
-%D those daily Skype intense discussion, testing and debugging moments. Time flies
-%D but progress is impressive. The motto of this module could be: what you see
-%D is what you get. An there is much more to come \unknown.
-
-% \usemodule[timing]
-% \setupcolors[state=start]
-% \starttext
-% \dorecurse{200}{\input tufte \par} \ShowUsage{}
-% \stoptext
-
-\definecolor[usage:line] [darkred]
-\definecolor[usage:time] [darkblue]
-\definecolor[usage:frame][darkgray]
-
-\ctxloadluafile{trac-tim}{}
-
-\startluacode
-local progress = moduledata.progress
-
-function progress.show(filename,parameters,nodes,other)
- for n, name in pairs(parameters or progress.parameters()) do
- context.ShowNamedUsage(filename or progress.defaultfilename,name,other or "")
- end
- for n, name in pairs(nodes or progress.nodes(filename)) do
- context.ShowNamedUsage(filename or progress.defaultfilename,name,other or "")
- end
-end
-\stopluacode
-
-% \everyfirstshipout
-
-\startnotmode[no-timing]
- \appendtoks\ctxlua{moduledata.progress.store()}\to\everystarttext
- \appendtoks\ctxlua{moduledata.progress.store()}\to\everyshipout
- \ctxlua{luatex.registerstopactions(function() moduledata.progress.save() end)}
-\stopnotmode
-
-\unexpanded\def\ShowNamedUsage#1#2#3%
- {\setbox\scratchbox\vbox\bgroup
- \startMPcode
- begingroup ; save p, q, b, h, w ;
- path p, q, b ; numeric h, w ;
- p := \cldcontext{moduledata.progress.path("#1","#2")} ;
- % p := p shifted -llcorner p ;
- if bbwidth(p) > 0 :
- h := 100 ; w := 2 * h ;
- w := \the\textwidth-3pt ; % correct for pen
- p := p xstretched w ;
- b := boundingbox (llcorner p -- llcorner p shifted (w,h)) ;
- pickup pencircle scaled 3pt ; linecap := butt ;
- draw b withcolor \MPcolor{usage:frame} ;
- draw p withcolor \MPcolor{usage:line} ;
- if ("#3" <> "") and ("#3" <> "#2") :
- q := \cldcontext{moduledata.progress.path("#1","#3")} ;
- % q := q shifted -llcorner q ;
- if bbwidth(q) > 1 :
- q := q xstretched w ;
- pickup pencircle scaled 1.5pt ; linecap := butt ;
- draw q withcolor \MPcolor{usage:time} ;
- fi ;
- fi ;
- fi ;
- endgroup ;
- \stopMPcode
- \egroup
- \scratchdimen\wd\scratchbox
- \ifdim\scratchdimen>\zeropoint
- \startlinecorrection
- \box\scratchbox \endgraf
- \hbox to \scratchdimen{\tttf\strut\detokenize{#2}\hss
- min:\cldcontext{moduledata.progress.bot("#1","\detokenize{#2}")}, %
- max:\cldcontext{moduledata.progress.top("#1","\detokenize{#2}")}, %
- pages:\cldcontext{moduledata.progress.pages("#1")}%
- }%
- \stoplinecorrection
- \fi}
-
-\unexpanded\def\LoadUsage #1{\ctxlua{moduledata.progress.convert("#1")}}
-\unexpanded\def\ShowUsage #1{\ctxlua{moduledata.progress.show("#1",nil,nil,"elapsed_time")}}
-\unexpanded\def\ShowMemoryUsage#1{\ctxlua{moduledata.progress.show("#1",nil,{}, "elapsed_time")}}
-\unexpanded\def\ShowNodeUsage #1{\ctxlua{moduledata.progress.show("#1",{},nil, "elapsed_time")}}
-
-\endinput