help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: Documentation of the TIMEFMT variable
Date: Sun, 5 Feb 2023 08:36:39 +0000	[thread overview]
Message-ID: <20230205083639.GB7704@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20230203205244.bfq7a3zqcs64rtbe@chazelas.org>

Stephane Chazelas wrote on Fri, Feb 03, 2023 at 20:52:44 +0000:
> 2023-02-02 11:33:56 -0800, Bart Schaefer:
> > On Thu, Feb 2, 2023 at 8:54 AM trillian
> > <just.so.you.can.email.me@gmail.com> wrote:
> > >
> > > The documentation of TIMEFMT says that %M means "The  maximum memory the
> > > process had in use at any time in kilobytes", but the actual value shown
> > > is in megabytes. (The kernel reports it in kilobytes and zsh divides it
> > > by 1024 again.)
> > 
> > This has been reported twice before, although after looking at the
> > previous two reports I'm not sure if this is a documentation error or
> > a coding error or (OS-dependently) both.  Anyone?
> A portability issue. Doc is correct, but code is only correct on
> Darwin/macos. GNU time's autoconf has some info on the subject
> It's been reported many times here. See workers/45489,
> workers/42363, workers/30399, workers/49145.
> macos/darwin is the odd one out. ru_maxrss was already in
> kibibytes in the original getrusage() implementation in BSD4.2
> in 1985.

Another consideration: the doc states that %X and %D are also given
in KB.  Assuming that for these two the implementation does in fact
match the docs, changing the implementation of %M to match the docs
would result in %M/%X/%D all expanding to values in KB, which seems
preferable to having some of them expand to values in KB and some to
values in MB.



  reply	other threads:[~2023-02-05  8:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 16:53 trillian
2023-02-02 17:53 ` Daniel Shahaf
2023-02-02 19:33 ` Bart Schaefer
2023-02-03 20:52   ` Stephane Chazelas
2023-02-05  8:36     ` Daniel Shahaf [this message]
2023-03-24 10:25     ` Jun T
2023-03-24 14:43       ` Oliver Kiddle
2023-03-27  0:55         ` Jun T

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:

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

  git send-email \
    --in-reply-to=20230205083639.GB7704@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \


* 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.
Code repositories for project(s) associated with this public inbox


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).