Article View: borland.public.cppbuilder.nativeapi
Article #4290Re: CPU load - How can I measure it?
From: Alberto
Date: Tue, 07 Feb 2006 22:15
Date: Tue, 07 Feb 2006 22:15
28 lines
2209 bytes
2209 bytes
Bob Gonder wrote: > Alberto wrote: > >> More specifically, I do a digital filtering of audio signals using a FIR >> filter with a variable >> number of taps. What I would like to do is to change dynamically the >> number of taps >> in function of the current CPU load, accepting the worsening of the >> filter performance >> in exchange for a reduced consumption of CPU time, if need be. > > What you are asking doesn't really make sense. > If there is nothing else running, then you will get 100% of the CPU. > OTOH if your programm is running twice, you will get 50%. It makes a perfect sense. The program is driven by external interrupts. At each interrupt some processing must be done, and of course it must be terminated before the next interrupt arrives. So I can have the CPU idle waiting for the next interrupt. And there can be other tasks besides my program running on the PC. So what I need to know is how much headroom I have, so to adjust the complexity of the processing in order to be sure to finish it before the next interrupt occurs. And that headroom is constantly changing in function, as said, of the other tasks being serviced by the CPU. Thanks Alberto di Bene
Technical Details
Message-ID:
<43e91b0d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<43e53514@newsgroups.borland.com> <40bcu1hlup9hqfr2qfnl6ob26jaudlqvmt@4ax.com> <43e68b34$1@newsgroups.borland.com> <bqadu11e4stdsh8bhpqblqalm6t7queu8t@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e1eea742f875d72d X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 07 Feb 2006 23:15:05 +0100 From: Alberto <dibene@usa.net> User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: CPU load - How can I measure it? References: <43e53514@newsgroups.borland.com> <40bcu1hlup9hqfr2qfnl6ob26jaudlqvmt@4ax.com> <43e68b34$1@newsgroups.borland.com> <bqadu11e4stdsh8bhpqblqalm6t7queu8t@4ax.com> In-Reply-To: <bqadu11e4stdsh8bhpqblqalm6t7queu8t@4ax.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 151.46.174.79 Message-ID: <43e91b0d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1139350285 151.46.174.79 (7 Feb 2006 14:11:25 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail