You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
queueing: Fix CompoundPacketQueueBase statistics counting inner submodule signals when warmup-period is set
The signal-source statistics (incoming/outgoing packets, packet lengths,
data rates, queueing times, dropped packets, and the flow-specific rates)
use the localSignal() result filter so that the compound queue records only
its own packetPushStarted/packetPulled/... signals and ignores the identical
signals emitted by its inner submodules (the contained queues and the
scheduler), which otherwise propagate up the module hierarchy.
localSignal() can only test the signal source when it is the head of the
result-filter chain (its receiveSignal(cComponent*, ...) overloads); once it
receives values from an upstream filter it forwards them unconditionally.
When warmup-period is set, OMNeT++ inserts an automatic WarmupPeriodFilter at
the head of the chain (unless autoWarmupFilter=false), demoting localSignal
and turning it into a no-op. The compound queue then also counts the
packetPulled signals of its inner queue and scheduler, inflating e.g.
outgoingDataRate by 3x (inner queue + scheduler + compound) and driving
queueLength negative.
Fix each affected statistic the way queueLength/queueBitLength already do it:
set autoWarmupFilter=false to suppress the auto-inserted filter, and wrap the
source in an explicit warmup() outside localSignal() so localSignal stays at
the head while warmup semantics are preserved. No effect when warmup-period
is 0.
// the statistical value is the flow specific data rate of the incoming packets
57
-
@statistic[flowIncomingDataRate](title="flow specific incoming data rate"; source=throughput(flowPacketLength(demuxFlow(localSignal(packetPushStarted)))); record=vector; unit=bps; interpolationmode=linear);
57
+
@statistic[flowIncomingDataRate](title="flow specific incoming data rate"; source=throughput(flowPacketLength(demuxFlow(warmup(localSignal(packetPushStarted))))); record=vector; unit=bps; interpolationmode=linear; autoWarmupFilter=false);
58
58
// the statistical value is the flow specific data rate of the outgoing packets
59
-
@statistic[flowOutgoingDataRate](title="flow specific outgoing data rate"; source=throughput(flowPacketLength(demuxFlow(localSignal(packetPulled)))); record=vector; unit=bps; interpolationmode=linear);
59
+
@statistic[flowOutgoingDataRate](title="flow specific outgoing data rate"; source=throughput(flowPacketLength(demuxFlow(warmup(localSignal(packetPulled))))); record=vector; unit=bps; interpolationmode=linear; autoWarmupFilter=false);
0 commit comments