]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix formatting in dnsdist-metrics.{cc,hh}
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 16 Jun 2023 13:12:57 +0000 (15:12 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 27 Jun 2023 14:13:19 +0000 (16:13 +0200)
pdns/dnsdistdist/dnsdist-metrics.cc
pdns/dnsdistdist/dnsdist-metrics.hh

index 18b4e8330647faf12eadc7afa9c4ce70833d609e..b4c537aaddc60aa9330229b056c5d0cf02572897 100644 (file)
 #include "dnsdist.hh"
 #include "dnsdist-web.hh"
 
-namespace dnsdist::metrics {
+namespace dnsdist::metrics
+{
 
 struct MutableCounter
 {
   MutableCounter() = default;
-  MutableCounter(MutableCounter&& rhs): d_value(rhs.d_value.load())
+  MutableCounter(MutableCounter&& rhs) :
+    d_value(rhs.d_value.load())
   {
   }
 
@@ -40,7 +42,8 @@ struct MutableCounter
 struct MutableGauge
 {
   MutableGauge() = default;
-  MutableGauge(MutableGauge&& rhs): d_value(rhs.d_value.load())
+  MutableGauge(MutableGauge&& rhs) :
+    d_value(rhs.d_value.load())
   {
   }
 
@@ -50,7 +53,8 @@ struct MutableGauge
 static SharedLockGuarded<std::map<std::string, MutableCounter, std::less<>>> s_customCounters;
 static SharedLockGuarded<std::map<std::string, MutableGauge, std::less<>>> s_customGauges;
 
-Stats::Stats(): entries{std::vector<EntryPair>{
+Stats::Stats() :
+  entries{std::vector<EntryPair>{
     {"responses", &responses},
     {"servfail-responses", &servfailResponses},
     {"queries", &queries},
index a44c3c0c646e8bfa45f8fe948cca2b5c649d095f..b14cb804ef300fd3a1af175b3689e4e34593beaf 100644 (file)
@@ -83,7 +83,7 @@ struct Stats
   double latencyTCPAvg100{0}, latencyTCPAvg1000{0}, latencyTCPAvg10000{0}, latencyTCPAvg1000000{0};
   double latencyDoTAvg100{0}, latencyDoTAvg1000{0}, latencyDoTAvg10000{0}, latencyDoTAvg1000000{0};
   double latencyDoHAvg100{0}, latencyDoHAvg1000{0}, latencyDoHAvg10000{0}, latencyDoHAvg1000000{0};
-  using statfunction_t =  std::function<uint64_t(const std::string&)>;
+  using statfunction_t = std::function<uint64_t(const std::string&)>;
   using entry_t = std::variant<stat_t*, pdns::stat_t_trait<double>*, double*, statfunction_t>;
   struct EntryPair
   {