Bug 2127

Summary: Scheduler benchmark utility works correctly in first run only
Product: ns-3 Reporter: Philipp Andelfinger <philipp.andelfinger>
Component: generalAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: tomh
Priority: P5    
Version: ns-3.23   
Hardware: PC   
OS: Linux   
Attachments: bench simulator fixes

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