File: responsestats.hh

package info (click to toggle)
pdns-recursor 3.6.2-2%2Bdeb8u2~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 1,432 kB
  • sloc: cpp: 18,930; ansic: 1,653; sh: 539; makefile: 130
file content (21 lines) | stat: -rw-r--r-- 488 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef PDNS_RESPONSESTATS_HH
#define PDNS_RESPONSESTATS_HH
#include "misc.hh"

class ResponseStats
{
public:
  ResponseStats();

  void submitResponse(uint16_t qtype, uint16_t respsize, bool udpOrTCP);
  map<uint16_t, uint64_t> getQTypeResponseCounts();
  map<uint16_t, uint64_t> getSizeResponseCounts();
  string getQTypeReport();

private:
  vector<AtomicCounter> d_qtypecounters;
  typedef vector<pair<uint16_t, uint64_t> > sizecounters_t;
  sizecounters_t d_sizecounters;
};

#endif