public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jesper Eskilson <jojo@virtutech.se>
To: Cygwin Mailinglist <cygwin@cygwin.com>
Subject: time:ing non-cygwin apps
Date: Wed, 05 Sep 2001 03:57:00 -0000	[thread overview]
Message-ID: <u67lmjtlxeo.fsf@rachel.vtab.com> (raw)

Hi,

I'm trying to get some useful information about the execution time of
non-cygwin app. To illustrate, run the following shell-script:

--[ cygwintime.sh ]--

#!/bin/bash

cat > foo.c <<EOF
int main() {
  int i;
  for (i=0; i < 1000000000; i++);
}
EOF

gcc foo.c -o foo-cygwin
gcc -mno-cygwin foo.c -o foo-native

time ./foo-cygwin
time ./foo-native

--[ ... ]--

On my machine, I get the following output:

[0][SEBASTIAN] ~ -> ./cygwintime.sh

real    0m4.426s
user    0m4.346s
sys     0m0.010s

real    0m4.006s
user    0m0.010s
sys     0m0.010s
[0][SEBASTIAN] ~ ->


Note that the -mno-cygwin application takes almost no user or sys
time, but several seconds real time, as if the time command is unable
to report the time of non-cygwin applications. 

Naturally, I'd like to get similar results in both cases. Is there any
way I can get round this? (Is it a bug or a feature? ;-))

/Jesprer
-- 
-------------------------------------------------------------------------
Jesper Eskilson                                         jojo@virtutech.se
Virtutech                                         http://www.virtutech.se
-------------------------------------------------------------------------

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

             reply	other threads:[~2001-09-05  3:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-05  3:57 Jesper Eskilson [this message]
2001-09-05  8:24 Troy Noble
2001-09-05  8:42 ` Christopher Faylor
2001-09-05  9:06 Troy Noble
2001-09-05  9:09 ` Christopher Faylor

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=u67lmjtlxeo.fsf@rachel.vtab.com \
    --to=jojo@virtutech.se \
    --cc=cygwin@cygwin.com \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).