2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 13:07:50 +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 <util/buffer.h>
#include <util/threads/sync.h>
#include <dns/message.h>
#include <dns/name.h>
@ -33,6 +32,7 @@
#include <auth/auth_srv.h>
#include <auth/auth_config.h>
#include <auth/datasrc_config.h>
#include <auth/datasrc_clients_mgr.h>
#include <auth/query.h>
#include <asiodns/asiodns.h>
@ -127,9 +127,9 @@ public:
OutputBuffer& buffer) :
QueryBenchMark(queries, query_message, buffer)
{
isc::util::thread::Mutex::Locker locker(
server_->getDataSrcClientListMutex());
server_->swapDataSrcClientLists(
// Note: swapDataSrcClientLists() may be deprecated, but until then
// we use it because we want to be synchronized with the server.
server_->getDataSrcClientsMgr().swapDataSrcClientLists(
configureDataSource(
Element::fromJSON("{\"IN\":"
" [{\"type\": \"sqlite3\","
@ -148,9 +148,7 @@ public:
OutputBuffer& buffer) :
QueryBenchMark(queries, query_message, buffer)
{
isc::util::thread::Mutex::Locker locker(
server_->getDataSrcClientListMutex());
server_->swapDataSrcClientLists(
server_->getDataSrcClientsMgr().swapDataSrcClientLists(
configureDataSource(
Element::fromJSON("{\"IN\":"
" [{\"type\": \"MasterFiles\","