• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PowerDNS / pdns / 25593053054

09 May 2026 05:35AM UTC coverage: 71.093% (+10.2%) from 60.856%
25593053054

Pull #17310

github

web-flow
build(deps): bump mistune from 3.2.0 to 3.2.1 in /pdns/recursordist/docs

Bumps [mistune](https://github.com/lepture/mistune) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/lepture/mistune/releases)
- [Changelog](https://github.com/lepture/mistune/blob/main/docs/changes.rst)
- [Commits](https://github.com/lepture/mistune/compare/v3.2.0...v3.2.1)

---
updated-dependencies:
- dependency-name: mistune
  dependency-version: 3.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #17310: build(deps): bump mistune from 3.2.0 to 3.2.1 in /pdns/recursordist/docs

46069 of 80916 branches covered (56.93%)

Branch coverage included in aggregate %.

132158 of 169780 relevant lines covered (77.84%)

10941800.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.28
/pdns/statnode.cc
1
#include "statnode.hh"
2

3
StatNode::Stat StatNode::print(unsigned int depth, Stat newstat, bool silent) const
4
{
×
5
  if(!silent) {
×
6
    cout<<string(depth, ' ');
×
7
    cout<<name<<": "<<endl;
×
8
  }
×
9
  Stat childstat;
×
10
  childstat.queries += s.queries;
×
11
  childstat.noerrors += s.noerrors;
×
12
  childstat.nxdomains += s.nxdomains;
×
13
  childstat.servfails += s.servfails;
×
14
  childstat.drops += s.drops;
×
15
  childstat.bytes += s.bytes;
×
16
  childstat.hits += s.hits;
×
17

18
  if(children.size()>1024 && !silent) {
×
19
    cout<<string(depth, ' ')<<name<<": too many to print"<<endl;
×
20
  }
×
21
  for(const children_t::value_type& child :  children) {
×
22
    childstat=child.second.print(depth+8, childstat, silent || children.size()>1024);
×
23
  }
×
24
  if(!silent || children.size()>1)
×
25
    cout<<string(depth, ' ')<<childstat.queries<<" queries, " << 
×
26
      childstat.noerrors<<" noerrors, "<< 
×
27
      childstat.nxdomains<<" nxdomains, "<< 
×
28
      childstat.servfails<<" servfails, "<< 
×
29
      childstat.drops<<" drops, "<<
×
30
      childstat.bytes<<" bytes, "<<
×
31
      childstat.hits<<" hits"<<endl;
×
32

33
  newstat+=childstat;
×
34

35
  return newstat;
×
36
}
×
37

38
void StatNode::visit(const visitor_t& visitor, Stat& newstat, unsigned int depth) const
39
{
2,119✔
40
  Stat childstat(s);
2,119✔
41

42
  for (const auto& child : children) {
2,119✔
43
    child.second.visit(visitor, childstat, depth+8);
2,104✔
44
  }
2,104✔
45

46
  visitor(this, s, childstat);
2,119✔
47

48
  newstat += childstat;
2,119✔
49
}
2,119✔
50

51
void StatNode::submit(const DNSName& domain, int rcode, unsigned int bytes, bool hit, const std::optional<ComboAddress>& remote, size_t samplingRate)
52
{
2,055✔
53
  //  cerr<<"FIRST submit called on '"<<domain<<"'"<<endl;
54
  std::vector<string> tmp = domain.getRawLabels();
2,055✔
55
  if (tmp.empty()) {
2,055!
56
    return;
×
57
  }
×
58

59
  auto last = tmp.end() - 1;
2,055✔
60
  children[*last].submit(last, tmp.begin(), g_rootdnsname, rcode, bytes, remote, 1, hit, samplingRate);
2,055✔
61
}
2,055✔
62

63
static uint64_t adjustForSampling(uint32_t count, size_t samplingRate)
64
{
6,168✔
65
  if (samplingRate > 0) {
6,168!
66
    return count * samplingRate;
×
67
  }
×
68
  return count;
6,168✔
69
}
6,168✔
70

71

72
/* www.powerdns.com. ->
73
   .                 <- fullnames
74
   com.
75
   powerdns.com
76
   www.powerdns.com. 
77
*/
78

79
void StatNode::submit(std::vector<string>::const_iterator end, std::vector<string>::const_iterator begin, const DNSName& domain, int rcode, unsigned int bytes, const std::optional<ComboAddress>& remote, unsigned int count, bool hit, size_t samplingRate)
80
{
8,230✔
81
  //  cerr<<"Submit called for domain='"<<domain<<"': ";
82
  //  for(const std::string& n :  labels) 
83
  //    cerr<<n<<".";
84
  //  cerr<<endl;
85
  if (name.empty()) {
8,230✔
86

87
    name=*end;
2,104✔
88
    //    cerr<<"Set short name to '"<<name<<"'"<<endl;
89
  }
2,104✔
90
  else {
6,126✔
91
    //    cerr<<"Short name was already set to '"<<name<<"'"<<endl;
92
  }
6,126✔
93

94
  if (end == begin) {
8,230✔
95
    if (fullname.empty()) {
2,055✔
96
      fullname = domain;
2,054✔
97
      fullname.prependRawLabel(name);
2,054✔
98
      labelsCount = count;
2,054✔
99
    }
2,054✔
100
    //    cerr<<"Hit the end, set our fullname to '"<<fullname<<"'"<<endl<<endl;
101
    s.queries += adjustForSampling(1U, samplingRate);
2,055✔
102
    s.bytes += adjustForSampling(bytes, samplingRate);
2,055✔
103
    if (rcode < 0) {
2,055!
104
      s.drops += adjustForSampling(1U, samplingRate);
×
105
    }
×
106
    else if (rcode == RCode::NoError) {
2,055✔
107
      s.noerrors += adjustForSampling(1U, samplingRate);
2,051✔
108
    }
2,051✔
109
    else if (rcode == RCode::ServFail) {
4!
110
      s.servfails += adjustForSampling(1U, samplingRate);
4✔
111
    }
4✔
112
    else if (rcode == RCode::NXDomain) {
×
113
      s.nxdomains += adjustForSampling(1U, samplingRate);
×
114
    }
×
115

116
    if (remote) {
2,055!
117
      s.remotes[*remote]++;
×
118
    }
×
119

120
    if (hit) {
2,055✔
121
      s.hits += adjustForSampling(1U, samplingRate);
3✔
122
    }
3✔
123
  }
2,055✔
124
  else {
6,175✔
125
    if (fullname.empty()) {
6,175✔
126
      fullname = domain;
50✔
127
      fullname.prependRawLabel(name);
50✔
128
      labelsCount = count;
50✔
129
    }
50✔
130
    //    cerr<<"Not yet end, set our fullname to '"<<fullname<<"', recursing"<<endl;
131
    --end;
6,175✔
132
    children[*end].submit(end, begin, fullname, rcode, bytes, remote, count+1, hit, samplingRate);
6,175✔
133
  }
6,175✔
134
}
8,230✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc