ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	"Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
Subject: Re: environment variable for runtime
Date: Wed, 27 Feb 2019 16:19:14 +0100	[thread overview]
Message-ID: <02ff480f-e134-e129-7cde-6f8509e855c4@xs4all.nl> (raw)
In-Reply-To: <80232793-9db2-3c9c-4759-1a6f7be21660@uni-bonn.de>

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2019-02-27 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 16:14 Thomas A. Schmitz
2019-02-27 15:19 ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02ff480f-e134-e129-7cde-6f8509e855c4@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=thomas.schmitz@uni-bonn.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).