|
@@ -1,4 +1,4 @@
|
|
|
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
|
|
|
+// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
|
|
|
//
|
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
@@ -173,7 +173,7 @@ public:
|
|
|
/// 1023 values maximum. Search operation on this index generally
|
|
|
/// returns the range of packets that have the same transaction id
|
|
|
/// hash assigned but most often these ranges will be short so further
|
|
|
- /// search within a range to find a packet with pacrticular transaction
|
|
|
+ /// search within a range to find a packet with particular transaction
|
|
|
/// id will not be intensive.
|
|
|
///
|
|
|
/// Example 1: Add elements to the list
|
|
@@ -189,7 +189,7 @@ public:
|
|
|
/// packets_collection.template get<0>().push_back(pkt2);
|
|
|
/// \endcode
|
|
|
///
|
|
|
- /// Example 2: Access elements through sequencial index
|
|
|
+ /// Example 2: Access elements through sequential index
|
|
|
/// \code
|
|
|
/// PktList packets_collection();
|
|
|
/// ... # Add elements to the container
|
|
@@ -242,7 +242,7 @@ public:
|
|
|
>
|
|
|
> PktList;
|
|
|
|
|
|
- /// Packet list iterator for sequencial access to elements.
|
|
|
+ /// Packet list iterator for sequential access to elements.
|
|
|
typedef typename PktList::iterator PktListIterator;
|
|
|
/// Packet list index to search packets using transaction id hash.
|
|
|
typedef typename PktList::template nth_index<1>::type
|
|
@@ -420,7 +420,7 @@ public:
|
|
|
// take a little more expensive approach to look packets using
|
|
|
// alternative index (transaction id & 1023).
|
|
|
PktListTransidHashIndex& idx = sent_packets_.template get<1>();
|
|
|
- // Packets are grouped using trasaction id masked with value
|
|
|
+ // Packets are grouped using transaction id masked with value
|
|
|
// of 1023. For instance, packets with transaction id equal to
|
|
|
// 1, 1024 ... will belong to the same group (a.k.a. bucket).
|
|
|
// When using alternative index we don't find the packet but
|
|
@@ -488,14 +488,14 @@ public:
|
|
|
return(sent_packet);
|
|
|
}
|
|
|
|
|
|
- /// \brief Return minumum delay between sent and received packet.
|
|
|
+ /// \brief Return minimum delay between sent and received packet.
|
|
|
///
|
|
|
/// Method returns minimum delay between sent and received packet.
|
|
|
///
|
|
|
/// \return minimum delay between packets.
|
|
|
double getMinDelay() const { return(min_delay_); }
|
|
|
|
|
|
- /// \brief Return maxmimum delay between sent and received packet.
|
|
|
+ /// \brief Return maximum delay between sent and received packet.
|
|
|
///
|
|
|
/// Method returns maximum delay between sent and received packet.
|
|
|
///
|
|
@@ -536,13 +536,13 @@ public:
|
|
|
getAvgDelay() * getAvgDelay()));
|
|
|
}
|
|
|
|
|
|
- /// \brief Return number of orphant packets.
|
|
|
+ /// \brief Return number of orphan packets.
|
|
|
///
|
|
|
/// Method returns number of received packets that had no matching
|
|
|
/// sent packet. It is possible that such packet was late or not
|
|
|
/// for us.
|
|
|
///
|
|
|
- /// \return number of orphant received packets.
|
|
|
+ /// \return number of orphan received packets.
|
|
|
uint64_t getOrphans() const { return(orphans_); }
|
|
|
|
|
|
/// \brief Return number of garbage collected packets.
|
|
@@ -632,7 +632,8 @@ public:
|
|
|
/// orphans for the 4-way exchanges, which is wrong. We will need to
|
|
|
/// move the orphans counting out of the Statistics Manager so as
|
|
|
/// orphans counter is increased only if the particular message is
|
|
|
- /// not identified as a reponse to any of the messages sent by perfdhcp.
|
|
|
+ /// not identified as a response to any of the messages sent by
|
|
|
+ /// perfdhcp.
|
|
|
void printMainStats() const {
|
|
|
using namespace std;
|
|
|
cout << "sent packets: " << getSentPacketsNum() << endl
|
|
@@ -753,7 +754,7 @@ public:
|
|
|
// when test is completed.
|
|
|
archived_packets_.push_back(*it);
|
|
|
}
|
|
|
- // get<0>() template returns sequencial index to
|
|
|
+ // get<0>() template returns sequential index to
|
|
|
// container.
|
|
|
return(sent_packets_.template get<0>().erase(it));
|
|
|
}
|
|
@@ -786,7 +787,7 @@ public:
|
|
|
/// to keep all packets archived throughout the test.
|
|
|
bool archive_enabled_;
|
|
|
|
|
|
- /// Maxmimum time elapsed between sending and receiving packet
|
|
|
+ /// Maximum time elapsed between sending and receiving packet
|
|
|
/// before packet is assumed dropped.
|
|
|
double drop_time_;
|
|
|
|
|
@@ -797,16 +798,16 @@ public:
|
|
|
double sum_delay_; ///< Sum of delays between sent
|
|
|
///< and received packets.
|
|
|
double sum_delay_squared_; ///< Squared sum of delays between
|
|
|
- ///< sent and recived packets.
|
|
|
+ ///< sent and received packets.
|
|
|
|
|
|
- uint64_t orphans_; ///< Number of orphant received packets.
|
|
|
+ uint64_t orphans_; ///< Number of orphan received packets.
|
|
|
|
|
|
uint64_t collected_; ///< Number of garbage collected packets.
|
|
|
|
|
|
/// Sum of unordered lookup sets. Needed to calculate mean size of
|
|
|
/// lookup set. It is desired that number of unordered lookups is
|
|
|
/// minimal for performance reasons. Tracking number of lookups and
|
|
|
- /// mean size of the lookup set should give idea of packets serach
|
|
|
+ /// mean size of the lookup set should give idea of packets search
|
|
|
/// complexity.
|
|
|
uint64_t unordered_lookup_size_sum_;
|
|
|
|
|
@@ -824,7 +825,7 @@ public:
|
|
|
typedef boost::shared_ptr<ExchangeStats> ExchangeStatsPtr;
|
|
|
/// Map containing all specified exchange types.
|
|
|
typedef typename std::map<ExchangeType, ExchangeStatsPtr> ExchangesMap;
|
|
|
- /// Iterator poiting to \ref ExchangesMap
|
|
|
+ /// Iterator pointing to \ref ExchangesMap
|
|
|
typedef typename ExchangesMap::const_iterator ExchangesMapIterator;
|
|
|
/// Map containing custom counters.
|
|
|
typedef typename std::map<std::string, CustomCounterPtr> CustomCountersMap;
|
|
@@ -877,7 +878,7 @@ public:
|
|
|
/// This method checks if the \ref ExchangeStats object of a particular type
|
|
|
/// exists (has been added using \ref addExchangeStats function).
|
|
|
///
|
|
|
- /// \param xchg_type A type of the exchange being repersented by the
|
|
|
+ /// \param xchg_type A type of the exchange being represented by the
|
|
|
/// \ref ExchangeStats object.
|
|
|
///
|
|
|
/// \return true if the \ref ExchangeStats object has been added for a
|
|
@@ -903,9 +904,9 @@ public:
|
|
|
CustomCounterPtr(new CustomCounter(long_name));
|
|
|
}
|
|
|
|
|
|
- /// \brief Check if any packet drops occured.
|
|
|
+ /// \brief Check if any packet drops occurred.
|
|
|
///
|
|
|
- // \return true, if packet drops occured.
|
|
|
+ // \return true, if packet drops occurred.
|
|
|
bool droppedPackets() const {
|
|
|
for (ExchangesMapIterator it = exchanges_.begin();
|
|
|
it != exchanges_.end();
|
|
@@ -921,7 +922,7 @@ public:
|
|
|
///
|
|
|
/// Method returns specified counter.
|
|
|
///
|
|
|
- /// \param counter_key key poiting to the counter in the counters map.
|
|
|
+ /// \param counter_key key pointing to the counter in the counters map.
|
|
|
/// The short counter name has to be used to access counter.
|
|
|
/// \return pointer to specified counter object.
|
|
|
CustomCounterPtr getCounter(const std::string& counter_key) {
|
|
@@ -937,7 +938,7 @@ public:
|
|
|
///
|
|
|
/// Increment counter value by one.
|
|
|
///
|
|
|
- /// \param counter_key key poiting to the counter in the counters map.
|
|
|
+ /// \param counter_key key pointing to the counter in the counters map.
|
|
|
/// \param value value to increment counter by.
|
|
|
/// \return pointer to specified counter after incrementation.
|
|
|
const CustomCounter& incrementCounter(const std::string& counter_key,
|
|
@@ -992,7 +993,7 @@ public:
|
|
|
return(sent_packet);
|
|
|
}
|
|
|
|
|
|
- /// \brief Return minumum delay between sent and received packet.
|
|
|
+ /// \brief Return minimum delay between sent and received packet.
|
|
|
///
|
|
|
/// Method returns minimum delay between sent and received packet
|
|
|
/// for specified exchange type.
|
|
@@ -1005,7 +1006,7 @@ public:
|
|
|
return(xchg_stats->getMinDelay());
|
|
|
}
|
|
|
|
|
|
- /// \brief Return maxmimum delay between sent and received packet.
|
|
|
+ /// \brief Return maximum delay between sent and received packet.
|
|
|
///
|
|
|
/// Method returns maximum delay between sent and received packet
|
|
|
/// for specified exchange type.
|
|
@@ -1040,14 +1041,14 @@ public:
|
|
|
return(xchg_stats->getStdDevDelay());
|
|
|
}
|
|
|
|
|
|
- /// \brief Return number of orphant packets.
|
|
|
+ /// \brief Return number of orphan packets.
|
|
|
///
|
|
|
- /// Method returns number of orphant packets for specified
|
|
|
+ /// Method returns number of orphan packets for specified
|
|
|
/// exchange type.
|
|
|
///
|
|
|
/// \param xchg_type exchange type.
|
|
|
/// \throw isc::BadValue if invalid exchange type specified.
|
|
|
- /// \return number of orphant packets so far.
|
|
|
+ /// \return number of orphan packets so far.
|
|
|
uint64_t getOrphans(const ExchangeType xchg_type) const {
|
|
|
ExchangeStatsPtr xchg_stats = getExchangeStats(xchg_type);
|
|
|
return(xchg_stats->getOrphans());
|