Bug 2205

Summary: Add statistics to Queue
Product: ns-3 Reporter: natale.patriciello
Component: networkAssignee: natale.patriciello
Status: RESOLVED WORKSFORME    
Severity: enhancement CC: tomh
Priority: P5    
Version: pre-release   
Hardware: PC   
OS: Linux   

Description natale.patriciello 2015-11-05 06:59:26 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);
Comment 1 Tom Henderson 2015-11-05 17:21:13 UTC
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.
Comment 2 natale.patriciello 2015-11-06 05:05:33 UTC
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)
Comment 3 natale.patriciello 2017-12-13 05:45:39 UTC
Does not make sense with the new TC layer.