BIND 10 master, updated. e9556924dcd1cf285dc358c47d65ed7c413e02cf [2785] Merge branch 'trac2785'. Corrects packet time statistics in perfdhcp.

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Apr 12 18:41:37 UTC 2013


The branch, master has been updated
       via  e9556924dcd1cf285dc358c47d65ed7c413e02cf (commit)
       via  fbfd9a49b562e3f5532e87ad801baf82c6b7a912 (commit)
      from  c16ff5e78c1a0f80c57ce8fb7235674b839fef81 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e9556924dcd1cf285dc358c47d65ed7c413e02cf
Merge: c16ff5e fbfd9a4
Author: Thomas Markwalder <tmark at isc.org>
Date:   Fri Apr 12 14:40:12 2013 -0400

    [2785] Merge branch 'trac2785'. Corrects packet time statistics in
    perfdhcp.

-----------------------------------------------------------------------

Summary of changes:
 tests/tools/perfdhcp/stats_mgr.h |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/stats_mgr.h b/tests/tools/perfdhcp/stats_mgr.h
index 2ad5aa9..c51ba6d 100644
--- a/tests/tools/perfdhcp/stats_mgr.h
+++ b/tests/tools/perfdhcp/stats_mgr.h
@@ -262,7 +262,8 @@ public:
         /// In this mode all packets are stored throughout the test execution.
         ExchangeStats(const ExchangeType xchg_type,
                       const double drop_time,
-                      const bool archive_enabled)
+                      const bool archive_enabled,
+                      const boost::posix_time::ptime boot_time)
             : xchg_type_(xchg_type),
               sent_packets_(),
               rcvd_packets_(),
@@ -279,7 +280,8 @@ public:
               unordered_lookups_(0),
               ordered_lookups_(0),
               sent_packets_num_(0),
-              rcvd_packets_num_(0)
+              rcvd_packets_num_(0),
+              boot_time_(boot_time)
         {
             next_sent_ = sent_packets_.begin();
         }
@@ -699,9 +701,8 @@ public:
                                       "packet time is not set");
                         }
                         // Calculate durations of packets from beginning of epoch.
-                        ptime epoch_time(min_date_time);
-                        time_period sent_period(epoch_time, sent_time);
-                        time_period rcvd_period(epoch_time, rcvd_time);
+                        time_period sent_period(boot_time_, sent_time);
+                        time_period rcvd_period(boot_time_, rcvd_time);
                         // Print timestamps for sent and received packet.
                         std::cout << "sent / received: "
                                   << to_iso_string(sent_period.length())
@@ -803,6 +804,7 @@ public:
 
         uint64_t sent_packets_num_;    ///< Total number of sent packets.
         uint64_t rcvd_packets_num_;    ///< Total number of received packets.
+        boost::posix_time::ptime boot_time_; ///< Time when test is started.
     };
 
     /// Pointer to ExchangeStats.
@@ -853,7 +855,8 @@ public:
         exchanges_[xchg_type] =
             ExchangeStatsPtr(new ExchangeStats(xchg_type,
                                                drop_time,
-                                               archive_enabled_));
+                                               archive_enabled_,
+                                               boot_time_));
     }
 
     /// \brief Add named custom uint64 counter.



More information about the bind10-changes mailing list