Jump to content
Sign in to follow this  
craigt

'Windowed' reporting time average

Recommended Posts

I would like to see the average reporting time displayed as a trend over the last couple hundred or so reports rather than an average over all reports. This would let me see what my reporting status is for the most recent set of reports.

I would suggest an IIR filter approach rather than a true window -- much less storage and calculation time. A possible implementation (in 'C' pseudo code) is

{

static float Coefficient = 0.02;

static float AverageReportingTime = 0.0;

uint ThisElapsedTime;

AverageReportingTime =

((1.0 - Coefficient) * AverageReportingTime) + (Coefficient * ThisElapsedTime);

}

The value for 'Coefficient' set around 0.02 would display a trend of the most recent hundred or so reports. This could be hard coded as a const or it could be listed in the preferences section although it would probably require a short tutorial to explain its meaning and range (0.0 to 1.0).

The storage size and exection time of the above should compare favorably with what (I assume) is currently employed

{

static ulong NumberOfReports = 0;

static ulong TotalElapsedTime = 0;

static uint AverageReportingTime = 0;

uint ThisElapsedTime;

AverageReportingTime =

(TotalElapsedTime += ThisElapsedTime) / ++NumberOfReports;

}

Edited by craigt

Share this post


Link to post
Share on other sites

Oops, I was in the 'New Feature Request' section; I have no idea how it wound up here. If someone could move it I'd appreciate it.

Share this post


Link to post
Share on other sites
Oops, I was in the 'New Feature Request' section; I have no idea how it wound up here.  If someone could move it I'd appreciate it.

34458[/snapback]

Done.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×