Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [bug] TIMEFMT=%M reports value in mebibyte, not kibibytes
- X-seq: zsh-workers 49087
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [bug] TIMEFMT=%M reports value in mebibyte, not kibibytes
- Date: Fri, 18 Jun 2021 21:10:09 +0100
- Archived-at: <https://zsh.org/workers/49087>
- In-reply-to: <20210618194848.oias7xvwvaol77bn@chazelas.org>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- References: <20210618194848.oias7xvwvaol77bn@chazelas.org>
2021-06-18 20:48:48 +0100, Stephane Chazelas:
[...]
> So we end up with a value in mebibytes:
[...]
> Same happens for REPORTMEMORY handling.
[...]
Also, the problem with zsh's time as opposed to a standalone
time utility is that since it prints the resource of processes
when they exit, in
time uname
Since it's a child of zsh that executes uname, the max rss is
likely to be that of zsh rather than that of uname (which is
likely to use very little memory of its own).
The standalone time has the same problem, but its own memory
footprint is minimal, so it's less likely to be a problem there:
$ a=${(l[100000000])}
$ (TIMEFMT=%M; time uname)
Linux
193 (MiB)
~$ command time -f %M uname
Linux
1756 (KiB)
Not sure what can be done about it (other than document the
limitation).
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author