From: Bert Hubert Date: Wed, 12 May 2010 19:32:58 +0000 (+0000) Subject: drop dnspbench tool X-Git-Tag: rec-3.3~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=210e038074ea296f0fad5d6d2ba4f82cb8ca33d0;p=pdns drop dnspbench tool git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1610 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 220399751..f7e7ce029 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -20,7 +20,7 @@ sbin_PROGRAMS = pdns_server bin_PROGRAMS = pdns_control pdnssec endif -EXTRA_PROGRAMS=pdns_recursor sdig tsig-tests speedtest dnspbench pdns_control dnsscope dnsgram \ +EXTRA_PROGRAMS=pdns_recursor sdig tsig-tests speedtest pdns_control dnsscope dnsgram \ dnsdemog dnswasher dnsreplay dnsscan dnslog nproxy notify pdnssec pdns_server_SOURCES=dnspacket.cc nameserver.cc tcpreceiver.hh \ @@ -78,10 +78,6 @@ speedtest_SOURCES=speedtest.cc dnsparser.cc dnsparser.hh dnsrecords.cc dnswriter misc.cc misc.hh rcpgenerator.cc rcpgenerator.hh base64.cc base64.hh unix_utility.cc \ qtype.cc sillyrecords.cc logger.cc statbag.cc -dnspbench_SOURCES=dnspbench.cc sstuff.hh dnsparser.cc dnsparser.hh dnsrecords.cc dnswriter.cc dnswriter.hh \ - misc.cc misc.hh rcpgenerator.cc rcpgenerator.hh base64.cc base64.hh unix_utility.cc logger.cc \ - statbag.cc qtype.cc sillyrecords.cc - dnswasher_SOURCES=dnswasher.cc misc.cc unix_utility.cc qtype.cc \ logger.cc statbag.cc dnspcap.cc dnspcap.hh dnsparser.hh diff --git a/pdns/dnspbench.cc b/pdns/dnspbench.cc deleted file mode 100644 index 45ebd98bf..000000000 --- a/pdns/dnspbench.cc +++ /dev/null @@ -1,97 +0,0 @@ -#include "logger.hh" -Logger L("dnspbench"); - -#include "dnsparser.hh" -#include "sstuff.hh" -#include "misc.hh" -#include "dnswriter.hh" -#include "dnsrecords.hh" - -#include "statbag.hh" - -#include - -#include "namespaces.hh" - - -StatBag S; - -#include -// This code is ugly but does speedup the recursor tremendously on multi-processor systems, and even has a large effect (20, 30%) on uniprocessor -namespace __gnu_cxx -{ - _Atomic_word - __attribute__ ((__unused__)) - __exchange_and_add(volatile _Atomic_word* __mem, int __val) - { - register _Atomic_word __result=*__mem; - *__mem+=__val; - return __result; - } - - void - __attribute__ ((__unused__)) - __atomic_add(volatile _Atomic_word* __mem, int __val) - { - *__mem+=__val; - } -} - -int xcount; - -int main(int argc, char** argv) -try -{ - reportAllTypes(); - - Socket s(InterNetwork, Datagram); - - IPEndpoint rem("10.0.1.6", atoi(argv[1])), loc("213.156.2.1", 53); - // s.bind(loc); - - vector vpacket; - string domain="ds9a.nl"; - uint16_t type=1; - - for(unsigned int n=0; n < 65536; ++n) { - DNSPacketWriter pw(vpacket, domain, type); - - pw.getHeader()->rd=1; - pw.getHeader()->qr=0; - pw.getHeader()->id=n; - // ARecordContent arc("1.2.3.4"); - // pw.startRecord("ds9a.nl", 1, 9999, 1, DNSPacketWriter::ANSWER); - // arc.toPacket(pw); - // pw.commit(); - - string spacket((char*)(&*vpacket.begin()), vpacket.size()); - s.sendTo(spacket, rem); - } - - return 0; -#if 0 - - vector packet; - - uint16_t type=DNSRecordContent::TypeToNumber(argv[2]); - - DNSRecordContent* drc=DNSRecordContent::mastermake(type, 1, argv[3]); - - cerr<<"In: "<serialize(argv[1]); - - cerr<<"sizeof: "< regen=DNSRecordContent::unserialize(argv[1], type, record); - cerr<<"Out: "<getZoneRepresentation()<