Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [bug] TIMEFMT=%M reports value in mebibyte, not kibibytes



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