OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0001040OMNeT++examplespublic2018-05-30 12:292018-05-30 12:29
vallejo 
 
normalminoralways
newopen 
x86WindowsVista
5.3 
 
0001040: Queue and PassiveQueue modules of "queueinglib" wrong statistics collection
Queue and PassiveQueue modules incorrectly collect statistics for 0 messages situation.

In Queue::handleMessage, the empty queue situation is handled with the following code:

....
if (queue.isEmpty()) {
    jobServiced = nullptr;
    emit(busySignal, false);
}
....

With this code, the statistics for 0 messages situation are not correctly collected, affecting also the histogram.

A possible solution is to emit the proper signal:

....
if (queue.isEmpty()) {
    jobServiced = nullptr;
    emit(busySignal, false);
    emit(queueLengthSignal, 0); /* Proposed solution */
}
....

The same problem occurs in PassiveQueue:

....
else if (length() == 0) {
    // send through without queueing
    sendJob(job, k);
}
....

could be changed to:

....
else if (length() == 0) {
    // send through without queueing
    emit(queueLengthSignal, 0); /* Proposed solution */
    sendJob(job, k);
}
....
No tags attached.
Issue History
2018-05-30 12:29vallejoNew Issue

There are no notes attached to this issue.