summaryrefslogtreecommitdiffstats
path: root/src/bin/perfdhcp/stats_mgr.cc
diff options
context:
space:
mode:
authorMichal Nowikowski <godfryd@isc.org>2019-02-13 14:55:23 +0100
committerMichal Nowikowski <godfryd@isc.org>2019-02-19 21:54:31 +0100
commitd624387bdcaf858493e3027e606a6c3c354c9d72 (patch)
tree82d8b5d0527a5e4f6ff797e775e872e5a8d18840 /src/bin/perfdhcp/stats_mgr.cc
parentperfdhcp avalanche: added ipv6 part (diff)
downloadkea-d624387bdcaf858493e3027e606a6c3c354c9d72.tar.xz
kea-d624387bdcaf858493e3027e606a6c3c354c9d72.zip
perdhcp avalanche: removed ignore_timestamp_reorder and added correcting pkt timestamp to fix negative RTT issue
Diffstat (limited to 'src/bin/perfdhcp/stats_mgr.cc')
-rw-r--r--src/bin/perfdhcp/stats_mgr.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/bin/perfdhcp/stats_mgr.cc b/src/bin/perfdhcp/stats_mgr.cc
index bc8fe641a1..bd741e31ed 100644
--- a/src/bin/perfdhcp/stats_mgr.cc
+++ b/src/bin/perfdhcp/stats_mgr.cc
@@ -37,8 +37,7 @@ std::ostream& operator<<(std::ostream& os, ExchangeType xchg_type)
ExchangeStats::ExchangeStats(const ExchangeType xchg_type,
const double drop_time,
const bool archive_enabled,
- const boost::posix_time::ptime boot_time,
- bool ignore_timestamp_reorder)
+ const boost::posix_time::ptime boot_time)
: xchg_type_(xchg_type),
sent_packets_(),
rcvd_packets_(),
@@ -56,8 +55,7 @@ ExchangeStats::ExchangeStats(const ExchangeType xchg_type,
ordered_lookups_(0),
sent_packets_num_(0),
rcvd_packets_num_(0),
- boot_time_(boot_time),
- ignore_timestamp_reorder_(ignore_timestamp_reorder)
+ boot_time_(boot_time)
{
next_sent_ = sent_packets_.begin();
}
@@ -89,7 +87,7 @@ ExchangeStats::updateDelays(const dhcp::PktPtr& sent_packet,
double delta =
static_cast<double>(period.length().total_nanoseconds()) / 1e9;
- if (!ignore_timestamp_reorder_ && delta < 0) {
+ if (delta < 0) {
isc_throw(Unexpected, "Sent packet's timestamp must not be "
"greater than received packet's timestamp in "
<< xchg_type_ << ".\nTime difference: "
@@ -315,10 +313,9 @@ ExchangeStats::printTimestamps() {
}
}
-StatsMgr::StatsMgr(bool ignore_timestamp_reorder) :
+StatsMgr::StatsMgr() :
exchanges_(),
- boot_time_(boost::posix_time::microsec_clock::universal_time()),
- ignore_timestamp_reorder_(ignore_timestamp_reorder)
+ boot_time_(boost::posix_time::microsec_clock::universal_time())
{
CommandOptions& options = CommandOptions::instance();