Parcourir la source

[master] Merge branch 'trac1557'

JINMEI Tatuya il y a 13 ans
Parent
commit
793de0ce0c
2 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 4 0
      src/bin/auth/benchmarks/Makefile.am
  2. 7 0
      src/bin/auth/benchmarks/query_bench.cc

+ 4 - 0
src/bin/auth/benchmarks/Makefile.am

@@ -4,6 +4,10 @@ AM_CPPFLAGS += $(BOOST_INCLUDES)
 
 AM_CXXFLAGS = $(B10_CXXFLAGS)
 
+if USE_STATIC_LINK
+AM_LDFLAGS = -static
+endif
+
 CLEANFILES = *.gcno *.gcda
 
 noinst_PROGRAMS = query_bench

+ 7 - 0
src/bin/auth/benchmarks/query_bench.cc

@@ -30,6 +30,8 @@
 #include <dns/question.h>
 #include <dns/rrclass.h>
 
+#include <log/logger_support.h>
+
 #include <xfr/xfrout_client.h>
 
 #include <auth/auth_srv.h>
@@ -44,6 +46,7 @@ using namespace isc;
 using namespace isc::data;
 using namespace isc::auth;
 using namespace isc::dns;
+using namespace isc::log;
 using namespace isc::util;
 using namespace isc::xfr;
 using namespace isc::bench;
@@ -231,6 +234,10 @@ main(int argc, char* argv[]) {
     const char* const datasrc_file = argv[0];
     const char* const query_data_file = argv[1];
 
+    // We disable logging to avoid unwanted noise. (We may eventually want to
+    // make it more configurable)
+    initLogger("query-bench", isc::log::NONE);
+
     DataSrcType datasrc_type = SQLITE3;
     if (strcmp(opt_datasrc_type, "sqlite3") == 0) {
         ;                       // no need to override