Skip to content
  • Michal Nowikowski's avatar
    [#283,!135] Fixed request rate accuracy issue in perfdhcp introducing 2... · 552e8267
    Michal Nowikowski authored and Michal Nowikowski's avatar Michal Nowikowski committed
    [#283,!135] Fixed request rate accuracy issue in perfdhcp introducing 2 threads (for sending and receiving).
    
    Delays in sending and receiving (e.g. timeout is select) was causing time slips so sending new packets was always late.
    The fix splits receiving into separate thread to not interfere with sending in main thread.
    
    RateController was changed. Now it tracks actual request rate estimating it from the beginning of the test.
    In every iteration of sending main loop it is checked if actual request rate is lower than expected.
    In such case packets are sent immediatelly. This way actual request rate is always accurate.
    
    The receiver thread receives packets from socket using select as before but do not have to worry about delaying sending.
    Read packet are parsed and then passed to main sending thread for further processing.
    This processing involves updating stats, matching with sent packets and issueing responses if necessary.
    
    There have been removed some features that do not make sense after introducing these changes.
    These includes: aggresivity and some custom statistics.
    552e8267