Bugzilla – Bug 2205
Add statistics to Queue
Last modified: 2017-12-13 05:45:39 UTC
The code commented, right now: // average calculation requires keeping around // a buffer with the date of arrival of past received packets // which are within the average window // so, it is quite costly to do it all the time. // Hence, it is disabled by default and must be explicitely // enabled with this method which specifies the size // of the average window in time units. void EnableRunningAverage (Time averageWindow); void DisableRunningAverage (void); // average double GetQueueSizeAverage (void); double GetReceivedBytesPerSecondAverage (void); double GetReceivedPacketsPerSecondAverage (void); double GetDroppedBytesPerSecondAverage (void); double GetDroppedPacketsPerSecondAverage (void); // variance double GetQueueSizeVariance (void); double GetReceivedBytesPerSecondVariance (void); double GetReceivedPacketsPerSecondVariance (void); double GetDroppedBytesPerSecondVariance (void); double GetDroppedPacketsPerSecondVariance (void);
Is this something you are requesting patch for, or to flag that you are working on it? These methods have been around unimplemented for a long time. It may be the case now that we should instead just have the queues export events as trace sources and let other code hook and compute the statistics, and provide helper methods to do that easily. So I suggest to sketch out how you expect this to be used, and whether the DCF code should be leveraged to provide the statistics.
I prefer to have it on bugtracker than #ifdef'd in the code, in order to have a list of things to do. Anyway, I am working on the Queue subsystem; I am not sure on how providing these API, however: I agree on exporting Traces, and let the users do these kind of statistics by elaborating data traces (or through a class in the stats module, for example)
Does not make sense with the new TC layer.