From a804510d81ade0594a75b5c9b8765cafcc233245 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Mon, 16 Jul 2012 13:54:11 +0000 Subject: QPID-3858: Refactor to tidy up several class design issues git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1362039 13f79535-47bb-0310-9956-ffa450edef68 --- .../tests/storePerftools/asyncPerf/PerfTest.cpp | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp') diff --git a/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp b/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp index 4d145d321d..1497b678a0 100644 --- a/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp +++ b/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp @@ -31,7 +31,10 @@ #include "tests/storePerftools/common/ScopedTimer.h" #include "tests/storePerftools/common/Thread.h" +#include "qpid/Modules.h" // Use with loading store as module #include "qpid/asyncStore/AsyncStoreImpl.h" +#include "qpid/asyncStore/AsyncStoreOptions.h" +#include "qpid/broker/AsyncStore.h" #include "qpid/sys/Poller.h" #include @@ -161,16 +164,15 @@ PerfTest::destroyQueues() } } -}}} // namespace tests::storePerftools::asyncPerf - -// ----------------------------------------------------------------- - int -main(int argc, char** argv) +runPerfTest(int argc, char** argv) { + // Load async store module + qpid::tryShlib ("asyncStore.so", false); + qpid::CommonOptions co; qpid::asyncStore::AsyncStoreOptions aso; - tests::storePerftools::asyncPerf::TestOptions to; + TestOptions to; qpid::Options opts; opts.add(co).add(aso).add(to); try { @@ -203,5 +205,16 @@ main(int argc, char** argv) // Print test result std::cout << apt << std::endl; //::sleep(1); + return 0; } + +}}} // namespace tests::storePerftools::asyncPerf + +// ----------------------------------------------------------------- + +int +main(int argc, char** argv) +{ + return tests::storePerftools::asyncPerf::runPerfTest(argc, argv); +} -- cgit v1.2.1