From be18e7ffa08eef276f2007edff95071e986c3b96 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 12 Dec 2022 18:09:48 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Remi Gacogne --- pdns/recursordist/rec-main.cc | 2 +- pdns/recursordist/rec-tcounters.hh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index a74515ff57..b30f7fa262 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -2601,7 +2601,7 @@ int main(int argc, char** argv) #else ::arg().set("stack-size", "stack size per mthread") = "200000"; #endif - // This mode forces metrics snap updates and dsiable root-refresh, to get consistent counters + // This mode forces metrics snap updates and disable root-refresh, to get consistent counters ::arg().setSwitch("devonly-regression-test-mode", "internal use only") = "no"; ::arg().set("soa-minimum-ttl", "Don't change") = "0"; ::arg().set("no-shuffle", "Don't change") = "off"; diff --git a/pdns/recursordist/rec-tcounters.hh b/pdns/recursordist/rec-tcounters.hh index d315192b38..d9f7040a46 100644 --- a/pdns/recursordist/rec-tcounters.hh +++ b/pdns/recursordist/rec-tcounters.hh @@ -95,7 +95,7 @@ enum class Counter : uint8_t numberOfCounters }; -// double avegares times, weighted according to how many packets they processed +// double averages times, weighted according to how many packets they processed enum class DoubleWAvgCounter : uint8_t { avgLatencyUsec, @@ -126,7 +126,7 @@ enum class Histogram : uint8_t struct Counters { - // An aray of simple counters + // An array of simple counters std::array(Counter::numberOfCounters)> uint64Count{}; struct WeightedAverage @@ -187,7 +187,7 @@ struct Counters // for averages, we should take the weights into account. Histograms need to sum all individual counts. Counters& merge(const Counters& data); - // The following accessors select the rightcounter type based on the index type + // The following accessors select the right counter type based on the index type uint64_t& at(Counter index) { return uint64Count.at(static_cast(index)); -- 2.47.2