From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,212d0edbd5d28969 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-29 19:38:29 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc53.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: Subject: Re: Cpu usage in ada? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1035949107 12.211.13.75 (Wed, 30 Oct 2002 03:38:27 GMT) NNTP-Posting-Date: Wed, 30 Oct 2002 03:38:27 GMT Organization: AT&T Broadband Date: Wed, 30 Oct 2002 03:38:27 GMT Xref: archiver1.google.com comp.lang.ada:30213 Date: 2002-10-30T03:38:27+00:00 List-Id: 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" wrote in message news:GcFv9.2151$w32.17772596@news-text.cableinet.net... > > "Sim Con" 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! > >