Skip to content

FlowMeasurementRecorder: Clarify confusing parameter names (fixes #1089)#1090

Open
tabgab wants to merge 104 commits intomasterfrom
fix_1089
Open

FlowMeasurementRecorder: Clarify confusing parameter names (fixes #1089)#1090
tabgab wants to merge 104 commits intomasterfrom
fix_1089

Conversation

@tabgab
Copy link

@tabgab tabgab commented Feb 18, 2026

This PR addresses the confusing parameter names in FlowMeasurementRecorder reported in #1089.

Problem

The measure parameter name suggested what gets measured, but it actually controls which measurement types get ended when a flow terminates. This was confusing because:

  • flowName and endMeasurement control flow termination
  • measure controlled measurement types (unrelated to what gets recorded)

Solution

  1. Renamed parameter: measureendMeasurementTypes for clarity
  2. Added comprehensive documentation in the NED file explaining:
    • Flow Termination Parameters (flowName, endMeasurement)
    • Measurement Type Parameters (endMeasurementTypes)
    • The distinction between recording (always happens) and ending (selective)
  3. Backward compatibility: The old measure parameter still works but logs a deprecation warning

Files Changed

  • src/inet/flowmeasurement/FlowMeasurementRecorder.ned - Parameter rename + documentation
  • src/inet/flowmeasurement/FlowMeasurementRecorder.cc - Backward compatibility logic

Backward Compatibility

Existing simulations using the measure parameter will continue to work, but a deprecation warning will be logged encouraging users to migrate to endMeasurementTypes.

Fixes #1089

rhornig and others added 30 commits August 24, 2023 13:39
Some header files had to be rearranged.
Note: Compat.h is meant to be included automatically by INETDefs.h
so it should not be included manually in any files (except Compat.cc)
The "displayTime=..." line produced simtime overflow error,
because indexStart was bogus a huge positive integer.

It was computed as:

auto indexStart = (int)... * durations.size();

which is signed * unsigned multiplication, whose result was signed on Linux,
and unsigned on Windows.

Workaround: factor out durations.size() as int numDurations, to eliminate
mixed-sign multiplications in the code. Also, make indexStart / indexEnd
explicit signed int.
fix for 'all: optimize cancelEvent(x);scheduleAt/After(t, x) calls with rescheduleAt/After(x)'
88c582c
Detected with CHUNK_CHECK_IMPLEMENTATION_ENABLED.
Required for g726 codec in libavcodec: 60.3.100.
Tested with libavcodec: 59.37.100, too.
…ative values.

Previously if the rate of incoming traffic was higher than the rate of outgoing
traffic, the number of tokens statistic could be negative which doesn't really
make sense. The number of tokens statistics is created by emitting values into
the future such that a sawtooth pattern is created.
The actual behavior of the ATS is not influenced by this change because the
number of tokens is just a derived statistic for a virtual token bucket.
…roughput.

Previously the filter emitted 0 but now it either emits nan or inf depending
on what is the value of totalLength.
Other non GDB related inet and omnetpp python packages are not imported anymore.
…ed when there are no rules.

Also, link weights are reset after using the topology.
levy and others added 30 commits October 18, 2024 11:39
…ulations which are not present in the CSV files.
…ding whether it's available or not.

This allows running the sanitizer tests without OSG support, for example.
This simulaion fails with a 'Cannot schedule message to the past' error.
…ion configs.

The release executable is called to determine the number of runs.
The FlowMeasurementRecorder had confusing parameter names that made it
unclear how flow termination and measurement types interact:

- Renamed 'measure' to 'endMeasurementTypes' for clarity
- Added comprehensive documentation explaining:
  * Flow Termination Parameters (flowName, endMeasurement) - which flows to terminate
  * Measurement Type Parameters (endMeasurementTypes) - which measurement types to end
- Added backward compatibility: old 'measure' parameter still works with deprecation warning

Key clarification: All measurements are always recorded (emitted as signals),
but only selected types are actually ended (removed from packet tags) when
the flow terminates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlowMeasurementRecorder parameters are confusing

7 participants