Bug 2127 - Scheduler benchmark utility works correctly in first run only
Scheduler benchmark utility works correctly in first run only
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: general
ns-3.23
PC Linux
: P5 minor
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-28 06:50 UTC by Philipp Andelfinger
Modified: 2015-06-25 00:51 UTC (History)
1 user (show)

See Also:


Attachments
bench simulator fixes (270 bytes, patch)
2015-05-28 06:50 UTC, Philipp Andelfinger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Andelfinger 2015-05-28 06:50:48 UTC
Created attachment 2049 [details]
bench simulator fixes

The benchmark tool in 'utils/bench-simulator.cc' seems to deviate from the intended behavior in the following ways that may cause misleading results:

1. The simulator is destroyed between benchmark runs. Hence, all but the first run fall back to the default map scheduler instead of using the scheduler selected by the user.

2. The variable m_count, which is used to count the number of events already created during a benchmark run, is not reset between runs. Hence, in all but the first run, the event callback returns immediately without creating further events, i.e., no HOLD operations are performed.

3. Trivial issue: (m_total + 1) instead of m_total events are created during the benchmark.

The patch in the attachment attempts to correct the three issues.
Comment 1 Tom Henderson 2015-06-11 13:13:03 UTC
will test and apply if no further comments
Comment 2 Tom Henderson 2015-06-25 00:51:27 UTC
committed in changeset 11464:30814be878cd