comp.lang.ada
 help / color / mirror / Atom feed
From: "SteveD" <nospam_steved94@attbi.com>
Subject: Re: Cpu usage in ada?
Date: Wed, 30 Oct 2002 03:38:27 GMT
Date: 2002-10-30T03:38:27+00:00	[thread overview]
Message-ID: <TuIv9.4129$I_5.3704@rwcrnsc53> (raw)
In-Reply-To: GcFv9.2151$w32.17772596@news-text.cableinet.net

And how exactly do different techniques for profiling have anything to do
with monitoring CPU usage?

On W2K right click on the task bar, select "Task Manager", then select the
"Performance" tab.  There is a graph showing CPU usage.  I think the
original poster was asking how he/she could make their own.

SteveD


"Karen" <karen.nussbaum@blueyonder.co.uk> wrote in message
news:GcFv9.2151$w32.17772596@news-text.cableinet.net...
>
> "Sim Con" <sicon@hotmail.com> wrote in message
> news:b4a38a5f675eb2c7e9430d1b934558a4.110780@mygate.mailgate.org...
> > Hello! I need to build a cpu usage meter in ada95 for a windows system.
> > Any help? ^_^ Thanx in advance!!
> >
> >
> > --
> > Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
>
> You have to make a decision of whether you want to poll (recording which
bit
> of code is running), instrument the entry and exit of routines, or simply
> absorb the remaining CPU power and to see what is left.
>
> Polling is not much good if your code is 'synchronised'.  For example a
> program with a few short lived routines (say < 10ms) triggered on a timer
> will not even show up on a polling CPU measurement system (such as is
> available with Windows bundled), as they poll on clock tick boundaries.
If
> the logic is stimulated randomly, then polling can work, but random means
> data arriving from off machine, and even then you can get beating effects.
>
> Building a simple CPU consumer, and forcing it to run low priority is easy
> enough.  Beware, though, of multiple CPU machines - not a problem on
windows
> 98 of course, but it can be for windows 2000 onwards.
>
> If you want to instrument (see how many times code is called), you should
> try some of the free stuff that comes with GNAT (gprof).  Its not so great
> at recording anything other than the main thread, but you can frig it to
> work on one other thread if you work at it a bit.
>
> Good luck!
>
>





  reply	other threads:[~2002-10-30  3:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-29 15:51 Cpu usage in ada? Sim Con
2002-10-29 23:54 ` Karen
2002-10-30  3:38   ` SteveD [this message]
2002-10-30 14:24     ` Ted Dennison
2002-10-30  3:35 ` SteveD
2002-10-30 14:35   ` Ted Dennison
2002-10-30  4:56 ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox