Permalink
Browse files

new metric, failed-host-entries

  • Loading branch information...
1 parent cc08b5a commit 406f46f9aa861118b124652680febc164e53c33c @ahupowerdns ahupowerdns committed Apr 3, 2014
Showing with 15 additions and 1 deletion.
  1. +11 −0 pdns/rec_channel_rec.cc
  2. +4 −1 pdns/syncres.hh
@@ -313,6 +313,16 @@ uint64_t getNegCacheSize()
return broadcastAccFunction<uint64_t>(pleaseGetNegCacheSize);
}
+uint64_t* pleaseGetFailedHostsSize()
+{
+ uint64_t tmp=t_sstorage->fails.size();
+ return new uint64_t(tmp);
+}
+uint64_t getFailedHostsSize()
+{
+ return broadcastAccFunction<uint64_t>(pleaseGetFailedHostsSize);
+}
+
uint64_t* pleaseGetNsSpeedsSize()
{
return new uint64_t(t_sstorage->nsSpeeds.size());
@@ -484,6 +494,7 @@ RecursorControlParser::RecursorControlParser()
addGetStat("throttle-entries", boost::bind(getThrottleSize));
addGetStat("nsspeeds-entries", boost::bind(getNsSpeedsSize));
+ addGetStat("failed-host-entries", boost::bind(getFailedHostsSize));
addGetStat("concurrent-queries", boost::bind(getConcurrentQueries));
addGetStat("outgoing-timeouts", &SyncRes::s_outgoingtimeouts);
View
@@ -220,7 +220,10 @@ public:
d_cont.erase(i);
}
}
-
+ size_t size()
+ {
+ return d_cont.size();
+ }
private:
typedef map<Thing,unsigned long> cont_t;
cont_t d_cont;

0 comments on commit 406f46f

Please sign in to comment.