[NTG-context] environment variable for runtime

Hans Hagen j.hagen at xs4all.nl
Wed Feb 27 16:19:14 CET 2019


On 2/26/2019 5:14 PM, Thomas A. Schmitz wrote:
> Hi,
> 
> I would like to typeset the runtime information that context displays at 
> the end of typesetting:
> 
> mkiv lua stats  > runtime: 174.639 seconds, 913 processed pages, 913 
> shipped pages, 5.228 pages/second
> system          | total runtime: 526.583 seconds
> 
> Is this stored in any environment key? How could I access it?
it's in the log file:

local data    = io.loaddata("oeps.log") or ""
local pattern = "> runtime: ([%d%.]+) seconds, ([%d]+) processed pages, 
([%d]+) shipped pages, ([%d%.]+) pages/second"

local r, n, s, p = string.match(data,pattern)

print(r,n,s,p)



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list