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

Re: 101% system resource usage



Nikolai Weibull wrote:
> grep -c 'a*' test.file: real: 1.212 user: 1.140 system: 0.090 (101%)

In fact the calculation (printtime() in jobs.c) always rounds down
(though I'm not sure why it's done the way it is; it effectively
recalculates three floating point numbers it's already calculated).

It may be an artifact of the way the start of real time is only recorded
by the shell after the process is forked (and the end of real time after
it finishes), while the time of process execution is recorded by the
operating system itself and so is more accurate.  If there's a
significant gap due to scheduling the `real' time may be too short.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk



Messages sorted by: Reverse Date, Date, Thread, Author