From: Otto Moerbeek Date: Wed, 9 Dec 2020 07:37:38 +0000 (+0100) Subject: Add a speedtest for uuid generation X-Git-Tag: rec-4.5.0-alpha1~74^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9832%2Fhead;p=thirdparty%2Fpdns.git Add a speedtest for uuid generation --- diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 2df5fa7f41..2d14bb190c 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -891,7 +891,8 @@ speedtest_SOURCES = \ speedtest.cc \ statbag.cc \ svc-records.cc svc-records.hh \ - unix_utility.cc + unix_utility.cc \ + uuid-utils.cc speedtest_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPTO_LDFLAGS) speedtest_LDADD = $(LIBCRYPTO_LIBS) \ diff --git a/pdns/speedtest.cc b/pdns/speedtest.cc index 27205d5ffd..79384363e2 100644 --- a/pdns/speedtest.cc +++ b/pdns/speedtest.cc @@ -8,6 +8,7 @@ #include "dnsrecords.hh" #include "iputils.hh" #include +#include "uuid-utils.hh" #ifndef RECURSOR #include "statbag.hh" @@ -833,6 +834,15 @@ struct NetmaskTreeTest } }; +struct UUIDGenTest +{ + string getName() const { return "UUIDGenTest"; } + + void operator()() const { + getUniqueID(); + } +}; + int main(int argc, char** argv) try { @@ -918,6 +928,8 @@ try doRun(NetmaskTreeTest()); + doRun(UUIDGenTest()); + #ifndef RECURSOR S.doRings();