2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 21:18:02 +00:00

[2211] use data source client mgr for query_bench

This commit is contained in:
JINMEI Tatuya 2012-10-19 22:56:39 -07:00
parent 15a048bef5
commit 2f6a2e484a

View File

@ -18,7 +18,6 @@
#include <bench/benchmark_util.h> #include <bench/benchmark_util.h>
#include <util/buffer.h> #include <util/buffer.h>
#include <util/threads/sync.h>
#include <dns/message.h> #include <dns/message.h>
#include <dns/name.h> #include <dns/name.h>
@ -33,6 +32,7 @@
#include <auth/auth_srv.h> #include <auth/auth_srv.h>
#include <auth/auth_config.h> #include <auth/auth_config.h>
#include <auth/datasrc_config.h> #include <auth/datasrc_config.h>
#include <auth/datasrc_clients_mgr.h>
#include <auth/query.h> #include <auth/query.h>
#include <asiodns/asiodns.h> #include <asiodns/asiodns.h>
@ -127,9 +127,9 @@ public:
OutputBuffer& buffer) : OutputBuffer& buffer) :
QueryBenchMark(queries, query_message, buffer) QueryBenchMark(queries, query_message, buffer)
{ {
isc::util::thread::Mutex::Locker locker( // Note: swapDataSrcClientLists() may be deprecated, but until then
server_->getDataSrcClientListMutex()); // we use it because we want to be synchronized with the server.
server_->swapDataSrcClientLists( server_->getDataSrcClientsMgr().swapDataSrcClientLists(
configureDataSource( configureDataSource(
Element::fromJSON("{\"IN\":" Element::fromJSON("{\"IN\":"
" [{\"type\": \"sqlite3\"," " [{\"type\": \"sqlite3\","
@ -148,9 +148,7 @@ public:
OutputBuffer& buffer) : OutputBuffer& buffer) :
QueryBenchMark(queries, query_message, buffer) QueryBenchMark(queries, query_message, buffer)
{ {
isc::util::thread::Mutex::Locker locker( server_->getDataSrcClientsMgr().swapDataSrcClientLists(
server_->getDataSrcClientListMutex());
server_->swapDataSrcClientLists(
configureDataSource( configureDataSource(
Element::fromJSON("{\"IN\":" Element::fromJSON("{\"IN\":"
" [{\"type\": \"MasterFiles\"," " [{\"type\": \"MasterFiles\","