Inheritance diagram for CacheTest:
Public Types | |
enum | OpType { OP_READ_SEQ, OP_WRITE_SEQ, OP_READ_RAND, OP_WRITE_RAND, OP_READ_NOWAIT, OP_WRITE_NOWAIT, OP_WRITE_SKIP, OP_SCRATCH, OP_PREFETCH, OP_PREFETCH_BATCH, OP_ALLOCATE, OP_DEALLOCATE, OP_CHECKPOINT, OP_RESIZE_CACHE, OP_MAX } |
The various operations that can be run in the multi-threaded test. More... | |
Public Member Functions | |
BlockId | makeBlockId (uint i) |
BlockIds range from 0 to nDiskPages-1. | |
virtual CachePage * | lockPage (OpType opType, uint iPage) |
virtual void | unlockPage (CachePage &page, LockMode lockMode) |
virtual void | prefetchPage (uint iPage) |
virtual void | prefetchBatch (uint iPage, uint nPagesPerBatch) |
CacheTest () | |
void | testSingleThread () |
void | testQuotaCacheAccessor () |
rlim_t | setAddressSpaceLimit (rlim_t minLimit, struct rlimit &oldLimits) |
void | restoreAddressSpaceLimit (const struct rlimit &limits) |
uint | computeMaxPagesUpperBound (uint addressSpaceSize, uint pageSize) |
void | testLargeCacheInit () |
void | testLargeCacheRequest () |
virtual void | fillPage (CachePage &page, uint x) |
Scribbles on the contents of a page. | |
virtual void | verifyPage (CachePage &page, uint x) |
Verifies that the page contents are correct (based on the parameter x). | |
bool | testOp (OpType opType, uint iPage, bool bNice) |
Carries out one operation on a page. | |
char const * | getOpName (OpType opType) |
Makes up an operation name based on an OpType. | |
LockMode | getLockMode (OpType opType) |
Gets the LockMode corresponding to an OpType. | |
void | testSequentialOp (OpType opType) |
Carries out an operation on each disk page in order from 0 to nDiskPages-1. | |
void | testRandomOp (OpType opType) |
Carries out an operation on nRandomOps pages selected at random. | |
void | testSkipOp (OpType opType, uint n) |
Carries out an operation on every "n" pages, starting at page 0. | |
void | testScratch () |
Performs nRandomOps scratch operations. | |
void | testPrefetch () |
Performs a limited number of prefetch operations. | |
void | testPrefetchBatch () |
Performs a limited number of batch prefetch operations. | |
virtual void | testCheckpoint () |
Performs a periodic checkpoint. | |
virtual void | testAllocateAll () |
Initializes all disk pages, filling them with information based on their block numbers. | |
void | testSequentialRead () |
Carries out one sequential read pass over the entire device. | |
void | testSequentialWrite () |
Carries out one sequential write pass over the entire device. | |
void | testRandomRead () |
Carries out nRandomOps read operations on pages selected at random. | |
void | testRandomWrite () |
Carries out nRandomOps write operations on pages selected at random. | |
void | testSkipWrite (uint n) |
Carries out write operations every n pages. | |
virtual void | testAllocate () |
virtual void | testDeallocate () |
void | testCheckpointGuarded () |
void | testCacheResize () |
void | testMultipleThreads () |
Carries out specified tests in multi-threaded mode. | |
virtual void | threadInit () |
virtual void | threadTerminate () |
virtual bool | testThreadedOp (int iOp) |
Test implementation must be supplied by derived test class. | |
Cache & | getCache () |
virtual SharedCache | newCache () |
SharedRandomAccessDevice | openDevice (std::string devName, DeviceMode openMode, uint nDevicePages, DeviceId deviceId) |
virtual void | openStorage (DeviceMode openMode) |
virtual void | closeStorage () |
virtual void | testCaseTearDown () |
Equivalent to JUnit TestCase.tearDown; this is called after each test case method is invoked. | |
void | closeDevice (DeviceId deviceId, SharedRandomAccessDevice &pDevice) |
TestSuite * | releaseTestSuite () |
void | beforeTestCase (std::string testCaseName) |
void | afterTestCase (std::string testCaseName) |
virtual void | testCaseSetUp () |
Equivalent to JUnit TestCase.setUp; this is called before each test case method is invoked. | |
virtual void | notifyTrace (std::string source, TraceLevel level, std::string message) |
Receives notification when a trace event occurs. | |
virtual TraceLevel | getSourceTraceLevel (std::string source) |
Gets the level at which a particular source should be traced. | |
Static Public Member Functions | |
static void | readParams (int argc, char **argv) |
Parses the command line. | |
Static Public Attributes | |
static ParamName | paramTestSuiteName |
static ParamName | paramTraceFileName |
static ParamName | paramDictionaryFileName |
static ParamName | paramTraceLevel |
static ParamName | paramStatsFileName |
static ParamName | paramTraceStdout |
static ParamName | paramDegreeOfParallelism |
static ConfigMap | configMap |
Configuration parameters. | |
Protected Types | |
enum | VictimPolicy { victimTwoQ, victimLRU, victimRandom } |
The available victim policy implementations. More... | |
Protected Member Functions | |
uint | generateRandomNumber (uint iMax) |
void | snooze (uint nSeconds) |
void | runThreadedTestCase () |
Executes specified test threads. | |
Protected Attributes | |
uint | cbPageUsable |
Portion of each page that should be scribbled on. | |
uint | nRandomOps |
Number of random access operations to run per pass. | |
uint | nSecondsBetweenCheckpoints |
Checkpoint interval during multi-threaded test. | |
StrictMutex | logMutex |
Protects output stream. | |
SXMutex | checkpointMutex |
SXMutex used to synchronize checkpoints with write actions. | |
bool | bTestResize |
Flag indicating that the cache should be dynamically resized during the multi-threaded portion of the test. | |
VictimPolicy | victimPolicy |
VictimPolicy to instantiate. | |
CacheParams | cacheParams |
Parameters for cache initialization. | |
SharedCache | pCache |
Cache instance being tested. | |
SharedRandomAccessDevice | pRandomAccessDevice |
The default cached device. | |
uint | nMemPages |
Size of cache in memory pages. | |
uint | nDiskPages |
Size of device in disk pages. | |
uint | cbPageFull |
Disk page size. | |
DeviceId | dataDeviceId |
Fixed ID to assign to data device. | |
TestSuite * | pTestSuite |
Boost test suite. | |
boost::shared_ptr< TestBase > | pTestObj |
std::ofstream | traceStream |
Output file stream for tracing. | |
StrictMutex | traceMutex |
Protects traceStream. | |
std::string | testName |
Name of test. | |
TraceLevel | traceLevel |
Level at which to trace test execution. | |
FileStatsTarget | statsTarget |
Output for stats. | |
StatsTimer | statsTimer |
Timer for stats collection. | |
bool | traceStdout |
Copy trace output to stdout. | |
bool | traceFile |
Copy trace output to file. | |
TestCaseGroup | defaultTests |
TestCaseGroup | extraTests |
uint | nSeconds |
Duration of multi-threaded test. | |
std::vector< int > | threadCounts |
Number of threads to run for each type of operation. | |
Static Protected Attributes | |
static bool | runAll |
Run all test cases, including the extra tests. | |
static std::string | runSingle |
Run only the test case of this name. |
Command-line options allow control over variables such as the test size, duration, and mix of operations.
TODO: doc configuration parameters
Definition at line 51 of file CacheTest.cpp.
enum PagingTestBase::OpType [inherited] |
The various operations that can be run in the multi-threaded test.
Definition at line 83 of file PagingTestBase.h.
00083 { 00084 OP_READ_SEQ, 00085 OP_WRITE_SEQ, 00086 OP_READ_RAND, 00087 OP_WRITE_RAND, 00088 OP_READ_NOWAIT, 00089 OP_WRITE_NOWAIT, 00090 OP_WRITE_SKIP, 00091 OP_SCRATCH, 00092 OP_PREFETCH, 00093 OP_PREFETCH_BATCH, 00094 OP_ALLOCATE, 00095 OP_DEALLOCATE, 00096 OP_CHECKPOINT, 00097 OP_RESIZE_CACHE, 00098 OP_MAX 00099 };
enum CacheTestBase::VictimPolicy [protected, inherited] |
The available victim policy implementations.
Definition at line 44 of file CacheTestBase.h.
00044 { 00045 victimTwoQ, 00046 victimLRU, 00047 victimRandom 00048 };
CacheTest::CacheTest | ( | ) | [inline, explicit] |
Definition at line 90 of file CacheTest.cpp.
References CacheTestBase::cbPageFull, PagingTestBase::cbPageUsable, PagingTestBase::OP_ALLOCATE, PagingTestBase::OP_DEALLOCATE, testLargeCacheInit(), testLargeCacheRequest(), PagingTestBase::testMultipleThreads(), testQuotaCacheAccessor(), testSingleThread(), and ThreadedTestBase::threadCounts.
00091 { 00092 // disable irrelevant threads 00093 threadCounts[OP_ALLOCATE] = 0; 00094 threadCounts[OP_DEALLOCATE] = 0; 00095 00096 cbPageUsable = cbPageFull; 00097 00098 FENNEL_UNIT_TEST_CASE(CacheTest,testSingleThread); 00099 FENNEL_UNIT_TEST_CASE(CacheTest,testQuotaCacheAccessor); 00100 FENNEL_UNIT_TEST_CASE(PagingTestBase,testMultipleThreads); 00101 00102 #ifdef RLIMIT_AS 00103 FENNEL_EXTRA_UNIT_TEST_CASE(CacheTest,testLargeCacheInit); 00104 FENNEL_EXTRA_UNIT_TEST_CASE(CacheTest,testLargeCacheRequest); 00105 #endif 00106 }
BlockId CacheTest::makeBlockId | ( | uint | i | ) | [inline] |
BlockIds range from 0 to nDiskPages-1.
Definition at line 57 of file CacheTest.cpp.
References CacheTestBase::dataDeviceId, CacheTestBase::nDiskPages, CompoundId::setBlockNum(), and CompoundId::setDeviceId().
Referenced by lockPage(), prefetchBatch(), prefetchPage(), and testQuotaCacheAccessor().
00058 { 00059 assert(i < nDiskPages); 00060 BlockId blockId(0); 00061 CompoundId::setDeviceId(blockId,dataDeviceId); 00062 CompoundId::setBlockNum(blockId,i); 00063 return blockId; 00064 }
Implements PagingTestBase.
Definition at line 66 of file CacheTest.cpp.
References CacheTestBase::getCache(), PagingTestBase::getLockMode(), CacheAccessor::lockPage(), makeBlockId(), and PagingTestBase::OP_ALLOCATE.
00067 { 00068 BlockId blockId = makeBlockId(iPage); 00069 return getCache().lockPage( 00070 blockId,getLockMode(opType),opType != OP_ALLOCATE); 00071 }
Implements PagingTestBase.
Definition at line 73 of file CacheTest.cpp.
References CacheTestBase::getCache(), and CacheAccessor::unlockPage().
00074 { 00075 getCache().unlockPage(page,lockMode); 00076 }
virtual void CacheTest::prefetchPage | ( | uint | iPage | ) | [inline, virtual] |
Implements PagingTestBase.
Definition at line 78 of file CacheTest.cpp.
References CacheTestBase::getCache(), makeBlockId(), and CacheAccessor::prefetchPage().
00079 { 00080 BlockId blockId = makeBlockId(iPage); 00081 getCache().prefetchPage(blockId); 00082 }
Implements PagingTestBase.
Definition at line 84 of file CacheTest.cpp.
References CacheTestBase::getCache(), makeBlockId(), and CacheAccessor::prefetchBatch().
00085 { 00086 BlockId blockId = makeBlockId(iPage); 00087 getCache().prefetchBatch(blockId,nPagesPerBatch); 00088 }
void CacheTest::testSingleThread | ( | ) | [inline] |
Definition at line 108 of file CacheTest.cpp.
References CacheTestBase::closeStorage(), DeviceMode::createNew, DeviceMode::load, CacheTestBase::openStorage(), PagingTestBase::testAllocateAll(), PagingTestBase::testRandomRead(), PagingTestBase::testRandomWrite(), PagingTestBase::testScratch(), PagingTestBase::testSequentialRead(), and PagingTestBase::testSequentialWrite().
Referenced by CacheTest().
00109 { 00110 openStorage(DeviceMode::createNew); 00111 testAllocateAll(); 00112 testSequentialRead(); 00113 testRandomRead(); 00114 testScratch(); 00115 testSequentialWrite(); 00116 testRandomWrite(); 00117 closeStorage(); 00118 openStorage(DeviceMode::load); 00119 testRandomRead(); 00120 testSequentialRead(); 00121 closeStorage(); 00122 }
void CacheTest::testQuotaCacheAccessor | ( | ) | [inline] |
Definition at line 124 of file CacheTest.cpp.
References CacheTestBase::closeStorage(), DeviceMode::createNew, QuotaCacheAccessor::getLockedPageCount(), QuotaCacheAccessor::getMaxLockedPages(), LOCKMODE_S, QuotaCacheAccessor::lockPage(), makeBlockId(), CacheTestBase::openStorage(), CacheTestBase::pCache, and QuotaCacheAccessor::unlockPage().
Referenced by CacheTest().
00125 { 00126 openStorage(DeviceMode::createNew); 00127 QuotaCacheAccessor *pQuota = new QuotaCacheAccessor( 00128 SharedQuotaCacheAccessor(),pCache,5); 00129 SharedCacheAccessor pSharedQuota(pQuota); 00130 BOOST_CHECK_EQUAL(pQuota->getMaxLockedPages(),5U); 00131 BOOST_CHECK_EQUAL(pQuota->getLockedPageCount(),0U); 00132 CachePage *pPage = pQuota->lockPage(makeBlockId(0),LOCKMODE_S,0); 00133 BOOST_CHECK_EQUAL(pQuota->getLockedPageCount(),1U); 00134 pQuota->unlockPage(*pPage,LOCKMODE_S); 00135 BOOST_CHECK_EQUAL(pQuota->getLockedPageCount(),0U); 00136 pSharedQuota.reset(); 00137 closeStorage(); 00138 }
rlim_t CacheTest::setAddressSpaceLimit | ( | rlim_t | minLimit, | |
struct rlimit & | oldLimits | |||
) | [inline] |
Definition at line 143 of file CacheTest.cpp.
Referenced by testLargeCacheInit(), and testLargeCacheRequest().
00144 { 00145 int rv = getrlimit(RLIMIT_AS, &oldLimits); 00146 BOOST_REQUIRE(rv == 0); 00147 00148 // Modify them, if necessary 00149 if (oldLimits.rlim_cur > minLimit) { 00150 // Lower current "soft" limit 00151 struct rlimit new_limits; 00152 new_limits.rlim_cur = minLimit; 00153 new_limits.rlim_max = oldLimits.rlim_max; 00154 00155 rv = setrlimit(RLIMIT_AS, &new_limits); 00156 BOOST_REQUIRE(rv == 0); 00157 00158 return minLimit; 00159 } 00160 00161 return oldLimits.rlim_cur; 00162 }
void CacheTest::restoreAddressSpaceLimit | ( | const struct rlimit & | limits | ) | [inline] |
Definition at line 165 of file CacheTest.cpp.
Referenced by testLargeCacheInit(), and testLargeCacheRequest().
00166 { 00167 // restore addres space limits 00168 int rv = setrlimit(RLIMIT_AS, &limits); 00169 BOOST_REQUIRE(rv == 0); 00170 }
Definition at line 172 of file CacheTest.cpp.
Referenced by testLargeCacheInit(), and testLargeCacheRequest().
00173 { 00174 int guardPages = 0; 00175 #ifndef NDEBUG 00176 // In debug mode, guard pages flank each real page. 00177 guardPages = 2; 00178 #endif 00179 int osPageSize = getpagesize(); 00180 00181 return addressSpaceSize / (pageSize + (guardPages * osPageSize) + 4); 00182 }
void CacheTest::testLargeCacheInit | ( | ) | [inline] |
Definition at line 184 of file CacheTest.cpp.
References computeMaxPagesUpperBound(), CacheParams::defaultMemPagesMax, Cache::newCache(), CacheParams::nMemPagesInit, CacheParams::nMemPagesMax, CacheTestBase::pCache, restoreAddressSpaceLimit(), and setAddressSpaceLimit().
Referenced by CacheTest().
00185 { 00186 struct rlimit savedLimits; 00187 00188 rlim_t addrSpaceSize = setAddressSpaceLimit( 00189 SMALL_ADDR_SPACE, savedLimits); 00190 00191 CacheParams params; 00192 00193 // Ask for so many max pages, that CacheImpl cannot keep track of them 00194 // all (e.g., vector of page pointers is larger than address space 00195 // limit) 00196 params.nMemPagesMax = addrSpaceSize / sizeof(void *) + 100; 00197 params.nMemPagesInit = 10; 00198 00199 SharedCache pCache; 00200 00201 BOOST_CHECK_NO_THROW(pCache = Cache::newCache(params)); 00202 BOOST_CHECK_EQUAL( 00203 CacheParams::defaultMemPagesMax, 00204 pCache->getMaxAllocatedPageCount()); 00205 00206 // Note: use of CacheParams::defaultMemPagesMax is correct here. When 00207 // we reset the max pages value due to an exception we automatically 00208 // reset the init value to the default (MAXU), which causes the 00209 // allocated page count to be equal to the MAX. 00210 BOOST_CHECK_EQUAL( 00211 CacheParams::defaultMemPagesMax, 00212 pCache->getAllocatedPageCount()); 00213 00214 pCache.reset(); 00215 00216 // Set max pages such that allocating that many pages would exceed the 00217 // process address space. Try to initialize with that many pages. 00218 00219 // REVIEW: SWZ: 10/11/2007: Using the default page size (4K), we're 00220 // unable to munmap any pages once we realize we've run out. Seems 00221 // like an OS bug -- larger pages works fine. I attempted to use as 00222 // few 4K pages as possible (determined empirically -- the address 00223 // space includes libraries that may vary across machines or builds) 00224 // and it was still unable to munmap any pages once it ran out. 00225 params.cbPage = 32 * 1024; 00226 00227 params.nMemPagesMax = 00228 computeMaxPagesUpperBound(addrSpaceSize, params.cbPage); 00229 params.nMemPagesInit = params.nMemPagesMax; 00230 00231 BOOST_CHECK_NO_THROW(pCache = Cache::newCache(params)); 00232 BOOST_CHECK_EQUAL( 00233 CacheParams::defaultMemPagesMax, 00234 pCache->getMaxAllocatedPageCount()); 00235 00236 // See note above; same logic. 00237 BOOST_CHECK_EQUAL( 00238 CacheParams::defaultMemPagesMax, 00239 pCache->getAllocatedPageCount()); 00240 00241 pCache.reset(); 00242 00243 restoreAddressSpaceLimit(savedLimits); 00244 }
void CacheTest::testLargeCacheRequest | ( | ) | [inline] |
Definition at line 246 of file CacheTest.cpp.
References CacheParams::cbPage, computeMaxPagesUpperBound(), Cache::newCache(), CacheParams::nMemPagesInit, CacheParams::nMemPagesMax, CacheTestBase::pCache, restoreAddressSpaceLimit(), and setAddressSpaceLimit().
Referenced by CacheTest().
00247 { 00248 struct rlimit savedLimits; 00249 00250 rlim_t addrSpaceSize = 00251 setAddressSpaceLimit(SMALL_ADDR_SPACE, savedLimits); 00252 00253 CacheParams params; 00254 00255 // REVIEW: SWZ: 10/11/2007: Same page size weirdness as in 00256 // testLargeCacheInit. 00257 params.cbPage = 32 * 1024; 00258 00259 params.nMemPagesMax = 00260 computeMaxPagesUpperBound(addrSpaceSize, params.cbPage); 00261 params.nMemPagesInit = 00262 (params.nMemPagesMax / 2) < 1000 00263 ? (params.nMemPagesMax / 2) 00264 : 1000; 00265 00266 BOOST_CHECK_NO_THROW(pCache = Cache::newCache(params)); 00267 BOOST_CHECK_EQUAL( 00268 params.nMemPagesMax, 00269 pCache->getMaxAllocatedPageCount()); 00270 BOOST_CHECK_EQUAL( 00271 params.nMemPagesInit, 00272 pCache->getAllocatedPageCount()); 00273 00274 BOOST_CHECK_THROW( 00275 pCache->setAllocatedPageCount(params.nMemPagesMax), 00276 std::exception); 00277 BOOST_CHECK_EQUAL( 00278 params.nMemPagesMax, 00279 pCache->getMaxAllocatedPageCount()); 00280 BOOST_CHECK_EQUAL( 00281 params.nMemPagesInit, 00282 pCache->getAllocatedPageCount()); 00283 00284 pCache.reset(); 00285 00286 restoreAddressSpaceLimit(savedLimits); 00287 }
Definition at line 53 of file PagingTestBase.cpp.
References g_pRNG.
Referenced by PagingTestBase::fillPage(), SegmentTestBase::testDeallocate(), PagingTestBase::testPrefetch(), PagingTestBase::testPrefetchBatch(), PagingTestBase::testRandomOp(), and PagingTestBase::testScratch().
00054 { 00055 return (*g_pRNG)(iMax); 00056 }
Scribbles on the contents of a page.
The data written is derived from the parameter x.
Reimplemented in SnapshotSegmentTestBase, and VersionedSegmentTest.
Definition at line 58 of file PagingTestBase.cpp.
References PagingTestBase::cbPageUsable, PagingTestBase::generateRandomNumber(), and CachePage::getWritableData().
Referenced by VersionedSegmentTest::fillPage(), SnapshotSegmentTestBase::fillPage(), SegmentTestBase::lockPage(), PagingTestBase::testOp(), and PagingTestBase::testScratch().
00059 { 00060 uint *p = reinterpret_cast<uint *>(page.getWritableData()); 00061 assert(cbPageUsable); 00062 uint n = cbPageUsable / sizeof(uint); 00063 for (uint i = 0; i < n; i++) { 00064 p[i] = x + i; 00065 } 00066 uint r = generateRandomNumber(n); 00067 p[r] = 0; 00068 }
Verifies that the page contents are correct (based on the parameter x).
Reimplemented in SnapshotSegmentTestBase, and VersionedSegmentTest.
Definition at line 70 of file PagingTestBase.cpp.
References PagingTestBase::cbPageUsable, and CachePage::getReadableData().
Referenced by PagingTestBase::testOp(), VersionedSegmentTest::verifyPage(), and SnapshotSegmentTestBase::verifyPage().
00071 { 00072 uint const *p = reinterpret_cast<uint const *>(page.getReadableData()); 00073 assert(cbPageUsable); 00074 uint n = cbPageUsable / sizeof(uint); 00075 uint nZeros = 0; 00076 for (uint i = 0; i < n; i++) { 00077 if (p[i] != x + i) { 00078 assert(!p[i]); 00079 nZeros++; 00080 } 00081 } 00082 assert(nZeros < 2); 00083 }
Carries out one operation on a page.
This involves locking the page, calling verifyPage or fillPage, and then unlocking the page.
opType | operation which will be attempted | |
iPage | block number of page | |
bNice | true if page should be marked as nice as part of access |
Definition at line 85 of file PagingTestBase.cpp.
References PagingTestBase::fillPage(), CacheTestBase::getCache(), PagingTestBase::getLockMode(), LOCKMODE_S, LOCKMODE_S_NOWAIT, LOCKMODE_X, LOCKMODE_X_NOWAIT, PagingTestBase::lockPage(), CacheAccessor::nicePage(), PagingTestBase::unlockPage(), and PagingTestBase::verifyPage().
Referenced by PagingTestBase::testRandomOp(), PagingTestBase::testSequentialOp(), and PagingTestBase::testSkipOp().
00086 { 00087 CachePage *pPage = lockPage(opType,iPage); 00088 LockMode lockMode = getLockMode(opType); 00089 if (!pPage) { 00090 // must be NoWait locking failed 00091 assert(lockMode >= LOCKMODE_S_NOWAIT); 00092 return false; 00093 } 00094 CachePage &page = *pPage; 00095 if (lockMode == LOCKMODE_S 00096 || lockMode == LOCKMODE_S_NOWAIT) 00097 { 00098 verifyPage(page,iPage); 00099 } else { 00100 fillPage(page,iPage); 00101 } 00102 switch (lockMode) { 00103 case LOCKMODE_X_NOWAIT: 00104 lockMode = LOCKMODE_X; 00105 break; 00106 case LOCKMODE_S_NOWAIT: 00107 lockMode = LOCKMODE_S; 00108 break; 00109 default: 00110 break; 00111 } 00112 if (bNice) { 00113 getCache().nicePage(page); 00114 } 00115 unlockPage(page,lockMode); 00116 return true; 00117 }
char const * PagingTestBase::getOpName | ( | OpType | opType | ) | [inherited] |
Makes up an operation name based on an OpType.
Definition at line 119 of file PagingTestBase.cpp.
References PagingTestBase::OP_ALLOCATE, PagingTestBase::OP_READ_NOWAIT, PagingTestBase::OP_READ_RAND, PagingTestBase::OP_READ_SEQ, PagingTestBase::OP_WRITE_NOWAIT, PagingTestBase::OP_WRITE_RAND, PagingTestBase::OP_WRITE_SEQ, and PagingTestBase::OP_WRITE_SKIP.
Referenced by PagingTestBase::testRandomOp(), PagingTestBase::testSequentialOp(), and PagingTestBase::testSkipOp().
00120 { 00121 switch (opType) { 00122 case OP_ALLOCATE: 00123 return "allocate"; 00124 case OP_READ_SEQ: 00125 return "sequential read"; 00126 case OP_WRITE_SEQ: 00127 return "sequential write"; 00128 case OP_READ_RAND: 00129 return "random read"; 00130 case OP_WRITE_RAND: 00131 return "random write"; 00132 case OP_READ_NOWAIT: 00133 return "read no-wait"; 00134 case OP_WRITE_NOWAIT: 00135 return "write no-wait"; 00136 case OP_WRITE_SKIP: 00137 return "write every n pages"; 00138 default: 00139 permAssert(false); 00140 } 00141 }
Gets the LockMode corresponding to an OpType.
Definition at line 143 of file PagingTestBase.cpp.
References LOCKMODE_S, LOCKMODE_S_NOWAIT, LOCKMODE_X, LOCKMODE_X_NOWAIT, PagingTestBase::OP_ALLOCATE, PagingTestBase::OP_READ_NOWAIT, PagingTestBase::OP_READ_RAND, PagingTestBase::OP_READ_SEQ, PagingTestBase::OP_WRITE_NOWAIT, PagingTestBase::OP_WRITE_RAND, PagingTestBase::OP_WRITE_SEQ, and PagingTestBase::OP_WRITE_SKIP.
Referenced by SegmentTestBase::lockPage(), lockPage(), and PagingTestBase::testOp().
00144 { 00145 switch (opType) { 00146 case OP_ALLOCATE: 00147 return LOCKMODE_X; 00148 case OP_READ_SEQ: 00149 return LOCKMODE_S; 00150 case OP_WRITE_SEQ: 00151 return LOCKMODE_X; 00152 case OP_READ_RAND: 00153 return LOCKMODE_S; 00154 case OP_WRITE_RAND: 00155 return LOCKMODE_X; 00156 case OP_READ_NOWAIT: 00157 return LOCKMODE_S_NOWAIT; 00158 case OP_WRITE_NOWAIT: 00159 return LOCKMODE_X_NOWAIT; 00160 case OP_WRITE_SKIP: 00161 return LOCKMODE_X; 00162 default: 00163 permAssert(false); 00164 } 00165 }
void PagingTestBase::testSequentialOp | ( | OpType | opType | ) | [inherited] |
Carries out an operation on each disk page in order from 0 to nDiskPages-1.
opType | see testOp |
Definition at line 167 of file PagingTestBase.cpp.
References PagingTestBase::getOpName(), PagingTestBase::logMutex, CacheTestBase::nDiskPages, and PagingTestBase::testOp().
Referenced by PagingTestBase::testAllocateAll(), PagingTestBase::testSequentialRead(), PagingTestBase::testSequentialWrite(), and PagingTestBase::testThreadedOp().
00168 { 00169 uint n = 0; 00170 for (uint i = 0; i < nDiskPages; i++) { 00171 if (testOp(opType,i,true)) { 00172 n++; 00173 } 00174 } 00175 StrictMutexGuard mutexGuard(logMutex); 00176 BOOST_MESSAGE( 00177 "completed " << n << " " << getOpName(opType) << " ops"); 00178 }
void PagingTestBase::testRandomOp | ( | OpType | opType | ) | [inherited] |
Carries out an operation on nRandomOps pages selected at random.
opType | see testOp |
Definition at line 180 of file PagingTestBase.cpp.
References PagingTestBase::generateRandomNumber(), PagingTestBase::getOpName(), PagingTestBase::logMutex, CacheTestBase::nDiskPages, PagingTestBase::nRandomOps, and PagingTestBase::testOp().
Referenced by PagingTestBase::testRandomRead(), PagingTestBase::testRandomWrite(), and PagingTestBase::testThreadedOp().
00181 { 00182 uint n = 0; 00183 for (uint i = 0; i < nRandomOps; i++) { 00184 uint iPage = generateRandomNumber(nDiskPages); 00185 bool bNice = (generateRandomNumber(nRandomOps) == 0); 00186 if (testOp(opType,iPage,bNice)) { 00187 n++; 00188 } 00189 } 00190 StrictMutexGuard mutexGuard(logMutex); 00191 BOOST_MESSAGE( 00192 "completed " << n << " " << getOpName(opType) << " ops"); 00193 00194 }
Carries out an operation on every "n" pages, starting at page 0.
opType | see testOp | |
n | the offset between each page |
Definition at line 196 of file PagingTestBase.cpp.
References PagingTestBase::getOpName(), PagingTestBase::logMutex, CacheTestBase::nDiskPages, and PagingTestBase::testOp().
Referenced by PagingTestBase::testSkipWrite(), and PagingTestBase::testThreadedOp().
00197 { 00198 uint numOps = 0; 00199 for (uint i = 0; i < nDiskPages; i += n) { 00200 if (testOp(opType,i,true)) { 00201 numOps++; 00202 } 00203 } 00204 StrictMutexGuard mutexGuard(logMutex); 00205 BOOST_MESSAGE( 00206 "completed " << numOps << " " << getOpName(opType) << " ops"); 00207 }
void PagingTestBase::testScratch | ( | ) | [inherited] |
Performs nRandomOps scratch operations.
A scratch operation consists of locking a scratch page, filling it with random data, and then unlocking it.
Definition at line 209 of file PagingTestBase.cpp.
References PagingTestBase::fillPage(), PagingTestBase::generateRandomNumber(), CacheTestBase::getCache(), LOCKMODE_X, PagingTestBase::logMutex, PagingTestBase::nRandomOps, and CacheAccessor::unlockPage().
Referenced by testSingleThread(), and PagingTestBase::testThreadedOp().
00210 { 00211 for (uint i = 0; i < nRandomOps; i++) { 00212 CachePage &page = getCache().lockScratchPage(); 00213 fillPage(page,generateRandomNumber(10000)); 00214 getCache().unlockPage(page,LOCKMODE_X); 00215 } 00216 StrictMutexGuard mutexGuard(logMutex); 00217 BOOST_MESSAGE("completed " << nRandomOps << " random scratch ops"); 00218 }
void PagingTestBase::testPrefetch | ( | ) | [inherited] |
Performs a limited number of prefetch operations.
Prefetches are not verified.
Definition at line 220 of file PagingTestBase.cpp.
References PagingTestBase::generateRandomNumber(), PagingTestBase::logMutex, CacheTestBase::nDiskPages, PagingTestBase::prefetchPage(), and TestBase::snooze().
Referenced by PagingTestBase::testThreadedOp().
00221 { 00222 // TODO: parameterize this 00223 uint n = 3; 00224 for (uint i = 0; i < n; i++) { 00225 uint iPage = generateRandomNumber(nDiskPages); 00226 prefetchPage(iPage); 00227 } 00228 // give the prefetches a chance to complete 00229 snooze(1); 00230 StrictMutexGuard mutexGuard(logMutex); 00231 BOOST_MESSAGE("completed " << n << " random prefetch ops"); 00232 }
void PagingTestBase::testPrefetchBatch | ( | ) | [inherited] |
Performs a limited number of batch prefetch operations.
Prefetches are not verified.
Definition at line 234 of file PagingTestBase.cpp.
References PagingTestBase::generateRandomNumber(), PagingTestBase::logMutex, CacheTestBase::nDiskPages, PagingTestBase::prefetchBatch(), and TestBase::snooze().
Referenced by PagingTestBase::testThreadedOp().
00235 { 00236 // TODO: parameterize this 00237 uint n = 2; 00238 uint nPagesPerBatch = 4; 00239 for (uint i = 0; i < n; i++) { 00240 uint iPage = generateRandomNumber(nDiskPages - nPagesPerBatch); 00241 prefetchBatch(iPage,nPagesPerBatch); 00242 } 00243 // give the prefetches a chance to complete 00244 snooze(1); 00245 StrictMutexGuard mutexGuard(logMutex); 00246 BOOST_MESSAGE("completed " << n << " random prefetch batch ops"); 00247 }
void PagingTestBase::testCheckpoint | ( | ) | [virtual, inherited] |
Performs a periodic checkpoint.
Reimplemented in SegmentTestBase, and VersionedSegmentTest.
Definition at line 289 of file PagingTestBase.cpp.
References CHECKPOINT_FLUSH_ALL, Cache::checkpointPages(), CacheTestBase::dataDeviceId, and CacheTestBase::getCache().
Referenced by PagingTestBase::testCheckpointGuarded().
00290 { 00291 DeviceIdPagePredicate pagePredicate(dataDeviceId); 00292 getCache().checkpointPages(pagePredicate,CHECKPOINT_FLUSH_ALL); 00293 }
void PagingTestBase::testAllocateAll | ( | ) | [virtual, inherited] |
Initializes all disk pages, filling them with information based on their block numbers.
Reimplemented in LinearViewSegmentTest, and SnapshotSegmentTestBase.
Definition at line 249 of file PagingTestBase.cpp.
References PagingTestBase::OP_ALLOCATE, and PagingTestBase::testSequentialOp().
Referenced by SnapshotSegmentTestBase::testAllocateAll(), LinearViewSegmentTest::testAllocateAll(), PagingTestBase::testMultipleThreads(), SegmentTestBase::testSingleThread(), and testSingleThread().
00250 { 00251 testSequentialOp(OP_ALLOCATE); 00252 }
void PagingTestBase::testSequentialRead | ( | ) | [inherited] |
Carries out one sequential read pass over the entire device.
Definition at line 254 of file PagingTestBase.cpp.
References PagingTestBase::OP_READ_SEQ, and PagingTestBase::testSequentialOp().
Referenced by SnapshotSegmentTest::deallocateOldPages(), SnapshotSegmentTest::testDeallocateOld(), VersionedSegmentTest::testRecovery(), SnapshotSegmentTest::testRollback(), SegmentTestBase::testSingleThread(), testSingleThread(), SnapshotSegmentTest::testSnapshotReads(), SnapshotSegmentTest::testUncommittedReads(), and BackupRestoreTest::verifyData().
00255 { 00256 testSequentialOp(OP_READ_SEQ); 00257 }
void PagingTestBase::testSequentialWrite | ( | ) | [inherited] |
Carries out one sequential write pass over the entire device.
Definition at line 259 of file PagingTestBase.cpp.
References PagingTestBase::OP_WRITE_SEQ, and PagingTestBase::testSequentialOp().
Referenced by SegmentTestBase::testSingleThread(), and testSingleThread().
00260 { 00261 testSequentialOp(OP_WRITE_SEQ); 00262 }
void PagingTestBase::testRandomRead | ( | ) | [inherited] |
Carries out nRandomOps read operations on pages selected at random.
Definition at line 264 of file PagingTestBase.cpp.
References PagingTestBase::OP_READ_RAND, and PagingTestBase::testRandomOp().
Referenced by SegmentTestBase::testSingleThread(), and testSingleThread().
00265 { 00266 testRandomOp(OP_READ_RAND); 00267 }
void PagingTestBase::testRandomWrite | ( | ) | [inherited] |
Carries out nRandomOps write operations on pages selected at random.
Definition at line 269 of file PagingTestBase.cpp.
References PagingTestBase::OP_WRITE_RAND, and PagingTestBase::testRandomOp().
Referenced by SegmentTestBase::testSingleThread(), and testSingleThread().
00270 { 00271 testRandomOp(OP_WRITE_RAND); 00272 }
void PagingTestBase::testSkipWrite | ( | uint | n | ) | [inherited] |
Carries out write operations every n pages.
n | offset between pages |
Definition at line 274 of file PagingTestBase.cpp.
References PagingTestBase::OP_WRITE_SKIP, and PagingTestBase::testSkipOp().
Referenced by BackupRestoreTest::testBackupRestore(), SnapshotSegmentTest::testDeallocateOld(), SnapshotSegmentTest::testRollback(), SnapshotSegmentTest::testSnapshotReads(), and SnapshotSegmentTest::testUncommittedReads().
00275 { 00276 testSkipOp(OP_WRITE_SKIP, n); 00277 }
void PagingTestBase::testAllocate | ( | ) | [virtual, inherited] |
Reimplemented in SegmentTestBase.
Definition at line 279 of file PagingTestBase.cpp.
Referenced by PagingTestBase::testThreadedOp().
void PagingTestBase::testDeallocate | ( | ) | [virtual, inherited] |
Reimplemented in SegmentTestBase.
Definition at line 284 of file PagingTestBase.cpp.
Referenced by PagingTestBase::testThreadedOp().
void PagingTestBase::testCheckpointGuarded | ( | ) | [inherited] |
Definition at line 295 of file PagingTestBase.cpp.
References PagingTestBase::checkpointMutex, PagingTestBase::logMutex, PagingTestBase::nSecondsBetweenCheckpoints, TestBase::snooze(), PagingTestBase::testCheckpoint(), and SXMutexGuard< lockMode >::unlock().
Referenced by PagingTestBase::testThreadedOp().
00296 { 00297 snooze(nSecondsBetweenCheckpoints); 00298 StrictMutexGuard logGuard(logMutex); 00299 BOOST_MESSAGE("checkpoint started"); 00300 logGuard.unlock(); 00301 SXMutexExclusiveGuard checkpointExclusiveGuard(checkpointMutex); 00302 testCheckpoint(); 00303 checkpointExclusiveGuard.unlock(); 00304 logGuard.lock(); 00305 BOOST_MESSAGE("checkpoint completed"); 00306 }
void PagingTestBase::testCacheResize | ( | ) | [inherited] |
Definition at line 308 of file PagingTestBase.cpp.
References CacheTestBase::getCache(), PagingTestBase::logMutex, CacheTestBase::nMemPages, ThreadedTestBase::nSeconds, Cache::setAllocatedPageCount(), and TestBase::snooze().
Referenced by PagingTestBase::testThreadedOp().
00309 { 00310 snooze(nSeconds / 3); 00311 getCache().setAllocatedPageCount(nMemPages / 2); 00312 StrictMutexGuard mutexGuard(logMutex); 00313 BOOST_MESSAGE("shrank cache"); 00314 mutexGuard.unlock(); 00315 snooze(nSeconds / 3); 00316 getCache().setAllocatedPageCount(nMemPages - 1); 00317 mutexGuard.lock(); 00318 BOOST_MESSAGE("expanded cache"); 00319 mutexGuard.unlock(); 00320 }
void PagingTestBase::testMultipleThreads | ( | ) | [inherited] |
Carries out specified tests in multi-threaded mode.
Definition at line 431 of file PagingTestBase.cpp.
References DeviceMode::createNew, CacheTestBase::openStorage(), ThreadedTestBase::runThreadedTestCase(), and PagingTestBase::testAllocateAll().
Referenced by CacheTest(), LinearDeviceSegmentTest::LinearDeviceSegmentTest(), LinearViewSegmentTest::LinearViewSegmentTest(), SnapshotSegmentTest::SnapshotSegmentTest(), and VersionedSegmentTest::VersionedSegmentTest().
00432 { 00433 openStorage(DeviceMode::createNew); 00434 testAllocateAll(); 00435 runThreadedTestCase(); 00436 }
void PagingTestBase::threadInit | ( | ) | [virtual, inherited] |
Reimplemented from ThreadedTestBase.
Definition at line 41 of file PagingTestBase.cpp.
References g_pRNG, and ThreadedTestBase::threadInit().
Referenced by PagingTestBase::PagingTestBase().
00042 { 00043 ThreadedTestBase::threadInit(); 00044 g_pRNG.reset(new std::subtractive_rng()); 00045 }
void PagingTestBase::threadTerminate | ( | ) | [virtual, inherited] |
Reimplemented from ThreadedTestBase.
Definition at line 47 of file PagingTestBase.cpp.
References g_pRNG, and ThreadedTestBase::threadTerminate().
Referenced by PagingTestBase::~PagingTestBase().
00048 { 00049 g_pRNG.reset(); 00050 ThreadedTestBase::threadTerminate(); 00051 }
bool PagingTestBase::testThreadedOp | ( | int | iOp | ) | [virtual, inherited] |
Test implementation must be supplied by derived test class.
iOp | operation type to test |
Implements ThreadedTestBase.
Definition at line 378 of file PagingTestBase.cpp.
References PagingTestBase::checkpointMutex, SXMutexGuard< lockMode >::lock(), PagingTestBase::OP_ALLOCATE, PagingTestBase::OP_CHECKPOINT, PagingTestBase::OP_DEALLOCATE, PagingTestBase::OP_MAX, PagingTestBase::OP_PREFETCH, PagingTestBase::OP_PREFETCH_BATCH, PagingTestBase::OP_READ_NOWAIT, PagingTestBase::OP_READ_RAND, PagingTestBase::OP_READ_SEQ, PagingTestBase::OP_RESIZE_CACHE, PagingTestBase::OP_SCRATCH, PagingTestBase::OP_WRITE_NOWAIT, PagingTestBase::OP_WRITE_RAND, PagingTestBase::OP_WRITE_SEQ, PagingTestBase::OP_WRITE_SKIP, PagingTestBase::testAllocate(), PagingTestBase::testCacheResize(), PagingTestBase::testCheckpointGuarded(), PagingTestBase::testDeallocate(), PagingTestBase::testPrefetch(), PagingTestBase::testPrefetchBatch(), PagingTestBase::testRandomOp(), PagingTestBase::testScratch(), PagingTestBase::testSequentialOp(), and PagingTestBase::testSkipOp().
00379 { 00380 SXMutexSharedGuard checkpointSharedGuard(checkpointMutex,false); 00381 assert(iOp < OP_MAX); 00382 OpType op = static_cast<OpType>(iOp); 00383 switch (op) { 00384 case PagingTestBase::OP_WRITE_SEQ: 00385 checkpointSharedGuard.lock(); 00386 // fall through 00387 case PagingTestBase::OP_READ_SEQ: 00388 testSequentialOp(op); 00389 break; 00390 case PagingTestBase::OP_WRITE_RAND: 00391 case PagingTestBase::OP_WRITE_NOWAIT: 00392 checkpointSharedGuard.lock(); 00393 // fall through 00394 case PagingTestBase::OP_READ_RAND: 00395 case PagingTestBase::OP_READ_NOWAIT: 00396 testRandomOp(op); 00397 break; 00398 case PagingTestBase::OP_WRITE_SKIP: 00399 checkpointSharedGuard.lock(); 00400 testSkipOp(op, 5); 00401 break; 00402 case PagingTestBase::OP_SCRATCH: 00403 testScratch(); 00404 break; 00405 case PagingTestBase::OP_PREFETCH: 00406 testPrefetch(); 00407 break; 00408 case PagingTestBase::OP_PREFETCH_BATCH: 00409 testPrefetchBatch(); 00410 break; 00411 case PagingTestBase::OP_ALLOCATE: 00412 checkpointSharedGuard.lock(); 00413 testAllocate(); 00414 break; 00415 case PagingTestBase::OP_DEALLOCATE: 00416 checkpointSharedGuard.lock(); 00417 testDeallocate(); 00418 break; 00419 case PagingTestBase::OP_CHECKPOINT: 00420 testCheckpointGuarded(); 00421 break; 00422 case PagingTestBase::OP_RESIZE_CACHE: 00423 testCacheResize(); 00424 return false; 00425 default: 00426 permAssert(false); 00427 } 00428 return true; 00429 }
Cache & CacheTestBase::getCache | ( | ) | [inherited] |
Definition at line 42 of file CacheTestBase.cpp.
References CacheTestBase::pCache.
Referenced by lockPage(), prefetchBatch(), SegmentTestBase::prefetchPage(), prefetchPage(), PagingTestBase::testCacheResize(), PagingTestBase::testCheckpoint(), PagingTestBase::testOp(), PagingTestBase::testScratch(), SegmentTestBase::unlockPage(), and unlockPage().
00043 { 00044 return *pCache; 00045 }
SharedCache CacheTestBase::newCache | ( | ) | [virtual, inherited] |
Definition at line 66 of file CacheTestBase.cpp.
References CacheTestBase::cacheParams, Cache::newCache(), CacheTestBase::victimLRU, CacheTestBase::victimPolicy, CacheTestBase::victimRandom, and CacheTestBase::victimTwoQ.
Referenced by CacheTestBase::openStorage().
00067 { 00068 switch (victimPolicy) { 00069 case victimRandom: 00070 return SharedCache( 00071 new RandomCache(cacheParams), 00072 ClosableObjectDestructor()); 00073 case victimLRU: 00074 return SharedCache( 00075 new LRUCache(cacheParams), 00076 ClosableObjectDestructor()); 00077 case victimTwoQ: 00078 return Cache::newCache(cacheParams); 00079 default: 00080 permAssert(false); 00081 } 00082 }
SharedRandomAccessDevice CacheTestBase::openDevice | ( | std::string | devName, | |
DeviceMode | openMode, | |||
uint | nDevicePages, | |||
DeviceId | deviceId | |||
) | [inherited] |
Definition at line 84 of file CacheTestBase.cpp.
References CacheTestBase::cbPageFull, DeviceMode::create, CacheTestBase::pCache, and FileSystem::remove().
Referenced by VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), and CacheTestBase::openStorage().
00087 { 00088 if (openMode.create) { 00089 FileSystem::remove(devName.c_str()); 00090 } 00091 SharedRandomAccessDevice pDevice( 00092 new RandomAccessFileDevice(devName,openMode)); 00093 if (openMode.create) { 00094 pDevice->setSizeInBytes(nDevicePages*cbPageFull); 00095 } 00096 pCache->registerDevice(deviceId,pDevice); 00097 return pDevice; 00098 }
void CacheTestBase::openStorage | ( | DeviceMode | openMode | ) | [virtual, inherited] |
Reimplemented in SegmentTestBase, and SegStorageTestBase.
Definition at line 100 of file CacheTestBase.cpp.
References StatsTimer::addSource(), CacheTestBase::dataDeviceId, CacheTestBase::nDiskPages, CacheTestBase::newCache(), CacheTestBase::openDevice(), CacheTestBase::pCache, CacheTestBase::pRandomAccessDevice, StatsTimer::start(), and TestBase::statsTimer.
Referenced by SegStorageTestBase::openStorage(), PagingTestBase::testMultipleThreads(), testQuotaCacheAccessor(), and testSingleThread().
00101 { 00102 // make a test.dat filename unique to each process 00103 std::ostrstream testDataFile; 00104 testDataFile << "test-" << getpid() << ".dat" << ends; 00105 00106 pCache = newCache(); 00107 00108 statsTimer.addSource(pCache); 00109 statsTimer.start(); 00110 00111 pRandomAccessDevice = openDevice( 00112 testDataFile.str(),openMode,nDiskPages,dataDeviceId); 00113 }
void CacheTestBase::closeStorage | ( | ) | [virtual, inherited] |
Reimplemented in SegStorageTestBase, SnapshotSegmentTestBase, and VersionedSegmentTest.
Definition at line 115 of file CacheTestBase.cpp.
References CacheTestBase::closeDevice(), CacheTestBase::dataDeviceId, CacheTestBase::pCache, CacheTestBase::pRandomAccessDevice, TestBase::statsTimer, and StatsTimer::stop().
Referenced by SegStorageTestBase::closeStorage(), CacheTestBase::testCaseTearDown(), testQuotaCacheAccessor(), and testSingleThread().
00116 { 00117 closeDevice(dataDeviceId,pRandomAccessDevice); 00118 statsTimer.stop(); 00119 if (pCache) { 00120 assert(pCache.unique()); 00121 pCache.reset(); 00122 } 00123 }
void CacheTestBase::testCaseTearDown | ( | ) | [virtual, inherited] |
Equivalent to JUnit TestCase.tearDown; this is called after each test case method is invoked.
Default is no-op.
Reimplemented from TestBase.
Reimplemented in LbmEntryTest, LbmLoadBitmapTest, LbmSearchTest, LcsClusterAppendExecStreamTest, LcsClusterReplaceExecStreamTest, LcsMultiClusterAppendTest, LcsRowScanExecStreamTest, BTreeReadersTest, BTreeTest, ExecStreamTestBase, and LhxHashTableTest.
Definition at line 125 of file CacheTestBase.cpp.
References CacheTestBase::closeStorage().
Referenced by LhxHashTableTest::testCaseTearDown(), ExecStreamTestBase::testCaseTearDown(), BTreeTest::testCaseTearDown(), BTreeReadersTest::testCaseTearDown(), and LbmEntryTest::testCaseTearDown().
00126 { 00127 closeStorage(); 00128 }
void CacheTestBase::closeDevice | ( | DeviceId | deviceId, | |
SharedRandomAccessDevice & | pDevice | |||
) | [inherited] |
Definition at line 130 of file CacheTestBase.cpp.
References CHECKPOINT_FLUSH_AND_UNMAP, and CacheTestBase::pCache.
Referenced by VersionedSegmentTest::closeStorage(), SnapshotSegmentTestBase::closeStorage(), and CacheTestBase::closeStorage().
00132 { 00133 if (!pDevice) { 00134 return; 00135 } 00136 DeviceIdPagePredicate pagePredicate(deviceId); 00137 pCache->checkpointPages(pagePredicate,CHECKPOINT_FLUSH_AND_UNMAP); 00138 pCache->unregisterDevice(deviceId); 00139 assert(pDevice.unique()); 00140 pDevice.reset(); 00141 }
void TestBase::snooze | ( | uint | nSeconds | ) | [protected, inherited] |
Definition at line 263 of file TestBase.cpp.
Referenced by DatabaseTest::executeForceTxn(), ThreadedTestBase::runThreadedTestCase(), PagingTestBase::testCacheResize(), BTreeTxnTest::testCheckpoint(), PagingTestBase::testCheckpointGuarded(), PagingTestBase::testPrefetch(), and PagingTestBase::testPrefetchBatch().
00264 { 00265 #ifdef __MSVC__ 00266 ::_sleep(nSeconds*1000); 00267 #else 00268 ::sleep(nSeconds); 00269 #endif 00270 }
void TestBase::readParams | ( | int | argc, | |
char ** | argv | |||
) | [static, inherited] |
Parses the command line.
format: [-v] [-t TEST | -all] {param=val}* [CONFIGFILE | -] Normally, the test program runs the default test cases. With the option "-all", runs the extra test cases as well. With the option "-t TEST", runs only the single test case named TEST. CONFIGFILE is read to load configuration parameters. Configuration parameters can also be set ad hoc, from the command line, as pairs name=val. These take precedence.
Definition at line 108 of file TestBase.cpp.
References TestBase::configMap, ConfigMap::dumpParams(), ConfigMap::isParamSet(), ConfigMap::mergeFrom(), TestBase::paramDictionaryFileName, ConfigMap::readParams(), TestBase::runAll, TestBase::runSingle, ConfigMap::setStringParam(), and verbose.
00109 { 00110 bool verbose = false; 00111 ConfigMap adhocMap; 00112 00113 for (int i = 1; i < argc; ++i) { 00114 std::string arg = argv[i]; 00115 if (argv[i][0] == '-') { 00116 if (arg == "-v") { 00117 verbose = true; 00118 } else if (arg == "-") { 00119 configMap.readParams(std::cin); 00120 } else if (arg == "-all") { 00121 runAll = true; 00122 } else if (arg == "-t") { // -t TEST 00123 permAssert(i + 1 < argc); 00124 runSingle = argv[++i]; 00125 } else if (arg[1] == 't') { // allow -tTEST 00126 runSingle = arg.substr(2); 00127 } 00128 } else { 00129 int i = arg.find("="); 00130 if ((0 < i) && (i < arg.size())) { 00131 // an ad hoc parameter 00132 std::string key = arg.substr(0,i); 00133 std::string val = arg.substr(i + 1); 00134 adhocMap.setStringParam(key,val); 00135 } else { 00136 // a config file name 00137 std::ifstream configFile(arg.c_str()); 00138 assert(configFile.good()); 00139 configMap.readParams(configFile); 00140 } 00141 } 00142 } 00143 configMap.mergeFrom(adhocMap); 00144 00145 // set a default dictionary file location for use by tests that need a 00146 // small non-random sorted data set 00147 if (!configMap.isParamSet(paramDictionaryFileName)) { 00148 std::string dictFileName = "dictWords"; 00149 configMap.setStringParam(paramDictionaryFileName,dictFileName); 00150 } 00151 00152 if (verbose) { 00153 configMap.dumpParams(std::cout); 00154 } 00155 }
TestSuite * TestBase::releaseTestSuite | ( | ) | [inherited] |
Definition at line 157 of file TestBase.cpp.
References TestBase::TestCaseGroup::addAllToTestSuite(), TestBase::defaultTests, TestBase::extraTests, TestBase::TestCaseGroup::findTest(), TestBase::pTestObj, TestBase::pTestSuite, TestBase::runAll, TestBase::runSingle, and TestBase::testName.
00158 { 00159 assert(pTestObj); 00160 assert(pTestObj.use_count() > 1); 00161 00162 // release self-reference now that all test cases have been registered 00163 pTestObj.reset(); 00164 00165 TestSuite* pTestSuite = BOOST_TEST_SUITE(testName.c_str()); 00166 00167 if (runSingle.size()) { 00168 test_unit *p = defaultTests.findTest(runSingle); 00169 if (!p) { 00170 p = extraTests.findTest(runSingle); 00171 } 00172 if (!p) { 00173 std::cerr << "test " << runSingle << " not found\n"; 00174 exit(2); 00175 } 00176 pTestSuite->add(p); 00177 } else { 00178 defaultTests.addAllToTestSuite(pTestSuite); 00179 if (runAll) { 00180 extraTests.addAllToTestSuite(pTestSuite); 00181 } 00182 } 00183 return pTestSuite; 00184 }
void TestBase::beforeTestCase | ( | std::string | testCaseName | ) | [inherited] |
Definition at line 214 of file TestBase.cpp.
References TestBase::configMap, TraceSource::initTraceSource(), AutoBacktrace::install(), TestBase::notifyTrace(), AutoBacktrace::setOutputStream(), AutoBacktrace::setTraceTarget(), TestBase::testName, and TRACE_INFO.
00215 { 00216 notifyTrace(testName,TRACE_INFO,"ENTER: " + testCaseName); 00217 00218 // Install the AutoBacktrace signal handler now, after 00219 // boost::execution_monitor::catch_signals() has installed its own, so that 00220 // on SIGABRT AutoBacktrace goes first, prints the backtrace, then chains 00221 // to boost, which handles the error. 00222 AutoBacktrace::setOutputStream(); 00223 AutoBacktrace::setTraceTarget(shared_from_this()); 00224 AutoBacktrace::install(); 00225 configMap.initTraceSource(shared_from_this(), "testConfig"); 00226 }
void TestBase::afterTestCase | ( | std::string | testCaseName | ) | [inherited] |
Definition at line 228 of file TestBase.cpp.
References TestBase::configMap, TraceSource::disableTracing(), TestBase::notifyTrace(), AutoBacktrace::setTraceTarget(), TestBase::testName, and TRACE_INFO.
00229 { 00230 AutoBacktrace::setTraceTarget(); 00231 configMap.disableTracing(); 00232 notifyTrace(testName,TRACE_INFO,"LEAVE: " + testCaseName); 00233 }
void TestBase::testCaseSetUp | ( | ) | [virtual, inherited] |
Equivalent to JUnit TestCase.setUp; this is called before each test case method is invoked.
Default is no-op.
Reimplemented in LbmEntryTest, LbmExecStreamTestBase, LbmLoadBitmapTest, LbmSearchTest, LbmSplicerExecStreamTest, LcsClusterAppendExecStreamTest, LcsClusterReplaceExecStreamTest, LcsMultiClusterAppendTest, LcsRowScanExecStreamTest, BTreeReadersTest, BTreeTest, BTreeTxnTest, ExecStreamGovernorTest, ExecStreamTestBase, ExecStreamUnitTestBase, ExternalSortExecStreamTest, LhxHashTableTest, LogicalTxnTest, and SnapshotSegmentTestBase.
Definition at line 235 of file TestBase.cpp.
Referenced by ExecStreamTestBase::testCaseSetUp().
void TestBase::notifyTrace | ( | std::string | source, | |
TraceLevel | level, | |||
std::string | message | |||
) | [virtual, inherited] |
Receives notification when a trace event occurs.
source | the facility from which the message originated | |
level | the trace event severity level | |
message | the text of the message |
Implements TraceTarget.
Definition at line 243 of file TestBase.cpp.
References TestBase::traceFile, TestBase::traceMutex, TestBase::traceStdout, and TestBase::traceStream.
Referenced by TestBase::afterTestCase(), and TestBase::beforeTestCase().
00244 { 00245 if (traceFile || traceStdout) { 00246 StrictMutexGuard traceMutexGuard(traceMutex); 00247 if (traceFile) { 00248 traceStream << "[" << source << "] " << message << std::endl; 00249 traceStream.flush(); 00250 } 00251 if (traceStdout) { 00252 std::cout << "[" << source << "] " << message << std::endl; 00253 std::cout.flush(); 00254 } 00255 } 00256 }
TraceLevel TestBase::getSourceTraceLevel | ( | std::string | source | ) | [virtual, inherited] |
Gets the level at which a particular source should be traced.
source | name of source to be traced |
Implements TraceTarget.
Definition at line 258 of file TestBase.cpp.
References TestBase::traceLevel.
Referenced by LbmExecStreamTestBase::generateBitmaps().
00259 { 00260 return traceLevel; 00261 }
void ThreadedTestBase::runThreadedTestCase | ( | ) | [protected, inherited] |
Executes specified test threads.
Definition at line 43 of file ThreadedTestBase.cpp.
References ThreadedTestBase::bDone, ThreadedTestBase::defaultThreadCount, ThreadedTestBase::nSeconds, ThreadedTestBase::pStartBarrier, TestBase::snooze(), ThreadPoolBase::start(), ThreadPoolBase::stop(), ThreadPool< Task >::submitTask(), and ThreadedTestBase::threadCounts.
Referenced by PagingTestBase::testMultipleThreads(), and BTreeTxnTest::testTxns().
00044 { 00045 bDone = false; 00046 00047 // materialize default thread counts 00048 std::replace_if( 00049 threadCounts.begin(), 00050 threadCounts.end(), 00051 std::bind2nd(std::equal_to<int>(),-1), 00052 defaultThreadCount); 00053 00054 // calculate how many threads are needed 00055 int nThreads = std::accumulate( 00056 threadCounts.begin(), 00057 threadCounts.end(), 00058 0); 00059 00060 // initialize a barrier to make sure they all start at once 00061 pStartBarrier.reset(new boost::barrier(nThreads)); 00062 00063 // fire 'em up 00064 ThreadPool<ThreadedTestBaseTask> threadPool; 00065 threadPool.start(nThreads); 00066 00067 // and distribute the tasks 00068 for (uint i = 0; i < threadCounts.size(); ++i) { 00069 for (int j = 0; j < threadCounts[i]; ++j) { 00070 ThreadedTestBaseTask task(*this,i); 00071 threadPool.submitTask(task); 00072 } 00073 } 00074 00075 // run the tests for the requested duration 00076 snooze(nSeconds); 00077 00078 // tell threads to quit and then wait for them to finish up 00079 bDone = true; 00080 threadPool.stop(); 00081 }
uint PagingTestBase::cbPageUsable [protected, inherited] |
Portion of each page that should be scribbled on.
Definition at line 49 of file PagingTestBase.h.
Referenced by CacheTest(), PagingTestBase::fillPage(), SegmentTestBase::openStorage(), PagingTestBase::PagingTestBase(), and PagingTestBase::verifyPage().
uint PagingTestBase::nRandomOps [protected, inherited] |
Number of random access operations to run per pass.
Definition at line 54 of file PagingTestBase.h.
Referenced by PagingTestBase::PagingTestBase(), SegmentTestBase::testAllocate(), SegmentTestBase::testDeallocate(), PagingTestBase::testRandomOp(), and PagingTestBase::testScratch().
uint PagingTestBase::nSecondsBetweenCheckpoints [protected, inherited] |
Checkpoint interval during multi-threaded test.
Definition at line 59 of file PagingTestBase.h.
Referenced by PagingTestBase::PagingTestBase(), and PagingTestBase::testCheckpointGuarded().
StrictMutex PagingTestBase::logMutex [protected, inherited] |
Protects output stream.
Definition at line 64 of file PagingTestBase.h.
Referenced by SegmentTestBase::testAllocate(), PagingTestBase::testCacheResize(), PagingTestBase::testCheckpointGuarded(), SegmentTestBase::testDeallocate(), PagingTestBase::testPrefetch(), PagingTestBase::testPrefetchBatch(), PagingTestBase::testRandomOp(), PagingTestBase::testScratch(), PagingTestBase::testSequentialOp(), and PagingTestBase::testSkipOp().
SXMutex PagingTestBase::checkpointMutex [protected, inherited] |
SXMutex used to synchronize checkpoints with write actions.
Definition at line 69 of file PagingTestBase.h.
Referenced by PagingTestBase::PagingTestBase(), PagingTestBase::testCheckpointGuarded(), and PagingTestBase::testThreadedOp().
bool PagingTestBase::bTestResize [protected, inherited] |
Flag indicating that the cache should be dynamically resized during the multi-threaded portion of the test.
Definition at line 75 of file PagingTestBase.h.
Referenced by PagingTestBase::PagingTestBase().
VictimPolicy CacheTestBase::victimPolicy [protected, inherited] |
VictimPolicy to instantiate.
Definition at line 53 of file CacheTestBase.h.
Referenced by CacheTestBase::CacheTestBase(), and CacheTestBase::newCache().
CacheParams CacheTestBase::cacheParams [protected, inherited] |
Parameters for cache initialization.
Definition at line 58 of file CacheTestBase.h.
Referenced by CacheTestBase::CacheTestBase(), CacheTestBase::newCache(), BackupRestoreTest::testBackupCleanup(), BackupRestoreTest::testHeaderBackupRestore(), and SegPageEntryIterTest::testIter().
SharedCache CacheTestBase::pCache [protected, inherited] |
Cache instance being tested.
Definition at line 63 of file CacheTestBase.h.
Referenced by BackupRestoreTest::backup(), CacheTestBase::closeDevice(), CacheTestBase::closeStorage(), LbmSplicerExecStreamTest::createBTree(), SegStorageTestBase::createLinearDeviceSegment(), LogicalTxnTest::createRecoveryLog(), BackupRestoreTest::createSnapshotData(), BackupRestoreTest::executeSnapshotTxn(), CacheTestBase::getCache(), LbmSearchTest::initBTreeExecStreamParam(), LbmLoadBitmapTest::initBTreeExecStreamParam(), LbmSearchTest::initBTreeParam(), LbmLoadBitmapTest::initBTreeParam(), LcsClusterReplaceExecStreamTest::initClusterAppendParams(), LbmExecStreamTestBase::initSorterExecStream(), LcsClusterReplaceExecStreamTest::loadCluster(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), SegmentTestBase::lockPage(), LbmMinusExecStreamTest::newMinusStream(), ExecStreamTestBase::newStreamGraphEmbryo(), CacheTestBase::openDevice(), CacheTestBase::openStorage(), LcsClusterReplaceExecStreamTest::replaceCluster(), BackupRestoreTest::restore(), LbmSplicerExecStreamTest::spliceInput(), SegmentTestBase::testAllocate(), RandomAllocationSegmentTest::testAllocateAndDeallocate(), BackupRestoreTest::testBackupCleanup(), ExecStreamTestSuite::testBTreeInsertExecStream(), BTreeTest::testBulkLoad(), LhxHashTableTest::testCaseSetUp(), ExecStreamUnitTestBase::testCaseSetUp(), BTreeTest::testCaseSetUp(), BTreeReadersTest::testCaseSetUp(), LhxAggExecStreamTest::testCountImpl(), SegmentTestBase::testDeallocate(), SnapshotSegmentTest::testDeallocateOld(), ExecStreamTestSuite::testDoubleBufferExecStream(), ExecStreamGovernorTest::testGovernor(), LhxAggExecStreamTest::testGroupCountImpl(), BackupRestoreTest::testHeaderBackupRestore(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), BTreeTest::testInserts(), LbmIntersectExecStreamTest::testIntersect(), SegPageIterTest::testIter(), SegPageEntryIterTest::testIter(), testLargeCacheInit(), testLargeCacheRequest(), LbmEntryTest::testldb35(), LbmEntryTest::testler5920(), LbmLoadBitmapTest::testLoad(), LcsClusterAppendExecStreamTest::testLoadMultiCol(), LcsClusterAppendExecStreamTest::testLoadSingleCol(), SegStreamTest::testMarkReset(), LbmEntryTest::testMergeEntry(), BTreeTest::testMultiKeySearches(), testQuotaCacheAccessor(), BTreeReadersTest::testReaders(), SegStreamTest::testReadSeg(), BTreeTest::testScan(), LcsRowScanExecStreamTest::testScanOnEmptyCluster(), ExecStreamTestSuite::testScratchBufferExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), FlatFileExecStreamTest::testStream(), LhxAggExecStreamTest::testSumImpl(), LogicalTxnTest::testTxn(), LogicalTxnTest::testTxnIdSequence(), LbmUnionExecStreamTest::testUnion(), SegStreamTest::testWriteSeg(), SegStreamTest::testWriteSpillAndRead(), LbmEntryTest::testZeroBytes(), and BackupRestoreTest::verifySnapshotData().
SharedRandomAccessDevice CacheTestBase::pRandomAccessDevice [protected, inherited] |
The default cached device.
Definition at line 68 of file CacheTestBase.h.
Referenced by BackupRestoreTest::backup(), CacheTestBase::closeStorage(), SegStorageTestBase::openSegmentStorage(), CacheTestBase::openStorage(), and BackupRestoreTest::restore().
uint CacheTestBase::nMemPages [protected, inherited] |
Size of cache in memory pages.
Definition at line 73 of file CacheTestBase.h.
Referenced by CacheTestBase::CacheTestBase(), PagingTestBase::testCacheResize(), and ExecStreamTestBase::testCaseSetUp().
uint CacheTestBase::nDiskPages [protected, inherited] |
Size of device in disk pages.
Definition at line 78 of file CacheTestBase.h.
Referenced by CacheTestBase::CacheTestBase(), LinearViewSegmentTest::LinearViewSegmentTest(), makeBlockId(), VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), CacheTestBase::openStorage(), SegStreamTest::SegStreamTest(), SnapshotSegmentTestBase::SnapshotSegmentTestBase(), SnapshotSegmentTest::testDeallocateOld(), PagingTestBase::testPrefetch(), PagingTestBase::testPrefetchBatch(), PagingTestBase::testRandomOp(), SnapshotSegmentTest::testRollback(), PagingTestBase::testSequentialOp(), and PagingTestBase::testSkipOp().
uint CacheTestBase::cbPageFull [protected, inherited] |
Disk page size.
Definition at line 83 of file CacheTestBase.h.
Referenced by CacheTest(), CacheTestBase::CacheTestBase(), CacheTestBase::openDevice(), and SegStorageTestBase::openSegmentStorage().
DeviceId CacheTestBase::dataDeviceId [protected, inherited] |
Fixed ID to assign to data device.
Definition at line 88 of file CacheTestBase.h.
Referenced by CacheTestBase::CacheTestBase(), CacheTestBase::closeStorage(), makeBlockId(), SnapshotSegmentTestBase::openSegmentStorage(), SegStorageTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), CacheTestBase::openStorage(), and PagingTestBase::testCheckpoint().
TestSuite* TestBase::pTestSuite [protected, inherited] |
Boost test suite.
Definition at line 59 of file TestBase.h.
Referenced by TestBase::releaseTestSuite().
boost::shared_ptr<TestBase> TestBase::pTestObj [protected, inherited] |
Definition at line 61 of file TestBase.h.
Referenced by TestBase::releaseTestSuite(), and TestBase::TestBase().
std::ofstream TestBase::traceStream [protected, inherited] |
Output file stream for tracing.
Definition at line 66 of file TestBase.h.
Referenced by TestBase::notifyTrace(), TestBase::TestBase(), and TestBase::~TestBase().
StrictMutex TestBase::traceMutex [protected, inherited] |
Protects traceStream.
Definition at line 71 of file TestBase.h.
Referenced by TestBase::notifyTrace().
std::string TestBase::testName [protected, inherited] |
Name of test.
Definition at line 76 of file TestBase.h.
Referenced by TestBase::afterTestCase(), TestBase::beforeTestCase(), TestBase::releaseTestSuite(), TestBase::TestBase(), LhxHashTableTest::testInsert1Ka(), and LhxHashTableTest::testInsert1Kb().
TraceLevel TestBase::traceLevel [protected, inherited] |
Level at which to trace test execution.
Definition at line 81 of file TestBase.h.
Referenced by TestBase::getSourceTraceLevel(), and TestBase::TestBase().
FileStatsTarget TestBase::statsTarget [protected, inherited] |
StatsTimer TestBase::statsTimer [protected, inherited] |
Timer for stats collection.
Definition at line 91 of file TestBase.h.
Referenced by CacheTestBase::closeStorage(), CacheTestBase::openStorage(), BTreeTxnTest::testCaseSetUp(), BTreeTxnTest::testCaseTearDown(), and BTreeTxnTest::testTxns().
bool TestBase::traceStdout [protected, inherited] |
Copy trace output to stdout.
Definition at line 99 of file TestBase.h.
Referenced by TestBase::notifyTrace(), and TestBase::TestBase().
bool TestBase::traceFile [protected, inherited] |
Copy trace output to file.
Definition at line 104 of file TestBase.h.
Referenced by TestBase::notifyTrace(), and TestBase::TestBase().
bool TestBase::runAll [static, protected, inherited] |
Run all test cases, including the extra tests.
(static, since set by readParams())
Definition at line 110 of file TestBase.h.
Referenced by TestBase::readParams(), and TestBase::releaseTestSuite().
std::string TestBase::runSingle [static, protected, inherited] |
Run only the test case of this name.
(static, since set by readParams())
Definition at line 116 of file TestBase.h.
Referenced by TestBase::readParams(), and TestBase::releaseTestSuite().
TestCaseGroup TestBase::defaultTests [protected, inherited] |
TestCaseGroup TestBase::extraTests [protected, inherited] |
ParamName TestBase::paramTestSuiteName [static, inherited] |
ParamName TestBase::paramTraceFileName [static, inherited] |
ParamName TestBase::paramDictionaryFileName [static, inherited] |
Definition at line 145 of file TestBase.h.
Referenced by TestBase::readParams(), SegStreamTest::testRead(), and SegStreamTest::testWrite().
ParamName TestBase::paramTraceLevel [static, inherited] |
ParamName TestBase::paramStatsFileName [static, inherited] |
Definition at line 147 of file TestBase.h.
ParamName TestBase::paramTraceStdout [static, inherited] |
ParamName TestBase::paramDegreeOfParallelism [static, inherited] |
Definition at line 149 of file TestBase.h.
Referenced by ParallelExecStreamSchedulerTest::ParallelExecStreamSchedulerTest().
ConfigMap TestBase::configMap [static, inherited] |
Configuration parameters.
The reason this is static is so that no constructor parameters (which burden virtual bases) are needed.
Definition at line 155 of file TestBase.h.
Referenced by TestBase::afterTestCase(), TestBase::beforeTestCase(), BTreeTxnTest::BTreeTxnTest(), CacheTestBase::CacheTestBase(), BackupRestoreTest::createSnapshotData(), DatabaseTest::DatabaseTest(), TestOptionsTest::extra(), DatabaseTest::loadDatabase(), SparseBitmapTest::openStorage(), PagingTestBase::PagingTestBase(), ParallelExecStreamSchedulerTest::ParallelExecStreamSchedulerTest(), RandomAccessFileDeviceTest::RandomAccessFileDeviceTest(), TestBase::readParams(), SegStorageTestBase::SegStorageTestBase(), TestOptionsTest::test1(), TestOptionsTest::test2(), BackupRestoreTest::testBackupCleanup(), TestBase::TestBase(), BTreeTxnTest::testCaseSetUp(), BTreeTxnTest::testCheckpoint(), DatabaseTest::testCreateEmpty(), DatabaseTest::testForceTxns(), BackupRestoreTest::testHeaderBackupRestore(), SegPageEntryIterTest::testIter(), SegStreamTest::testRead(), BTreeTxnTest::testTxns(), SegStreamTest::testWrite(), ThreadedTestBase::ThreadedTestBase(), and TestBase::~TestBase().
uint ThreadedTestBase::nSeconds [protected, inherited] |
Duration of multi-threaded test.
Definition at line 65 of file ThreadedTestBase.h.
Referenced by BTreeTxnTest::BTreeTxnTest(), PagingTestBase::PagingTestBase(), ThreadedTestBase::runThreadedTestCase(), PagingTestBase::testCacheResize(), and ThreadedTestBase::ThreadedTestBase().
std::vector<int> ThreadedTestBase::threadCounts [protected, inherited] |
Number of threads to run for each type of operation.
Definition at line 70 of file ThreadedTestBase.h.
Referenced by BTreeTxnTest::BTreeTxnTest(), CacheTest(), SegmentTestBase::openStorage(), PagingTestBase::PagingTestBase(), ThreadedTestBase::runThreadedTestCase(), and SegmentTestBase::SegmentTestBase().