This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cpuload.cxx patch


On Mon, Jul 31, 2006 at 03:50:18PM +0200, Gerster Jochen-B01096 wrote:
> > -  load = 100 - load;
> > +  load = (100 - load)*100;
> 

> yes that's my improvement by multiplying the value with 100 we get two decimal place.
> When you look at the output fkt. we divide the values through 100!

Ah, O.K. Now i follow. Your changeLog entry is misleading.

    Average calculation corrected & improved (the bracket wasn't set
    correct)

The brackets are i think correct for 0-100, but with your change they
are wrong. A better ChangeLog would be

    Accuracy of averaging calculation improved by using internally a
    bigger scale, 0-10000, and rescaling for the API to maintain
    compatibility.


> Executing the test works!
> 
> Can you reproduce this?

I don't have any hardware to hand at the moment. I will try it in a
couple of days when i do.

       Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]