On 11 April 2016 at 13:05, Nicklas Karlsson <[email protected]> wrote:
> Is is rather straightforward to calculate from for example the last 100 > arrival times but a moving average algorithm would be preferred to reduce CPU > load. Do anybody have any ideas? The simplest implementation of a moving-average is probably: For a gain fraction from 0 to 0.5 where 0.1 gives a 10-sample average: new = old * (1 - gain) + new * gain It works better if pre-loaded with the first sample and it is not any sort of ideal filter as historical values are never actually lost, just diluted. A true rolling average needs to store N-samples in a buffer then subtract oldest/N and add newest/N. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
