zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@fysh.org>
To: =?unknown-8bit?Q?Ra=FAl_N=FA=F1ez?= de Arenas Coronado
	<raul@viadomus.com>
Cc: Zsh <zsh-workers@sunsite.dk>
Subject: Re: Maybe a bug?
Date: Wed, 2 Jan 2002 22:36:41 +0000	[thread overview]
Message-ID: <20020102223641.GB28822@fysh.org> (raw)
In-Reply-To: <E16LthG-0004w2-00@DervishD.viadomus.com>

Ra?l N??ez de Arenas Coronado wrote:
>    Well, the matter now is that the builtin 'time' command report
>wrong numbers when the measured time is slow. First of all, it tends
>too much to give '0.000' as the elapsed time, even if the user or
>kernel times are not 0. The elapsed time should be, at least, the sum
>of user and kernel time, shouldn't it?.

Strictly speaking no; on a multi-processor system one can use more CPU
time than elapsed wall time, by using CPU time on more than one processor
simultaneously.  What you're more likely seeing, though, is differences
in the way CPU time and wall time are counted.  That's up to the kernel,
and there's nothing zsh can do to fix it.

>    The other issue is a possible bug with the percentage escape
>sequence. When the elapsed time is 0, it obviously reports a wrong
>CPU percentage usage... It should return 0, not 18887% as it uses.

Obviously the elapsed time is not zero in this case, it's just too
small to show as non-zero in the output format we use.  We used to cap
displayed CPU usage to 100% in these cases (where elapsed time is less
than CPU time), but removed that because of the multi-processor issue
-- it can be correct to show more than 100% CPU usage (if the program
averaged using more than one CPU at a time).

-zefram


  reply	other threads:[~2002-01-02 22:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-02 22:17 Raúl Núñez de Arenas Coronado
2002-01-02 22:36 ` Zefram [this message]
2002-01-02 23:08 Raúl Núñez de Arenas Coronado

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=20020102223641.GB28822@fysh.org \
    --to=zefram@fysh.org \
    --cc=raul@viadomus.com \
    --cc=zsh-workers@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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