Inheritance diagram for LcsClusterAppendExecStreamTest:
Public Member Functions | |
LcsClusterAppendExecStreamTest () | |
void | testCaseSetUp () |
Equivalent to JUnit TestCase.setUp; this is called before each test case method is invoked. | |
void | testCaseTearDown () |
Equivalent to JUnit TestCase.tearDown; this is called after each test case method is invoked. | |
void | testSingleColNoDupNewRoot () |
void | testSingleColNoDupOldRoot () |
void | testSingleColConstNewRoot () |
void | testSingleColConstOldRoot () |
void | testSingleColStairNewRoot () |
void | testSingleColStairOldRoot () |
void | testMultiColNoDupNewRoot () |
void | testMultiColNoDupOldRoot () |
void | testMultiColConstNewRoot () |
void | testMultiColConstOldRoot () |
void | testMultiColStairNewRoot () |
void | testMultiColStairOldRoot () |
virtual void | openStorage (DeviceMode openMode) |
virtual void | openSegmentStorage (DeviceMode openMode) |
virtual void | openRandomSegment () |
SharedSegment | createLinearDeviceSegment (DeviceId deviceId, uint nPages) |
void | closeLinearSegment () |
void | closeRandomSegment () |
void | closeVersionedRandomSegment () |
void | closeSnapshotRandomSegment () |
virtual void | closeStorage () |
Cache & | getCache () |
virtual SharedCache | newCache () |
SharedRandomAccessDevice | openDevice (std::string devName, DeviceMode openMode, uint nDevicePages, DeviceId deviceId) |
void | closeDevice (DeviceId deviceId, SharedRandomAccessDevice &pDevice) |
TestSuite * | releaseTestSuite () |
void | beforeTestCase (std::string testCaseName) |
void | afterTestCase (std::string testCaseName) |
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 | |
void | testLoadSingleCol (uint nRows, uint startRid, bool newRoot, SharedMockProducerExecStreamGenerator pGeneratorInit, std::string testName="LcsClusterAppendExecStreamTest") |
void | testLoadMultiCol (uint nRows, uint nCols, bool newRoot, SharedMockProducerExecStreamGenerator pGeneratorInit, std::string testName="LcsClusterAppendExecStreamTest") |
void | verifyClusterPages (std::string testName, uint nCols) |
void | testScanSingleCol (uint nrows, SharedMockProducerExecStreamGenerator pGeneratorInit, SharedMockProducerExecStreamGenerator pResultGenerator) |
void | setUpDelIndexScan (ExecStreamEmbryo &valuesStreamEmbryo) |
void | testScanMultiCol (uint nrows, uint nCols, SharedMockProducerExecStreamGenerator pGeneratorInit, SharedMockProducerExecStreamGenerator pResultGenerator) |
SharedExecStream | prepareSourceGraph (ExecStreamEmbryo &sourceStreamEmbryo) |
Defines and prepares a graph consisting of one source stream. | |
SharedExecStream | prepareTransformGraph (ExecStreamEmbryo &sourceStreamEmbryo, ExecStreamEmbryo &transformStreamEmbryo) |
Defines and prepares a graph consisting of one source stream and one transform stream. | |
SharedExecStream | prepareTransformGraph (ExecStreamEmbryo &sourceStreamEmbryo, std::vector< ExecStreamEmbryo > &transforms) |
Defines and prepares a graph consisting of one source stream and one or multiple transform streams. | |
SharedExecStream | prepareConfluenceGraph (ExecStreamEmbryo &sourceStreamEmbryo1, ExecStreamEmbryo &sourceStreamEmbryo2, ExecStreamEmbryo &confluenceStreamEmbryo) |
Defines and prepares a graph consisting of two source streams and one confluence stream. | |
SharedExecStream | prepareConfluenceGraph (std::vector< ExecStreamEmbryo > &sourceStreamEmbryos, ExecStreamEmbryo &confluenceStreamEmbryo) |
Defines and prepares a graph consisting of a list of source streams and one confluence stream. | |
SharedExecStream | prepareConfluenceGraph (std::vector< std::vector< ExecStreamEmbryo > > &sourceStreamEmbryosList, ExecStreamEmbryo &confluenceStreamEmbryo) |
Defines and prepares a graph consisting of one or more source streams and one confluence stream. | |
SharedExecStream | prepareConfluenceTransformGraph (ExecStreamEmbryo &sourceStreamEmbryo1, ExecStreamEmbryo &sourceStreamEmbryo2, ExecStreamEmbryo &confluenceStreamEmbryo, ExecStreamEmbryo &transformStreamEmbryo) |
Defines and prepares a graph consisting of two source streams, one confluence stream, and one transform stream. | |
SharedExecStream | prepareDAG (ExecStreamEmbryo &srcStreamEmbryo, ExecStreamEmbryo &splitterStreamEmbryo, std::vector< ExecStreamEmbryo > &interStreamEmbryos, ExecStreamEmbryo &destStreamEmbryo, bool createSink=true, bool saveSrc=true) |
Defines and prepares a graph consisting of a source, a splitter, and one or more parallel transform streams which flow together into a confluence stream. | |
SharedExecStream | prepareDAG (ExecStreamEmbryo &srcStreamEmbryo, ExecStreamEmbryo &splitterStreamEmbryo, std::vector< std::vector< ExecStreamEmbryo > > &interStreamEmbryosList, ExecStreamEmbryo &destStreamEmbryo, bool createSink=true, bool saveSrc=true) |
Defines and prepares a graph consisting of a source, a splitter, and one or more parallel transform streams which flow together into a confluence stream. | |
void | verifyOutput (ExecStream &stream, uint nRowsExpected, MockProducerExecStreamGenerator &verifier, bool stopEarly=false) |
Executes the prepared stream graph and verifies that its output matches that produced by a value generator. | |
void | verifyConstantOutput (ExecStream &stream, const TupleData &expectedTuple, uint nRowsExpected) |
Executes the prepared stream graph and verifies that all output tuples matche an expected and given one. | |
void | verifyBufferedOutput (ExecStream &stream, TupleDescriptor outputTupleDesc, uint nRowsExpected, PBuffer expectedBuffer) |
Executes the prepared stream graph and verifies the resultant tuples against a set of tuples supplied in an input buffer. | |
void | resetExecStreamTest () |
Reset stream graph so multiple iterations of a method can be called within a single testcase. | |
virtual void | tearDownExecStreamTest () |
ExecStream-specific handler called from testCaseTearDown. | |
virtual SharedExecStreamGraph | newStreamGraph () |
Creates a stream graph. | |
virtual SharedExecStreamGraphEmbryo | newStreamGraphEmbryo (SharedExecStreamGraph) |
Creates an embryo for a stream graph. | |
virtual ExecStreamScheduler * | newScheduler () |
Creates a scheduler. | |
virtual ExecStreamGovernor * | newResourceGovernor (ExecStreamResourceKnobs const &knobSettings, ExecStreamResourceQuantity const &resourcesAvailable) |
Creates the resource governor. | |
void | snooze (uint nSeconds) |
Protected Attributes | |
StandardTypeDescriptorFactory | stdTypeFactory |
TupleAttributeDescriptor | attrDesc_int64 |
TupleAttributeDescriptor | attrDesc_bitmap |
PageId | savedRootPageId |
BTreeDescriptor | btreeDescriptor |
SharedExecStreamGraph | pGraph |
SharedExecStreamGraphEmbryo | pGraphEmbryo |
SharedExecStreamScheduler | pScheduler |
SharedExecStreamGovernor | pResourceGovernor |
SharedCacheAccessor | pCacheAccessor |
SharedSegmentFactory | pSegmentFactory |
SharedSegment | pLinearSegment |
Segment supporting linear page allocation. | |
SharedSegment | pRandomSegment |
(Optional) segment supporting random page allocation. | |
SharedSegment | pVersionedRandomSegment |
(Optional) segment supporting versioned random page allocation. | |
SharedSegment | pSnapshotRandomSegment |
(Optional) segment supporting snapshot random page allocation. | |
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 |
Static Protected Attributes | |
static const uint | DefaultCacheReservePercent = 5 |
static const uint | DefaultConcurrentStatements = 4 |
static bool | runAll |
Run all test cases, including the extra tests. | |
static std::string | runSingle |
Run only the test case of this name. |
Definition at line 45 of file LcsClusterAppendExecStreamTest.cpp.
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 };
LcsClusterAppendExecStreamTest::LcsClusterAppendExecStreamTest | ( | ) | [inline, explicit] |
Definition at line 85 of file LcsClusterAppendExecStreamTest.cpp.
References testMultiColConstNewRoot(), testMultiColConstOldRoot(), testMultiColNoDupNewRoot(), testMultiColNoDupOldRoot(), testMultiColStairNewRoot(), testMultiColStairOldRoot(), testSingleColConstNewRoot(), testSingleColConstOldRoot(), testSingleColNoDupNewRoot(), testSingleColNoDupOldRoot(), testSingleColStairNewRoot(), and testSingleColStairOldRoot().
00086 { 00087 FENNEL_UNIT_TEST_CASE( 00088 LcsClusterAppendExecStreamTest, 00089 testSingleColNoDupNewRoot); 00090 FENNEL_UNIT_TEST_CASE( 00091 LcsClusterAppendExecStreamTest, 00092 testSingleColNoDupOldRoot); 00093 FENNEL_UNIT_TEST_CASE( 00094 LcsClusterAppendExecStreamTest, 00095 testSingleColConstNewRoot); 00096 FENNEL_UNIT_TEST_CASE( 00097 LcsClusterAppendExecStreamTest, 00098 testSingleColConstOldRoot); 00099 FENNEL_UNIT_TEST_CASE( 00100 LcsClusterAppendExecStreamTest, 00101 testSingleColStairNewRoot); 00102 FENNEL_UNIT_TEST_CASE( 00103 LcsClusterAppendExecStreamTest, 00104 testSingleColStairOldRoot); 00105 00106 FENNEL_UNIT_TEST_CASE( 00107 LcsClusterAppendExecStreamTest, 00108 testMultiColNoDupNewRoot); 00109 FENNEL_UNIT_TEST_CASE( 00110 LcsClusterAppendExecStreamTest, 00111 testMultiColNoDupOldRoot); 00112 FENNEL_UNIT_TEST_CASE( 00113 LcsClusterAppendExecStreamTest, 00114 testMultiColConstNewRoot); 00115 FENNEL_UNIT_TEST_CASE( 00116 LcsClusterAppendExecStreamTest, 00117 testMultiColConstOldRoot); 00118 FENNEL_UNIT_TEST_CASE( 00119 LcsClusterAppendExecStreamTest, 00120 testMultiColStairNewRoot); 00121 FENNEL_UNIT_TEST_CASE( 00122 LcsClusterAppendExecStreamTest, 00123 testMultiColStairOldRoot); 00124 }
void LcsClusterAppendExecStreamTest::testLoadSingleCol | ( | uint | nRows, | |
uint | startRid, | |||
bool | newRoot, | |||
SharedMockProducerExecStreamGenerator | pGeneratorInit, | |||
std::string | testName = "LcsClusterAppendExecStreamTest" | |||
) | [protected] |
Definition at line 194 of file LcsClusterAppendExecStreamTest.cpp.
References attrDesc_int64, btreeDescriptor, BTreeBuilder::createEmptyRoot(), BTreeAccessBase::getRootPageId(), ExecStreamEmbryo::getStream(), ExecStreamEmbryo::init(), LcsClusterAppendExecStreamParams::inputProj, BTreeParams::keyProj, BTreeDescriptor::keyProjection, MockProducerExecStreamParams::nRows, NULL_PAGE_ID, SingleOutputExecStreamParams::outputTupleDesc, BTreeDescriptor::pageOwnerId, BTreeParams::pageOwnerId, CacheTestBase::pCache, SegmentAccessor::pCacheAccessor, ExecStreamParams::pCacheAccessor, MockProducerExecStreamParams::pGenerator, SegStorageTestBase::pRandomSegment, ExecStreamUnitTestBase::prepareTransformGraph(), BTreeParams::pRootMap, SegmentAccessor::pSegment, BTreeParams::pSegment, SegStorageTestBase::pSegmentFactory, BTreeParams::rootPageId, BTreeDescriptor::rootPageId, BTreeParams::rootPageIdParamId, savedRootPageId, ExecStreamParams::scratchAccessor, BTreeDescriptor::segmentAccessor, BTreeDescriptor::segmentId, BTreeParams::segmentId, BTreeParams::tupleDesc, BTreeDescriptor::tupleDescriptor, verifyClusterPages(), and ExecStreamUnitTestBase::verifyOutput().
Referenced by testSingleColConstNewRoot(), testSingleColConstOldRoot(), testSingleColNoDupNewRoot(), testSingleColNoDupOldRoot(), testSingleColStairNewRoot(), and testSingleColStairOldRoot().
00200 { 00201 SharedMockProducerExecStreamGenerator pGenerator = pGeneratorInit; 00202 00203 MockProducerExecStreamParams mockParams; 00204 mockParams.outputTupleDesc.push_back(attrDesc_int64); 00205 mockParams.nRows = nRows; 00206 mockParams.pGenerator = pGenerator; 00207 00208 ExecStreamEmbryo mockStreamEmbryo; 00209 mockStreamEmbryo.init(new MockProducerExecStream(), mockParams); 00210 mockStreamEmbryo.getStream()->setName("MockProducerExecStream"); 00211 00212 LcsClusterAppendExecStreamParams lcsAppendParams; 00213 lcsAppendParams.scratchAccessor = 00214 pSegmentFactory->newScratchSegment(pCache, 10); 00215 lcsAppendParams.pCacheAccessor = pCache; 00216 lcsAppendParams.pSegment = pRandomSegment; 00217 00218 lcsAppendParams.inputProj.push_back(0); 00219 00220 // initialize the btree parameter portion of lcsAppendParams 00221 // BTree tuple desc only has one column 00222 (lcsAppendParams.tupleDesc).push_back(attrDesc_int64); 00223 (lcsAppendParams.tupleDesc).push_back(attrDesc_int64); 00224 00225 // BTree key only has one column which is the first column. 00226 (lcsAppendParams.keyProj).push_back(0); 00227 00228 // output only single row with 2 columns (# rows loaded, starting rid value) 00229 lcsAppendParams.outputTupleDesc.push_back(attrDesc_int64); 00230 lcsAppendParams.outputTupleDesc.push_back(attrDesc_int64); 00231 00232 lcsAppendParams.pRootMap = 0; 00233 lcsAppendParams.rootPageIdParamId = DynamicParamId(0); 00234 00235 // Set up BTreeExecStreamParams using default values from BTreeDescriptor. 00236 lcsAppendParams.segmentId = btreeDescriptor.segmentId; 00237 lcsAppendParams.pageOwnerId = btreeDescriptor.pageOwnerId; 00238 00239 // setup temporary btree descriptor to get an empty page to start the btree 00240 btreeDescriptor.segmentAccessor.pSegment = lcsAppendParams.pSegment; 00241 btreeDescriptor.segmentAccessor.pCacheAccessor = pCache; 00242 btreeDescriptor.tupleDescriptor = lcsAppendParams.tupleDesc; 00243 btreeDescriptor.keyProjection = lcsAppendParams.keyProj; 00244 btreeDescriptor.rootPageId = newRoot ? NULL_PAGE_ID : savedRootPageId; 00245 00246 BTreeBuilder builder(btreeDescriptor, pRandomSegment); 00247 00248 // if BTree root not yet setup 00249 if (newRoot) { 00250 builder.createEmptyRoot(); 00251 savedRootPageId = builder.getRootPageId(); 00252 } 00253 00254 lcsAppendParams.rootPageId = btreeDescriptor.rootPageId = savedRootPageId; 00255 00256 /* 00257 Now use the above initialized parameter 00258 */ 00259 LcsClusterAppendExecStream *lcsStream = new LcsClusterAppendExecStream(); 00260 00261 ExecStreamEmbryo lcsAppendStreamEmbryo; 00262 lcsAppendStreamEmbryo.init(lcsStream, lcsAppendParams); 00263 lcsAppendStreamEmbryo.getStream()->setName("LcsClusterAppendExecStream"); 00264 00265 SharedExecStream pOutputStream = prepareTransformGraph( 00266 mockStreamEmbryo, lcsAppendStreamEmbryo); 00267 00268 // set up a generator which can produce the expected output 00269 vector<boost::shared_ptr<ColumnGenerator<int64_t> > > columnGenerators; 00270 SharedInt64ColumnGenerator colGen = 00271 SharedInt64ColumnGenerator(new SeqColumnGenerator(nRows)); 00272 columnGenerators.push_back(colGen); 00273 colGen = SharedInt64ColumnGenerator(new SeqColumnGenerator(startRid)); 00274 columnGenerators.push_back(colGen); 00275 00276 CompositeExecStreamGenerator expectedResultGenerator(columnGenerators); 00277 00278 verifyOutput(*pOutputStream, 1, expectedResultGenerator); 00279 00280 // read records from btree to obtain cluster page ids 00281 // and dump out contents of cluster pages 00282 verifyClusterPages(testName, 1); 00283 }
void LcsClusterAppendExecStreamTest::testLoadMultiCol | ( | uint | nRows, | |
uint | nCols, | |||
bool | newRoot, | |||
SharedMockProducerExecStreamGenerator | pGeneratorInit, | |||
std::string | testName = "LcsClusterAppendExecStreamTest" | |||
) | [protected] |
Definition at line 285 of file LcsClusterAppendExecStreamTest.cpp.
References attrDesc_int64, btreeDescriptor, BTreeBuilder::createEmptyRoot(), BTreeAccessBase::getRootPageId(), ExecStreamEmbryo::getStream(), ExecStreamEmbryo::init(), LcsClusterAppendExecStreamParams::inputProj, BTreeParams::keyProj, BTreeDescriptor::keyProjection, MockProducerExecStreamParams::nRows, NULL_PAGE_ID, SingleOutputExecStreamParams::outputTupleDesc, BTreeDescriptor::pageOwnerId, BTreeParams::pageOwnerId, CacheTestBase::pCache, SegmentAccessor::pCacheAccessor, ExecStreamParams::pCacheAccessor, MockProducerExecStreamParams::pGenerator, SegStorageTestBase::pRandomSegment, ExecStreamUnitTestBase::prepareTransformGraph(), BTreeParams::pRootMap, SegmentAccessor::pSegment, BTreeParams::pSegment, SegStorageTestBase::pSegmentFactory, BTreeParams::rootPageId, BTreeDescriptor::rootPageId, BTreeParams::rootPageIdParamId, savedRootPageId, ExecStreamParams::scratchAccessor, BTreeDescriptor::segmentAccessor, BTreeDescriptor::segmentId, BTreeParams::segmentId, BTreeParams::tupleDesc, BTreeDescriptor::tupleDescriptor, verifyClusterPages(), and ExecStreamUnitTestBase::verifyOutput().
Referenced by testMultiColConstNewRoot(), testMultiColConstOldRoot(), testMultiColNoDupNewRoot(), testMultiColNoDupOldRoot(), testMultiColStairNewRoot(), and testMultiColStairOldRoot().
00291 { 00292 SharedMockProducerExecStreamGenerator pGenerator = pGeneratorInit; 00293 00294 MockProducerExecStreamParams mockParams; 00295 for (uint i = 0; i < nCols; i ++) { 00296 mockParams.outputTupleDesc.push_back(attrDesc_int64); 00297 } 00298 mockParams.nRows = nRows; 00299 mockParams.pGenerator = pGenerator; 00300 00301 ExecStreamEmbryo mockStreamEmbryo; 00302 mockStreamEmbryo.init(new MockProducerExecStream(), mockParams); 00303 mockStreamEmbryo.getStream()->setName("MockProducerExecStream"); 00304 00305 LcsClusterAppendExecStreamParams lcsAppendParams; 00306 lcsAppendParams.scratchAccessor = 00307 pSegmentFactory->newScratchSegment(pCache, 10); 00308 lcsAppendParams.pCacheAccessor = pCache; 00309 lcsAppendParams.pSegment = pRandomSegment; 00310 00311 // initialize the btree parameter portion of lcsAppendParams 00312 // BTree tuple desc only has one column 00313 (lcsAppendParams.tupleDesc).push_back(attrDesc_int64); 00314 (lcsAppendParams.tupleDesc).push_back(attrDesc_int64); 00315 00316 // BTree key only has one column which is the first column. 00317 (lcsAppendParams.keyProj).push_back(0); 00318 00319 // output only one value(rows inserted) 00320 lcsAppendParams.outputTupleDesc.push_back(attrDesc_int64); 00321 00322 for (uint i = 0; i < nCols; i++) { 00323 lcsAppendParams.inputProj.push_back(i); 00324 } 00325 lcsAppendParams.pRootMap = 0; 00326 lcsAppendParams.rootPageIdParamId = DynamicParamId(0); 00327 00328 // Set up BTreeExecStreamParams using default values from BTreeDescriptor. 00329 lcsAppendParams.segmentId = btreeDescriptor.segmentId; 00330 lcsAppendParams.pageOwnerId = btreeDescriptor.pageOwnerId; 00331 00332 // setup temporary btree descriptor to get an empty page to start the btree 00333 00334 btreeDescriptor.segmentAccessor.pSegment = lcsAppendParams.pSegment; 00335 btreeDescriptor.segmentAccessor.pCacheAccessor = pCache; 00336 btreeDescriptor.tupleDescriptor = lcsAppendParams.tupleDesc; 00337 btreeDescriptor.keyProjection = lcsAppendParams.keyProj; 00338 btreeDescriptor.rootPageId = newRoot ? NULL_PAGE_ID : savedRootPageId; 00339 00340 BTreeBuilder builder(btreeDescriptor, pRandomSegment); 00341 00342 // if BTree root not yet setup 00343 if (newRoot) { 00344 builder.createEmptyRoot(); 00345 savedRootPageId = builder.getRootPageId(); 00346 } 00347 00348 lcsAppendParams.rootPageId = btreeDescriptor.rootPageId = savedRootPageId; 00349 00350 /* 00351 Now use the above initialized parameter 00352 */ 00353 ExecStreamEmbryo lcsAppendStreamEmbryo; 00354 lcsAppendStreamEmbryo.init( 00355 new LcsClusterAppendExecStream(), 00356 lcsAppendParams); 00357 lcsAppendStreamEmbryo.getStream()->setName("LcsClusterAppendExecStream"); 00358 00359 SharedExecStream pOutputStream = prepareTransformGraph( 00360 mockStreamEmbryo, lcsAppendStreamEmbryo); 00361 00362 // set up a generator which can produce the expected output 00363 RampExecStreamGenerator expectedResultGenerator(mockParams.nRows); 00364 00365 verifyOutput(*pOutputStream, 1, expectedResultGenerator); 00366 00367 // read records from btree to obtain cluster page ids 00368 // and dump out contents of cluster pages 00369 verifyClusterPages(testName, nCols); 00370 }
void LcsClusterAppendExecStreamTest::verifyClusterPages | ( | std::string | testName, | |
uint | nCols | |||
) | [protected] |
Definition at line 147 of file LcsClusterAppendExecStreamTest.cpp.
References attrDesc_int64, btreeDescriptor, ClusterPageData::bTreeRid, ClusterPageData::clusterPageId, LcsClusterDump::dump(), LcsClusterNode::firstRID, LcsClusterReader::getFirstClusterPageForRead(), LcsClusterReader::getNextClusterPageForRead(), LcsClusterVerifier::getPageData(), opaqueToInt(), SegmentAccessor::pSegment, BTreeDescriptor::segmentAccessor, and TRACE_INFO.
Referenced by testLoadMultiCol(), and testLoadSingleCol().
00150 { 00151 bool found; 00152 PConstLcsClusterNode pBlock; 00153 PageId clusterPageId; 00154 LcsRid rid; 00155 ClusterPageData pageData; 00156 uint blockSize = 00157 btreeDescriptor.segmentAccessor.pSegment->getUsablePageSize(); 00158 LcsClusterVerifier clusterVerifier(btreeDescriptor); 00159 TupleDescriptor colTupleDesc; 00160 for (uint i = 0; i < nCols; i++) { 00161 colTupleDesc.push_back(attrDesc_int64); 00162 } 00163 LcsClusterDump clusterDump( 00164 btreeDescriptor, 00165 colTupleDesc, 00166 TRACE_INFO, 00167 shared_from_this(), 00168 testName); 00169 00170 // read every cluster page 00171 00172 found = clusterVerifier.getFirstClusterPageForRead(pBlock); 00173 if (!found) { 00174 BOOST_FAIL("getFirstClusterPageForRead found nothing"); 00175 } 00176 do { 00177 pageData = clusterVerifier.getPageData(); 00178 // make sure the rid on the btree matches the rid on the cluster 00179 // page 00180 BOOST_CHECK_EQUAL(pageData.bTreeRid, pBlock->firstRID); 00181 clusterDump.dump( 00182 opaqueToInt(pageData.clusterPageId), 00183 pBlock, 00184 blockSize); 00185 } while (found = clusterVerifier.getNextClusterPageForRead(pBlock)); 00186 }
void LcsClusterAppendExecStreamTest::testScanSingleCol | ( | uint | nrows, | |
SharedMockProducerExecStreamGenerator | pGeneratorInit, | |||
SharedMockProducerExecStreamGenerator | pResultGenerator | |||
) | [protected] |
Definition at line 372 of file LcsClusterAppendExecStreamTest.cpp.
References attrDesc_int64, btreeDescriptor, LcsClusterScanDef::clusterTupleDesc, ExecStreamEmbryo::getStream(), LcsRowScanExecStreamParams::hasExtraFilter, ExecStreamEmbryo::init(), LcsRowScanExecStreamParams::isFullScan, BTreeParams::keyProj, BTreeDescriptor::keyProjection, LcsRowScanBaseExecStreamParams::lcsClusterScanDefs, LcsRowScanBaseExecStreamParams::outputProj, BTreeDescriptor::pageOwnerId, BTreeParams::pageOwnerId, SegmentAccessor::pCacheAccessor, ExecStreamParams::pCacheAccessor, ExecStreamUnitTestBase::prepareTransformGraph(), SegmentAccessor::pSegment, BTreeParams::pSegment, BTreeDescriptor::rootPageId, BTreeParams::rootPageId, SAMPLING_OFF, LcsRowScanExecStreamParams::samplingMode, BTreeDescriptor::segmentAccessor, BTreeDescriptor::segmentId, BTreeParams::segmentId, setUpDelIndexScan(), BTreeParams::tupleDesc, BTreeDescriptor::tupleDescriptor, and ExecStreamUnitTestBase::verifyOutput().
Referenced by testSingleColConstNewRoot(), testSingleColConstOldRoot(), testSingleColNoDupNewRoot(), testSingleColNoDupOldRoot(), testSingleColStairNewRoot(), and testSingleColStairOldRoot().
00376 { 00377 SharedMockProducerExecStreamGenerator pGenerator = pGeneratorInit; 00378 00379 // setup parameters into scan 00380 // single cluster with only one column, project that single column 00381 00382 LcsRowScanExecStreamParams scanParams; 00383 scanParams.hasExtraFilter = false; 00384 scanParams.isFullScan = true; 00385 scanParams.samplingMode = SAMPLING_OFF; 00386 00387 struct LcsClusterScanDef clusterScanDef; 00388 00389 clusterScanDef.clusterTupleDesc.push_back(attrDesc_int64); 00390 clusterScanDef.pSegment = btreeDescriptor.segmentAccessor.pSegment; 00391 clusterScanDef.pCacheAccessor = 00392 btreeDescriptor.segmentAccessor.pCacheAccessor; 00393 clusterScanDef.tupleDesc = btreeDescriptor.tupleDescriptor; 00394 clusterScanDef.keyProj = btreeDescriptor.keyProjection; 00395 clusterScanDef.rootPageId = btreeDescriptor.rootPageId; 00396 clusterScanDef.segmentId = btreeDescriptor.segmentId; 00397 clusterScanDef.pageOwnerId = btreeDescriptor.pageOwnerId; 00398 00399 scanParams.lcsClusterScanDefs.push_back(clusterScanDef); 00400 scanParams.outputTupleDesc.push_back(attrDesc_int64); 00401 scanParams.outputProj.push_back(0); 00402 00403 ExecStreamEmbryo valuesStreamEmbryo; 00404 setUpDelIndexScan(valuesStreamEmbryo); 00405 00406 ExecStreamEmbryo scanStreamEmbryo; 00407 00408 scanStreamEmbryo.init(new LcsRowScanExecStream(), scanParams); 00409 scanStreamEmbryo.getStream()->setName("RowScanExecStream"); 00410 00411 SharedExecStream pOutputStream = 00412 prepareTransformGraph(valuesStreamEmbryo, scanStreamEmbryo); 00413 00414 // result should be sequence of rows 00415 verifyOutput(*pOutputStream, nrows, *pResultGenerator); 00416 }
void LcsClusterAppendExecStreamTest::setUpDelIndexScan | ( | ExecStreamEmbryo & | valuesStreamEmbryo | ) | [protected] |
Definition at line 418 of file LcsClusterAppendExecStreamTest.cpp.
References attrDesc_bitmap, attrDesc_int64, ValuesExecStreamParams::bufSize, FixedBuffer, ExecStreamEmbryo::getStream(), ExecStreamEmbryo::init(), SingleOutputExecStreamParams::outputTupleDesc, and ValuesExecStreamParams::pTupleBuffer.
Referenced by testScanMultiCol(), and testScanSingleCol().
00420 { 00421 ValuesExecStreamParams valuesParams; 00422 boost::shared_array<FixedBuffer> pBuffer; 00423 00424 // setup a values stream to provide an empty input to simulate 00425 // the scan of the deletion index 00426 valuesParams.outputTupleDesc.push_back(attrDesc_int64); 00427 valuesParams.outputTupleDesc.push_back(attrDesc_bitmap); 00428 valuesParams.outputTupleDesc.push_back(attrDesc_bitmap); 00429 00430 uint bufferSize = 16; 00431 pBuffer.reset(new FixedBuffer[bufferSize]); 00432 valuesParams.pTupleBuffer = pBuffer; 00433 valuesParams.bufSize = 0; 00434 valuesStreamEmbryo.init(new ValuesExecStream(), valuesParams); 00435 valuesStreamEmbryo.getStream()->setName("ValuesExecStream"); 00436 }
void LcsClusterAppendExecStreamTest::testScanMultiCol | ( | uint | nrows, | |
uint | nCols, | |||
SharedMockProducerExecStreamGenerator | pGeneratorInit, | |||
SharedMockProducerExecStreamGenerator | pResultGenerator | |||
) | [protected] |
Definition at line 438 of file LcsClusterAppendExecStreamTest.cpp.
References attrDesc_int64, btreeDescriptor, LcsClusterScanDef::clusterTupleDesc, ExecStreamEmbryo::getStream(), LcsRowScanExecStreamParams::hasExtraFilter, ExecStreamEmbryo::init(), LcsRowScanExecStreamParams::isFullScan, BTreeParams::keyProj, BTreeDescriptor::keyProjection, LcsRowScanBaseExecStreamParams::lcsClusterScanDefs, LcsRowScanBaseExecStreamParams::outputProj, BTreeDescriptor::pageOwnerId, BTreeParams::pageOwnerId, SegmentAccessor::pCacheAccessor, ExecStreamParams::pCacheAccessor, ExecStreamUnitTestBase::prepareTransformGraph(), SegmentAccessor::pSegment, BTreeParams::pSegment, BTreeDescriptor::rootPageId, BTreeParams::rootPageId, SAMPLING_OFF, LcsRowScanExecStreamParams::samplingMode, BTreeDescriptor::segmentAccessor, BTreeDescriptor::segmentId, BTreeParams::segmentId, setUpDelIndexScan(), BTreeParams::tupleDesc, BTreeDescriptor::tupleDescriptor, and ExecStreamUnitTestBase::verifyOutput().
Referenced by testMultiColConstNewRoot(), testMultiColConstOldRoot(), testMultiColNoDupNewRoot(), testMultiColNoDupOldRoot(), testMultiColStairNewRoot(), and testMultiColStairOldRoot().
00443 { 00444 uint i; 00445 SharedMockProducerExecStreamGenerator pGenerator = pGeneratorInit; 00446 00447 // setup parameters into scan 00448 // single cluster with only n columns, project all columns 00449 00450 LcsRowScanExecStreamParams scanParams; 00451 scanParams.hasExtraFilter = false; 00452 scanParams.isFullScan = true; 00453 scanParams.samplingMode = SAMPLING_OFF; 00454 struct LcsClusterScanDef clusterScanDef; 00455 00456 for (i = 0; i < nCols; i++) { 00457 clusterScanDef.clusterTupleDesc.push_back(attrDesc_int64); 00458 } 00459 00460 clusterScanDef.pSegment = btreeDescriptor.segmentAccessor.pSegment; 00461 clusterScanDef.pCacheAccessor = 00462 btreeDescriptor.segmentAccessor.pCacheAccessor; 00463 clusterScanDef.tupleDesc = btreeDescriptor.tupleDescriptor; 00464 clusterScanDef.keyProj = btreeDescriptor.keyProjection; 00465 clusterScanDef.rootPageId = btreeDescriptor.rootPageId; 00466 clusterScanDef.segmentId = btreeDescriptor.segmentId; 00467 clusterScanDef.pageOwnerId = btreeDescriptor.pageOwnerId; 00468 00469 scanParams.lcsClusterScanDefs.push_back(clusterScanDef); 00470 for (i = 0; i < nCols; i++) { 00471 scanParams.outputTupleDesc.push_back(attrDesc_int64); 00472 scanParams.outputProj.push_back(i); 00473 } 00474 00475 ExecStreamEmbryo valuesStreamEmbryo; 00476 setUpDelIndexScan(valuesStreamEmbryo); 00477 00478 ExecStreamEmbryo scanStreamEmbryo; 00479 00480 scanStreamEmbryo.init(new LcsRowScanExecStream(), scanParams); 00481 scanStreamEmbryo.getStream()->setName("RowScanExecStream"); 00482 00483 SharedExecStream pOutputStream = 00484 prepareTransformGraph(valuesStreamEmbryo, scanStreamEmbryo); 00485 00486 // result should be sequence of rows 00487 verifyOutput(*pOutputStream, nrows, *pResultGenerator); 00488 }
void LcsClusterAppendExecStreamTest::testCaseSetUp | ( | ) | [virtual] |
Equivalent to JUnit TestCase.setUp; this is called before each test case method is invoked.
Default is no-op.
Reimplemented from ExecStreamUnitTestBase.
Definition at line 490 of file LcsClusterAppendExecStreamTest.cpp.
References attrDesc_bitmap, attrDesc_int64, StandardTypeDescriptorFactory::newDataType(), NULL_PAGE_ID, SegStorageTestBase::pRandomSegment, savedRootPageId, STANDARD_TYPE_CHAR, STANDARD_TYPE_INT_64, stdTypeFactory, and ExecStreamUnitTestBase::testCaseSetUp().
00491 { 00492 ExecStreamUnitTestBase::testCaseSetUp(); 00493 00494 attrDesc_int64 = TupleAttributeDescriptor( 00495 stdTypeFactory.newDataType(STANDARD_TYPE_INT_64)); 00496 attrDesc_bitmap = TupleAttributeDescriptor( 00497 stdTypeFactory.newDataType(STANDARD_TYPE_CHAR), 00498 true, pRandomSegment->getUsablePageSize() / 8); 00499 00500 savedRootPageId = NULL_PAGE_ID; 00501 }
void LcsClusterAppendExecStreamTest::testCaseTearDown | ( | ) | [virtual] |
Equivalent to JUnit TestCase.tearDown; this is called after each test case method is invoked.
Default is no-op.
Reimplemented from ExecStreamTestBase.
Definition at line 503 of file LcsClusterAppendExecStreamTest.cpp.
References btreeDescriptor, SegmentAccessor::reset(), BTreeDescriptor::segmentAccessor, and ExecStreamTestBase::testCaseTearDown().
00504 { 00505 btreeDescriptor.segmentAccessor.reset(); 00506 ExecStreamUnitTestBase::testCaseTearDown(); 00507 }
void LcsClusterAppendExecStreamTest::testSingleColNoDupNewRoot | ( | ) |
Definition at line 509 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadSingleCol(), and testScanSingleCol().
Referenced by LcsClusterAppendExecStreamTest().
00510 { 00511 // 1. load 848 rows 00512 // 2. scan 848 rows 00513 00514 SharedMockProducerExecStreamGenerator pGenerator = 00515 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00516 SharedMockProducerExecStreamGenerator pResultGenerator = 00517 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00518 00519 testLoadSingleCol( 00520 848, 0, true, pGenerator, "testSingleColNoDupNewRoot"); 00521 resetExecStreamTest(); 00522 testScanSingleCol(848, pGenerator, pResultGenerator); 00523 }
void LcsClusterAppendExecStreamTest::testSingleColNoDupOldRoot | ( | ) |
Definition at line 531 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadSingleCol(), and testScanSingleCol().
Referenced by LcsClusterAppendExecStreamTest().
00532 { 00533 // 1. load 848 rows 00534 // 2. scan first 848 rows 00535 // 3. load 848 more rows 00536 00537 SharedMockProducerExecStreamGenerator pGenerator = 00538 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00539 SharedMockProducerExecStreamGenerator pResultGenerator = 00540 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00541 00542 testLoadSingleCol( 00543 848, 0, true, pGenerator, "testSingleColNoDupOldRoot"); 00544 resetExecStreamTest(); 00545 // this will test scans of variable mode batches 00546 testScanSingleCol(848, pGenerator, pResultGenerator); 00547 00548 resetExecStreamTest(); 00549 testLoadSingleCol( 00550 848, 848, false, pGenerator, "testSingleColNoDupOldRoot"); 00551 }
void LcsClusterAppendExecStreamTest::testSingleColConstNewRoot | ( | ) |
Definition at line 554 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadSingleCol(), and testScanSingleCol().
Referenced by LcsClusterAppendExecStreamTest().
00555 { 00556 // 1. load 848 rows 00557 // 2. scan 848 rows 00558 00559 SharedMockProducerExecStreamGenerator pGenerator = 00560 SharedMockProducerExecStreamGenerator(new ConstExecStreamGenerator(72)); 00561 SharedMockProducerExecStreamGenerator pResultGenerator = 00562 SharedMockProducerExecStreamGenerator(new ConstExecStreamGenerator(72)); 00563 00564 testLoadSingleCol( 00565 848, 0, true, pGenerator, "testSingleColConstNewRoot"); 00566 resetExecStreamTest(); 00567 00568 pGenerator.reset(new RampExecStreamGenerator()); 00569 testScanSingleCol(848, pGenerator, pResultGenerator); 00570 }
void LcsClusterAppendExecStreamTest::testSingleColConstOldRoot | ( | ) |
Definition at line 578 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadSingleCol(), and testScanSingleCol().
Referenced by LcsClusterAppendExecStreamTest().
00579 { 00580 // 1. load 10 rows 00581 // 2. load 10 more rows 00582 // 3. scan 20 rows 00583 00584 SharedMockProducerExecStreamGenerator pGenerator = 00585 SharedMockProducerExecStreamGenerator(new ConstExecStreamGenerator(72)); 00586 SharedMockProducerExecStreamGenerator pResultGenerator = 00587 SharedMockProducerExecStreamGenerator(new ConstExecStreamGenerator(72)); 00588 00589 testLoadSingleCol( 00590 10, 0, true, pGenerator, "testSingleColConstOldRoot"); 00591 resetExecStreamTest(); 00592 testLoadSingleCol( 00593 10, 10, false, pGenerator, "testSingleColConstOldRoot"); 00594 00595 resetExecStreamTest(); 00596 pGenerator.reset(new RampExecStreamGenerator()); 00597 testScanSingleCol(20, pGenerator, pResultGenerator); 00598 }
void LcsClusterAppendExecStreamTest::testSingleColStairNewRoot | ( | ) |
Definition at line 600 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadSingleCol(), and testScanSingleCol().
Referenced by LcsClusterAppendExecStreamTest().
00601 { 00602 // 1. load 848 rows 00603 // 2. scan 848 rows 00604 00605 SharedMockProducerExecStreamGenerator pGenerator = 00606 SharedMockProducerExecStreamGenerator( 00607 new StairCaseExecStreamGenerator(1, 7)); 00608 SharedMockProducerExecStreamGenerator pResultGenerator = 00609 SharedMockProducerExecStreamGenerator( 00610 new StairCaseExecStreamGenerator(1, 7)); 00611 00612 testLoadSingleCol( 00613 848, 0, true, pGenerator, "testSingleColStairNewRoot"); 00614 resetExecStreamTest(); 00615 00616 pGenerator.reset(new RampExecStreamGenerator()); 00617 testScanSingleCol(848, pGenerator, pResultGenerator); 00618 }
void LcsClusterAppendExecStreamTest::testSingleColStairOldRoot | ( | ) |
Definition at line 626 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadSingleCol(), and testScanSingleCol().
Referenced by LcsClusterAppendExecStreamTest().
00627 { 00628 // 1. load 10 rows 00629 // 2. scan first 10 rows 00630 // 3. load 10 more rows 00631 00632 SharedMockProducerExecStreamGenerator pGenerator = 00633 SharedMockProducerExecStreamGenerator( 00634 new StairCaseExecStreamGenerator(1, 7)); 00635 SharedMockProducerExecStreamGenerator pRidGenerator = 00636 SharedMockProducerExecStreamGenerator( 00637 new RampExecStreamGenerator()); 00638 SharedMockProducerExecStreamGenerator pResultGenerator = 00639 SharedMockProducerExecStreamGenerator( 00640 new StairCaseExecStreamGenerator(1, 7)); 00641 00642 testLoadSingleCol( 00643 10, 0, true, pGenerator, "testSingleColStairOldRoot"); 00644 resetExecStreamTest(); 00645 testScanSingleCol(10, pRidGenerator, pResultGenerator); 00646 00647 resetExecStreamTest(); 00648 testLoadSingleCol( 00649 10, 10, false, pGenerator, "testSingleColStairOldRoot"); 00650 }
void LcsClusterAppendExecStreamTest::testMultiColNoDupNewRoot | ( | ) |
Definition at line 652 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadMultiCol(), and testScanMultiCol().
Referenced by LcsClusterAppendExecStreamTest().
00653 { 00654 // 1. load 848 rows 00655 // 2. scan 848 rows 00656 00657 SharedMockProducerExecStreamGenerator pGenerator = 00658 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00659 SharedMockProducerExecStreamGenerator pResultGenerator = 00660 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00661 00662 testLoadMultiCol(848, 3, true, pGenerator, "testMultiColNoDupNewRoot"); 00663 resetExecStreamTest(); 00664 testScanMultiCol(848, 3, pGenerator, pResultGenerator); 00665 }
void LcsClusterAppendExecStreamTest::testMultiColNoDupOldRoot | ( | ) |
Definition at line 673 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadMultiCol(), and testScanMultiCol().
Referenced by LcsClusterAppendExecStreamTest().
00674 { 00675 // 1. load 15000 rows 00676 // 2. scan first 15000 rows 00677 // 3. load 15000 more rows 00678 // 00679 // 15000 rows with 12 cols is large enough to force a split of the 00680 // cluster btree 00681 00682 SharedMockProducerExecStreamGenerator pGenerator = 00683 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00684 SharedMockProducerExecStreamGenerator pRidGenerator = 00685 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00686 SharedMockProducerExecStreamGenerator pResultGenerator = 00687 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00688 00689 testLoadMultiCol(15000, 12, true, pGenerator,"testMultiColNoDupOldRoot"); 00690 resetExecStreamTest(); 00691 testScanMultiCol(15000, 12, pRidGenerator, pResultGenerator); 00692 00693 resetExecStreamTest(); 00694 testLoadMultiCol(15000, 12, false, pGenerator, "testMultiColNoDupOldRoot"); 00695 }
void LcsClusterAppendExecStreamTest::testMultiColConstNewRoot | ( | ) |
Definition at line 698 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadMultiCol(), and testScanMultiCol().
Referenced by LcsClusterAppendExecStreamTest().
00699 { 00700 // 1. load 848 rows 00701 // 2. scan 848 rows 00702 00703 SharedMockProducerExecStreamGenerator pGenerator = 00704 SharedMockProducerExecStreamGenerator(new ConstExecStreamGenerator(72)); 00705 SharedMockProducerExecStreamGenerator pResultGenerator = 00706 SharedMockProducerExecStreamGenerator(new ConstExecStreamGenerator(72)); 00707 00708 testLoadMultiCol(848, 3, true, pGenerator, "testMultiColConstNewRoot"); 00709 resetExecStreamTest(); 00710 00711 pGenerator.reset(new RampExecStreamGenerator()); 00712 testScanMultiCol(848, 3, pGenerator, pResultGenerator); 00713 }
void LcsClusterAppendExecStreamTest::testMultiColConstOldRoot | ( | ) |
Definition at line 721 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadMultiCol(), and testScanMultiCol().
Referenced by LcsClusterAppendExecStreamTest().
00722 { 00723 // 1. load 10 rows 00724 // 2. load 10 more rows 00725 // 3. scan 20 rows 00726 00727 SharedMockProducerExecStreamGenerator pGenerator = 00728 SharedMockProducerExecStreamGenerator(new ConstExecStreamGenerator(72)); 00729 SharedMockProducerExecStreamGenerator pResultGenerator = 00730 SharedMockProducerExecStreamGenerator(new ConstExecStreamGenerator(72)); 00731 00732 testLoadMultiCol(10, 3, true, pGenerator, "testMultiColConstOldRoot"); 00733 resetExecStreamTest(); 00734 testLoadMultiCol(10, 3, false, pGenerator, "testMultiColConstOldRoot"); 00735 00736 resetExecStreamTest(); 00737 pGenerator.reset(new RampExecStreamGenerator()); 00738 testScanMultiCol(20, 3, pGenerator, pResultGenerator); 00739 }
void LcsClusterAppendExecStreamTest::testMultiColStairNewRoot | ( | ) |
Definition at line 741 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadMultiCol(), and testScanMultiCol().
Referenced by LcsClusterAppendExecStreamTest().
00742 { 00743 // 1. load 848 rows 00744 // 2. scan 848 rows 00745 00746 SharedMockProducerExecStreamGenerator pGenerator = 00747 SharedMockProducerExecStreamGenerator( 00748 new StairCaseExecStreamGenerator(1, 7)); 00749 SharedMockProducerExecStreamGenerator pResultGenerator = 00750 SharedMockProducerExecStreamGenerator( 00751 new StairCaseExecStreamGenerator(1, 7)); 00752 00753 testLoadMultiCol(848, 3, true, pGenerator, "testMultiColStairNewRoot"); 00754 resetExecStreamTest(); 00755 00756 pGenerator.reset(new RampExecStreamGenerator()); 00757 testScanMultiCol(848, 3, pGenerator, pResultGenerator); 00758 }
void LcsClusterAppendExecStreamTest::testMultiColStairOldRoot | ( | ) |
Definition at line 766 of file LcsClusterAppendExecStreamTest.cpp.
References ExecStreamUnitTestBase::resetExecStreamTest(), testLoadMultiCol(), and testScanMultiCol().
Referenced by LcsClusterAppendExecStreamTest().
00767 { 00768 // 1. load 10 rows 00769 // 2. scan first 10 rows 00770 // 3. load more 10 rows 00771 00772 SharedMockProducerExecStreamGenerator pGenerator = 00773 SharedMockProducerExecStreamGenerator( 00774 new StairCaseExecStreamGenerator(1, 7)); 00775 SharedMockProducerExecStreamGenerator pRidGenerator = 00776 SharedMockProducerExecStreamGenerator(new RampExecStreamGenerator()); 00777 SharedMockProducerExecStreamGenerator pResultGenerator = 00778 SharedMockProducerExecStreamGenerator( 00779 new StairCaseExecStreamGenerator(1, 7)); 00780 00781 testLoadMultiCol(10, 3, true, pGenerator, "testMultiColStairOldRoot"); 00782 resetExecStreamTest(); 00783 testScanMultiCol(10, 3, pRidGenerator, pResultGenerator); 00784 00785 resetExecStreamTest(); 00786 testLoadMultiCol(10, 3, false, pGenerator, "testMultiColStairOldRoot"); 00787 }
SharedExecStream ExecStreamUnitTestBase::prepareSourceGraph | ( | ExecStreamEmbryo & | sourceStreamEmbryo | ) | [protected, inherited] |
Defines and prepares a graph consisting of one source stream.
sourceStreamEmbryo | embryonic source stream which produces tuples |
Definition at line 41 of file ExecStreamUnitTestBase.cpp.
References ExecStreamUnitTestBase::prepareTransformGraph().
Referenced by FlatFileExecStreamTest::testStream().
00043 { 00044 std::vector<ExecStreamEmbryo> transforms; 00045 return prepareTransformGraph(sourceStreamEmbryo, transforms); 00046 }
SharedExecStream ExecStreamUnitTestBase::prepareTransformGraph | ( | ExecStreamEmbryo & | sourceStreamEmbryo, | |
ExecStreamEmbryo & | transformStreamEmbryo | |||
) | [protected, inherited] |
Defines and prepares a graph consisting of one source stream and one transform stream.
sourceStreamEmbryo | embryonic source stream which produces tuples | |
transformStreamEmbryo | embryonic transform stream which processes tuples produced by sourceStreamEmbryo |
Definition at line 48 of file ExecStreamUnitTestBase.cpp.
Referenced by LcsClusterReplaceExecStreamTest::loadCluster(), LcsRowScanExecStreamTest::loadOneCluster(), ExecStreamUnitTestBase::prepareSourceGraph(), LcsClusterReplaceExecStreamTest::replaceCluster(), LcsMultiClusterAppendTest::scanCols(), LbmSplicerExecStreamTest::spliceInput(), ExecStreamTestSuite::testBTreeInsertExecStream(), CollectExecStreamTestSuite::testCollectCollectUncollectUncollect(), CollectExecStreamTestSuite::testCollectInts(), CollectExecStreamTestSuite::testCollectUncollect(), CalcExecStreamTestSuite::testConstant(), ExecStreamTestSuite::testCopyExecStream(), ExecStreamTestSuite::testCountAggExecStream(), LhxAggExecStreamTest::testCountImpl(), ExecStreamTestSuite::testDoubleBufferExecStream(), ExecStreamTestSuite::testGroupAggExecStreamNrows(), LhxAggExecStreamTest::testGroupCountImpl(), ExternalSortExecStreamTest::testImpl(), testLoadMultiCol(), testLoadSingleCol(), LbmNormalizerExecStreamTest::testNormalizer(), ExecStreamTestSuite::testReshapeExecStream(), LcsRowScanExecStreamTest::testSampleScanCols(), LcsRowScanExecStreamTest::testScanCols(), LbmSearchTest::testScanIdx(), testScanMultiCol(), testScanSingleCol(), ExecStreamTestSuite::testScratchBufferExecStream(), ExecStreamTestSuite::testSegBufferExecStream(), ExecStreamTestSuite::testSingleValueAggExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), LbmSortedAggExecStreamTest::testSortedAgg(), ExecStreamTestSuite::testSumAggExecStream(), LhxAggExecStreamTest::testSumImpl(), LbmUnionExecStreamTest::testUnion(), and LcsClusterReplaceExecStreamTest::verifyCluster().
00051 { 00052 std::vector<ExecStreamEmbryo> transforms; 00053 transforms.push_back(transformStreamEmbryo); 00054 return prepareTransformGraph(sourceStreamEmbryo, transforms); 00055 }
SharedExecStream ExecStreamUnitTestBase::prepareTransformGraph | ( | ExecStreamEmbryo & | sourceStreamEmbryo, | |
std::vector< ExecStreamEmbryo > & | transforms | |||
) | [protected, inherited] |
Defines and prepares a graph consisting of one source stream and one or multiple transform streams.
sourceStreamEmbryo | embryonic source stream which produces tuples | |
transforms | embryonic transform streams which process tuples produced by sourceStreamEmbryo or a child stream |
Definition at line 57 of file ExecStreamUnitTestBase.cpp.
References BUFPROV_PRODUCER, ExecStreamEmbryo::getStream(), ExecStreamUnitTestBase::pGraph, and ExecStreamUnitTestBase::pGraphEmbryo.
00060 { 00061 pGraphEmbryo->saveStreamEmbryo(sourceStreamEmbryo); 00062 std::vector<ExecStreamEmbryo>::iterator it; 00063 00064 // save all transforms 00065 for (it = transforms.begin(); it != transforms.end(); ++it) { 00066 pGraphEmbryo->saveStreamEmbryo(*it); 00067 } 00068 00069 // connect streams in a cascade 00070 ExecStreamEmbryo& previousStream = sourceStreamEmbryo; 00071 for (it = transforms.begin(); it != transforms.end(); ++it) { 00072 pGraphEmbryo->addDataflow( 00073 previousStream.getStream()->getName(), 00074 (*it).getStream()->getName()); 00075 previousStream = *it; 00076 } 00077 00078 SharedExecStream pAdaptedStream = 00079 pGraphEmbryo->addAdapterFor( 00080 previousStream.getStream()->getName(), 00081 0, 00082 BUFPROV_PRODUCER); 00083 pGraph->addOutputDataflow(pAdaptedStream->getStreamId()); 00084 00085 pGraphEmbryo->prepareGraph(shared_from_this(), ""); 00086 return pAdaptedStream; 00087 }
SharedExecStream ExecStreamUnitTestBase::prepareConfluenceGraph | ( | ExecStreamEmbryo & | sourceStreamEmbryo1, | |
ExecStreamEmbryo & | sourceStreamEmbryo2, | |||
ExecStreamEmbryo & | confluenceStreamEmbryo | |||
) | [protected, inherited] |
Defines and prepares a graph consisting of two source streams and one confluence stream.
sourceStreamEmbryo1 | embryonic source stream which produces tuples | |
sourceStreamEmbryo2 | embryonic source stream which produces tuples | |
confluenceStreamEmbryo | embryonic confluence stream which processes tuples produced by the sourceStreamEmbryos |
Definition at line 89 of file ExecStreamUnitTestBase.cpp.
Referenced by ExecStreamUnitTestBase::prepareConfluenceGraph(), ExecStreamTestSuite::testCartesianJoinExecStream(), CorrelationJoinExecStreamTestSuite::testCorrelationJoin(), LcsRowScanExecStreamTest::testFilterCols(), ExecStreamGovernorTest::testGovernor(), LhxJoinExecStreamTest::testImpl(), LbmIntersectExecStreamTest::testIntersect(), ExecStreamTestSuite::testMergeExecStream(), LbmMinusExecStreamTest::testMinus(), and ExecStreamTestSuite::testNestedLoopJoinExecStream().
00093 { 00094 std::vector<ExecStreamEmbryo> sourceStreamEmbryos; 00095 sourceStreamEmbryos.push_back(sourceStreamEmbryo1); 00096 sourceStreamEmbryos.push_back(sourceStreamEmbryo2); 00097 return prepareConfluenceGraph(sourceStreamEmbryos, confluenceStreamEmbryo); 00098 }
SharedExecStream ExecStreamUnitTestBase::prepareConfluenceGraph | ( | std::vector< ExecStreamEmbryo > & | sourceStreamEmbryos, | |
ExecStreamEmbryo & | confluenceStreamEmbryo | |||
) | [protected, inherited] |
Defines and prepares a graph consisting of a list of source streams and one confluence stream.
sourceStreamEmbryos | list of embryonic source streams that produce tuples | |
confluenceStreamEmbryo | embryonic confluence stream which processes tuples produced by the sourceStreamEmbryos |
Definition at line 155 of file ExecStreamUnitTestBase.cpp.
References ExecStreamUnitTestBase::prepareConfluenceGraph().
00158 { 00159 std::vector<std::vector<ExecStreamEmbryo> > sourceStreamEmbryosList; 00160 std::vector<ExecStreamEmbryo>::iterator it; 00161 std::vector<ExecStreamEmbryo> sourceStreamList; 00162 for (it = sourceStreamEmbryos.begin(); it != sourceStreamEmbryos.end(); 00163 it++) 00164 { 00165 sourceStreamList.clear(); 00166 sourceStreamList.push_back(*it); 00167 sourceStreamEmbryosList.push_back(sourceStreamList); 00168 } 00169 00170 return 00171 prepareConfluenceGraph(sourceStreamEmbryosList, confluenceStreamEmbryo); 00172 }
SharedExecStream ExecStreamUnitTestBase::prepareConfluenceGraph | ( | std::vector< std::vector< ExecStreamEmbryo > > & | sourceStreamEmbryosList, | |
ExecStreamEmbryo & | confluenceStreamEmbryo | |||
) | [protected, inherited] |
Defines and prepares a graph consisting of one or more source streams and one confluence stream.
Each source stream can be a list of streams.
sourceStreamEmbryosList | list of embryonic source streams which produce tuples | |
confluenceStreamEmbryo | embryonic confluence stream which processes tuples produced by the source streams |
Definition at line 174 of file ExecStreamUnitTestBase.cpp.
References BUFPROV_PRODUCER, ExecStreamEmbryo::getStream(), ExecStreamUnitTestBase::pGraph, and ExecStreamUnitTestBase::pGraphEmbryo.
00177 { 00178 pGraphEmbryo->saveStreamEmbryo(confluenceStreamEmbryo); 00179 00180 for (int i = 0; i < sourceStreamEmbryosList.size(); i++) { 00181 for (int j = 0; j < sourceStreamEmbryosList[i].size(); j++) { 00182 pGraphEmbryo->saveStreamEmbryo(sourceStreamEmbryosList[i][j]); 00183 } 00184 00185 // connect streams in each sourceStreamEmbryos list in a cascade 00186 for (int j = 1; j < sourceStreamEmbryosList[i].size(); j++) { 00187 pGraphEmbryo->addDataflow( 00188 sourceStreamEmbryosList[i][j - 1].getStream()->getName(), 00189 sourceStreamEmbryosList[i][j].getStream()->getName()); 00190 } 00191 pGraphEmbryo->addDataflow( 00192 sourceStreamEmbryosList[i].back().getStream()->getName(), 00193 confluenceStreamEmbryo.getStream()->getName()); 00194 } 00195 00196 SharedExecStream pAdaptedStream = 00197 pGraphEmbryo->addAdapterFor( 00198 confluenceStreamEmbryo.getStream()->getName(), 0, 00199 BUFPROV_PRODUCER); 00200 pGraph->addOutputDataflow( 00201 pAdaptedStream->getStreamId()); 00202 00203 pGraphEmbryo->prepareGraph(shared_from_this(), ""); 00204 00205 return pAdaptedStream; 00206 }
SharedExecStream ExecStreamUnitTestBase::prepareConfluenceTransformGraph | ( | ExecStreamEmbryo & | sourceStreamEmbryo1, | |
ExecStreamEmbryo & | sourceStreamEmbryo2, | |||
ExecStreamEmbryo & | confluenceStreamEmbryo, | |||
ExecStreamEmbryo & | transformStreamEmbryo | |||
) | [protected, inherited] |
Defines and prepares a graph consisting of two source streams, one confluence stream, and one transform stream.
sourceStreamEmbryo1 | embryonic source stream which produces tuples | |
sourceStreamEmbryo2 | embryonic source stream which produces tuples | |
confluenceStreamEmbryo | embryonic confluence stream which processes tuples produced by the sourceStreamEmbryos | |
transformStreamEmbryo | embryonic transform streams which process tuples produced by a child stream |
Definition at line 100 of file ExecStreamUnitTestBase.cpp.
References BUFPROV_PRODUCER, ExecStreamEmbryo::getStream(), ExecStreamUnitTestBase::pGraph, and ExecStreamUnitTestBase::pGraphEmbryo.
Referenced by LhxJoinExecStreamTest::testImpl(), and LbmMinusExecStreamTest::testRestartingMinus().
00105 { 00106 std::vector<ExecStreamEmbryo> sourceStreamEmbryos; 00107 sourceStreamEmbryos.push_back(sourceStreamEmbryo1); 00108 sourceStreamEmbryos.push_back(sourceStreamEmbryo2); 00109 00110 std::vector<ExecStreamEmbryo>::iterator it; 00111 00112 for (it = sourceStreamEmbryos.begin(); it != sourceStreamEmbryos.end(); 00113 ++it) 00114 { 00115 pGraphEmbryo->saveStreamEmbryo(*it); 00116 } 00117 pGraphEmbryo->saveStreamEmbryo(confluenceStreamEmbryo); 00118 00119 for (it = sourceStreamEmbryos.begin(); it != sourceStreamEmbryos.end(); 00120 ++it) 00121 { 00122 pGraphEmbryo->addDataflow( 00123 (*it).getStream()->getName(), 00124 confluenceStreamEmbryo.getStream()->getName()); 00125 } 00126 00127 std::vector<ExecStreamEmbryo> transforms; 00128 transforms.push_back(transformStreamEmbryo); 00129 ExecStreamEmbryo& previousStream = confluenceStreamEmbryo; 00130 00131 // save all transforms 00132 for (it = transforms.begin(); it != transforms.end(); ++it) { 00133 pGraphEmbryo->saveStreamEmbryo(*it); 00134 } 00135 00136 for (it = transforms.begin(); it != transforms.end(); ++it) { 00137 pGraphEmbryo->addDataflow( 00138 previousStream.getStream()->getName(), 00139 (*it).getStream()->getName()); 00140 previousStream = *it; 00141 } 00142 00143 00144 SharedExecStream pAdaptedStream = 00145 pGraphEmbryo->addAdapterFor( 00146 previousStream.getStream()->getName(), 00147 0, 00148 BUFPROV_PRODUCER); 00149 pGraph->addOutputDataflow(pAdaptedStream->getStreamId()); 00150 00151 pGraphEmbryo->prepareGraph(shared_from_this(), ""); 00152 return pAdaptedStream; 00153 }
SharedExecStream ExecStreamUnitTestBase::prepareDAG | ( | ExecStreamEmbryo & | srcStreamEmbryo, | |
ExecStreamEmbryo & | splitterStreamEmbryo, | |||
std::vector< ExecStreamEmbryo > & | interStreamEmbryos, | |||
ExecStreamEmbryo & | destStreamEmbryo, | |||
bool | createSink = true , |
|||
bool | saveSrc = true | |||
) | [protected, inherited] |
Defines and prepares a graph consisting of a source, a splitter, and one or more parallel transform streams which flow together into a confluence stream.
srcStreamEmbryo | embryonic source stream which produces tuples | |
splitterStreamEmbryo | embryonic SplitterExecStream which produces tuples for multiple consumers | |
interStreamEmbryos | embryonic intermediate streams which transform tuples; each stream consists of a single embryo | |
destStreamEmbryo | embryonic confluence stream which processes tuples produced by the interStreamEmbryos | |
createSink | if true (the default), creates a final output sink in the stream graph | |
saveSrc | if true (the default), save the source in the stream graph; if false, the save has already been done |
Definition at line 208 of file ExecStreamUnitTestBase.cpp.
Referenced by LcsMultiClusterAppendTest::loadClusters(), LbmSearchTest::loadTableAndIndex(), LbmLoadBitmapTest::testLoad(), ExecStreamTestSuite::testMergeImplicitPullInputs(), ExecStreamTestSuite::testSegBufferReaderWriterExecStream(), and ExecStreamTestSuite::testSplitterPlusBarrier().
00215 { 00216 std::vector<std::vector<ExecStreamEmbryo> > listOfList; 00217 00218 // Convert interStreamEmbryos to a vector of vectors. E.g., if 00219 // interStreamEmbryos contains (1, 2, 3), it will get converted to: 00220 // ((1)) ((2)) ((3)) 00221 for (uint i = 0; i < interStreamEmbryos.size(); i++) { 00222 std::vector<ExecStreamEmbryo> interStreamEmbryoList; 00223 00224 interStreamEmbryoList.push_back(interStreamEmbryos[i]); 00225 listOfList.push_back(interStreamEmbryoList); 00226 } 00227 return prepareDAG( 00228 srcStreamEmbryo, splitterStreamEmbryo, listOfList, destStreamEmbryo, 00229 createSink, saveSrc); 00230 }
SharedExecStream ExecStreamUnitTestBase::prepareDAG | ( | ExecStreamEmbryo & | srcStreamEmbryo, | |
ExecStreamEmbryo & | splitterStreamEmbryo, | |||
std::vector< std::vector< ExecStreamEmbryo > > & | interStreamEmbryosList, | |||
ExecStreamEmbryo & | destStreamEmbryo, | |||
bool | createSink = true , |
|||
bool | saveSrc = true | |||
) | [protected, inherited] |
Defines and prepares a graph consisting of a source, a splitter, and one or more parallel transform streams which flow together into a confluence stream.
srcStreamEmbryo | embryonic source stream which produces tuples | |
splitterStreamEmbryo | embryonic SplitterExecStream which produces tuples for multiple consumers | |
interStreamEmbryosList | one or more embryonic intermediate streams which transform tuples; each stream can have one more embryos | |
destStreamEmbryo | embryonic confluence stream which processes tuples produced by the interStreamEmbryos | |
createSink | if true (the default), creates a final output sink in the stream graph | |
saveSrc | if true (the default), save the source in the stream graph; if false, the save has already been done |
Definition at line 232 of file ExecStreamUnitTestBase.cpp.
References BUFPROV_PRODUCER, ExecStreamEmbryo::getStream(), ExecStreamUnitTestBase::pGraph, and ExecStreamUnitTestBase::pGraphEmbryo.
00239 { 00240 if (saveSrc) { 00241 pGraphEmbryo->saveStreamEmbryo(srcStreamEmbryo); 00242 } 00243 pGraphEmbryo->saveStreamEmbryo(splitterStreamEmbryo); 00244 00245 // save all intermediate stream embryos 00246 for (int i = 0; i < interStreamEmbryos.size(); i++) { 00247 for (int j = 0; j < interStreamEmbryos[i].size(); j++) { 00248 pGraphEmbryo->saveStreamEmbryo(interStreamEmbryos[i][j]); 00249 } 00250 00251 // connect streams in each interStreamEmbryos list in a cascade 00252 for (int j = 1; j < interStreamEmbryos[i].size(); j++) { 00253 pGraphEmbryo->addDataflow( 00254 interStreamEmbryos[i][j - 1].getStream()->getName(), 00255 interStreamEmbryos[i][j].getStream()->getName()); 00256 } 00257 } 00258 00259 pGraphEmbryo->saveStreamEmbryo(destStreamEmbryo); 00260 00261 pGraphEmbryo->addDataflow( 00262 srcStreamEmbryo.getStream()->getName(), 00263 splitterStreamEmbryo.getStream()->getName()); 00264 00265 // connect all inter streams to src and dest 00266 for (int i = 0; i < interStreamEmbryos.size(); i++) { 00267 pGraphEmbryo->addDataflow( 00268 splitterStreamEmbryo.getStream()->getName(), 00269 interStreamEmbryos[i][0].getStream()->getName()); 00270 pGraphEmbryo->addDataflow( 00271 interStreamEmbryos[i].back().getStream()->getName(), 00272 destStreamEmbryo.getStream()->getName()); 00273 } 00274 00275 SharedExecStream pAdaptedStream; 00276 00277 if (createSink) { 00278 pAdaptedStream = pGraphEmbryo->addAdapterFor( 00279 destStreamEmbryo.getStream()->getName(), 0, 00280 BUFPROV_PRODUCER); 00281 pGraph->addOutputDataflow(pAdaptedStream->getStreamId()); 00282 00283 pGraphEmbryo->prepareGraph(shared_from_this(), ""); 00284 } 00285 00286 return pAdaptedStream; 00287 }
void ExecStreamUnitTestBase::verifyOutput | ( | ExecStream & | stream, | |
uint | nRowsExpected, | |||
MockProducerExecStreamGenerator & | verifier, | |||
bool | stopEarly = false | |||
) | [protected, inherited] |
Executes the prepared stream graph and verifies that its output matches that produced by a value generator.
stream | output stream from which to read | |
nRowsExpected | number of rows expected | |
verifier | generator for expected values | |
stopEarly | if true, stop once nRowsExpected have been fetched, even if more rows are available; this can be used for simulating the cleanup effect of an error in the middle of execution |
Definition at line 325 of file ExecStreamUnitTestBase.cpp.
References TupleData::compute(), EXECBUF_EOS, MockProducerExecStreamGenerator::generateValue(), ExecStreamUnitTestBase::pGraph, ExecStreamTestBase::pResourceGovernor, and ExecStreamTestBase::pScheduler.
Referenced by LcsClusterReplaceExecStreamTest::loadCluster(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), LcsClusterReplaceExecStreamTest::replaceCluster(), LcsMultiClusterAppendTest::scanCols(), LbmSplicerExecStreamTest::spliceInput(), ExecStreamTestSuite::testBTreeInsertExecStream(), CollectExecStreamTestSuite::testCollectCollectUncollectUncollect(), CollectExecStreamTestSuite::testCollectUncollect(), CorrelationJoinExecStreamTestSuite::testCorrelationJoin(), ExecStreamTestSuite::testCountAggExecStream(), LhxAggExecStreamTest::testCountImpl(), ExecStreamTestSuite::testDoubleBufferExecStream(), LcsRowScanExecStreamTest::testFilterCols(), ExecStreamTestSuite::testGroupAggExecStreamNrows(), LhxAggExecStreamTest::testGroupCountImpl(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), LbmLoadBitmapTest::testLoad(), testLoadMultiCol(), testLoadSingleCol(), ExecStreamTestSuite::testMergeImplicitPullInputs(), ExecStreamTestSuite::testNestedLoopJoinExecStream(), LbmNormalizerExecStreamTest::testNormalizer(), ExecStreamTestSuite::testReshapeExecStream(), LbmMinusExecStreamTest::testRestartingMinus(), LcsRowScanExecStreamTest::testSampleScanCols(), LcsRowScanExecStreamTest::testScanCols(), testScanMultiCol(), testScanSingleCol(), ExecStreamTestSuite::testScratchBufferExecStream(), ExecStreamTestSuite::testSingleValueAggExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), LbmSortedAggExecStreamTest::testSortedAgg(), ExecStreamTestSuite::testSplitterPlusBarrier(), ExecStreamTestSuite::testSumAggExecStream(), LhxAggExecStreamTest::testSumImpl(), and LcsClusterReplaceExecStreamTest::verifyCluster().
00330 { 00331 // TODO: assertions about output tuple 00332 00333 pResourceGovernor->requestResources(*pGraph); 00334 pGraph->open(); 00335 pScheduler->start(); 00336 uint nRows = 0; 00337 for (;;) { 00338 ExecStreamBufAccessor &bufAccessor = 00339 pScheduler->readStream(stream); 00340 if (bufAccessor.getState() == EXECBUF_EOS) { 00341 break; 00342 } 00343 BOOST_REQUIRE(bufAccessor.isConsumptionPossible()); 00344 const uint nCol = 00345 bufAccessor.getConsumptionTupleAccessor().size(); 00346 BOOST_REQUIRE(nCol == bufAccessor.getTupleDesc().size()); 00347 BOOST_REQUIRE(nCol >= 1); 00348 TupleData inputTuple; 00349 inputTuple.compute(bufAccessor.getTupleDesc()); 00350 for (;;) { 00351 if (!bufAccessor.demandData()) { 00352 break; 00353 } 00354 BOOST_REQUIRE(nRows < nRowsExpected); 00355 bufAccessor.unmarshalTuple(inputTuple); 00356 for (int col = 0; col < nCol; ++col) { 00357 int64_t actualValue = 00358 *reinterpret_cast<int64_t const *>(inputTuple[col].pData); 00359 int64_t expectedValue = generator.generateValue(nRows, col); 00360 if (actualValue != expectedValue) { 00361 std::cout << "(Row, Col) = (" << nRows << ", " << col <<")" 00362 << std::endl; 00363 BOOST_CHECK_EQUAL(expectedValue,actualValue); 00364 return; 00365 } 00366 } 00367 bufAccessor.consumeTuple(); 00368 ++nRows; 00369 if (stopEarly && nRows == nRowsExpected) { 00370 return; 00371 } 00372 } 00373 } 00374 BOOST_CHECK_EQUAL(nRowsExpected,nRows); 00375 }
void ExecStreamUnitTestBase::verifyConstantOutput | ( | ExecStream & | stream, | |
const TupleData & | expectedTuple, | |||
uint | nRowsExpected | |||
) | [protected, inherited] |
Executes the prepared stream graph and verifies that all output tuples matche an expected and given one.
stream | output stream from which to read | |
expectedTuple | ||
nRowsExpected |
Definition at line 377 of file ExecStreamUnitTestBase.cpp.
References TupleData::compute(), EXECBUF_EOS, ExecStreamUnitTestBase::pGraph, ExecStreamTestBase::pResourceGovernor, TuplePrinter::print(), and ExecStreamTestBase::pScheduler.
Referenced by ExecStreamTestSuite::testCartesianJoinExecStream(), CollectExecStreamTestSuite::testCollectInts(), CalcExecStreamTestSuite::testConstant(), ExecStreamTestSuite::testCopyExecStream(), ExecStreamGovernorTest::testGovernor(), ExecStreamTestSuite::testMergeExecStream(), ExecStreamTestSuite::testSegBufferExecStream(), and ExecStreamTestSuite::testSegBufferReaderWriterExecStream().
00381 { 00382 // TODO: assertions about output tuple 00383 00384 pResourceGovernor->requestResources(*pGraph); 00385 pGraph->open(); 00386 pScheduler->start(); 00387 uint nRows = 0; 00388 for (;;) { 00389 ExecStreamBufAccessor &bufAccessor = 00390 pScheduler->readStream(stream); 00391 if (bufAccessor.getState() == EXECBUF_EOS) { 00392 break; 00393 } 00394 BOOST_REQUIRE(bufAccessor.isConsumptionPossible()); 00395 00396 if (!bufAccessor.demandData()) { 00397 break; 00398 } 00399 BOOST_REQUIRE(nRows < nRowsExpected); 00400 00401 TupleData actualTuple; 00402 actualTuple.compute(bufAccessor.getTupleDesc()); 00403 bufAccessor.unmarshalTuple(actualTuple); 00404 00405 int c = bufAccessor.getTupleDesc().compareTuples( 00406 expectedTuple, actualTuple); 00407 bufAccessor.consumeTuple(); 00408 ++nRows; 00409 if (c) { 00410 #if 1 00411 TupleDescriptor statusDesc = bufAccessor.getTupleDesc(); 00412 TuplePrinter tuplePrinter; 00413 tuplePrinter.print(std::cout, statusDesc, actualTuple); 00414 tuplePrinter.print(std::cout, statusDesc, expectedTuple); 00415 std::cout << std::endl; 00416 #endif 00417 BOOST_CHECK_EQUAL(0,c); 00418 break; 00419 } 00420 } 00421 BOOST_CHECK_EQUAL(nRowsExpected, nRows); 00422 }
void ExecStreamUnitTestBase::verifyBufferedOutput | ( | ExecStream & | stream, | |
TupleDescriptor | outputTupleDesc, | |||
uint | nRowsExpected, | |||
PBuffer | expectedBuffer | |||
) | [protected, inherited] |
Executes the prepared stream graph and verifies the resultant tuples against a set of tuples supplied in an input buffer.
stream | output stream from which to read | |
outputTupleDesc | descriptor of expected output tuple | |
nRowsExpected | number of rows expected | |
expectedBuffer | buffer containing expected tuples |
Definition at line 424 of file ExecStreamUnitTestBase.cpp.
References TupleDescriptor::compareTuples(), TupleData::compute(), TupleAccessor::compute(), EXECBUF_EOS, TupleAccessor::getCurrentByteCount(), ExecStreamUnitTestBase::pGraph, ExecStreamTestBase::pResourceGovernor, ExecStreamTestBase::pScheduler, TupleAccessor::setCurrentTupleBuf(), and TupleAccessor::unmarshal().
Referenced by LbmIntersectExecStreamTest::testIntersect(), LbmMinusExecStreamTest::testMinus(), LbmSearchTest::testScanIdx(), and LbmUnionExecStreamTest::testUnion().
00429 { 00430 // TODO: assertions about output tuple 00431 00432 TupleAccessor expectedOutputAccessor; 00433 expectedOutputAccessor.compute(outputTupleDesc); 00434 TupleData expectedTuple(outputTupleDesc); 00435 uint bufOffset = 0; 00436 pResourceGovernor->requestResources(*pGraph); 00437 pGraph->open(); 00438 pScheduler->start(); 00439 uint nRows = 0; 00440 for (;;) { 00441 ExecStreamBufAccessor &bufAccessor = 00442 pScheduler->readStream(stream); 00443 if (bufAccessor.getState() == EXECBUF_EOS) { 00444 break; 00445 } 00446 BOOST_REQUIRE(bufAccessor.getTupleDesc() == outputTupleDesc); 00447 BOOST_REQUIRE(bufAccessor.isConsumptionPossible()); 00448 const uint nCol = 00449 bufAccessor.getConsumptionTupleAccessor().size(); 00450 BOOST_REQUIRE(nCol == bufAccessor.getTupleDesc().size()); 00451 BOOST_REQUIRE(nCol >= 1); 00452 TupleData inputTuple; 00453 inputTuple.compute(bufAccessor.getTupleDesc()); 00454 for (;;) { 00455 if (!bufAccessor.demandData()) { 00456 break; 00457 } 00458 BOOST_REQUIRE(nRows < nRowsExpected); 00459 bufAccessor.unmarshalTuple(inputTuple); 00460 expectedOutputAccessor.setCurrentTupleBuf( 00461 expectedBuffer + bufOffset); 00462 expectedOutputAccessor.unmarshal(expectedTuple); 00463 int c = outputTupleDesc.compareTuples(inputTuple, expectedTuple); 00464 if (c) { 00465 std::cout << "(Row) = (" << nRows << ")" 00466 << " -- Tuples don't match"<< std::endl; 00467 BOOST_CHECK_EQUAL(0,c); 00468 return; 00469 } 00470 bufAccessor.consumeTuple(); 00471 bufOffset += expectedOutputAccessor.getCurrentByteCount(); 00472 ++nRows; 00473 } 00474 } 00475 BOOST_CHECK_EQUAL(nRowsExpected,nRows); 00476 }
void ExecStreamUnitTestBase::resetExecStreamTest | ( | ) | [protected, inherited] |
Reset stream graph so multiple iterations of a method can be called within a single testcase.
Definition at line 305 of file ExecStreamUnitTestBase.cpp.
References ExecStreamTestBase::newScheduler(), ExecStreamTestBase::newStreamGraph(), ExecStreamTestBase::newStreamGraphEmbryo(), ExecStreamUnitTestBase::pGraph, ExecStreamUnitTestBase::pGraphEmbryo, ExecStreamTestBase::pResourceGovernor, ExecStreamTestBase::pScheduler, and ExecStreamUnitTestBase::tearDownExecStreamTest().
Referenced by LcsRowScanExecStreamTest::loadClusters(), LbmLoadBitmapTest::testAppend(), LcsRowScanExecStreamTest::testBernoulliSampling(), LcsClusterReplaceExecStreamTest::testClusterReplace(), LcsRowScanExecStreamTest::testCompressedFiltering(), LbmSplicerExecStreamTest::testLER5968(), LbmSplicerExecStreamTest::testLER6473(), LcsMultiClusterAppendTest::testLoad(), testMultiColConstNewRoot(), testMultiColConstOldRoot(), testMultiColNoDupNewRoot(), testMultiColNoDupOldRoot(), testMultiColStairNewRoot(), testMultiColStairOldRoot(), LbmSearchTest::testMultipleRanges(), ExecStreamGovernorTest::testReturnResources(), LbmSearchTest::testScanIdx(), LcsRowScanExecStreamTest::testScanPastEndOfCluster(), LcsRowScanExecStreamTest::testScans(), testSingleColConstNewRoot(), testSingleColConstOldRoot(), testSingleColNoDupNewRoot(), testSingleColNoDupOldRoot(), testSingleColStairNewRoot(), testSingleColStairOldRoot(), LbmSplicerExecStreamTest::testSpliceRids(), LbmSplicerExecStreamTest::testSpliceWithKeys(), and LcsRowScanExecStreamTest::testSystemSampling().
00306 { 00307 if (pScheduler) { 00308 pScheduler->stop(); 00309 } 00310 tearDownExecStreamTest(); 00311 00312 pScheduler.reset(newScheduler()); 00313 pGraph = newStreamGraph(); 00314 pGraphEmbryo = newStreamGraphEmbryo(pGraph); 00315 pGraph->setResourceGovernor(pResourceGovernor); 00316 }
void ExecStreamUnitTestBase::tearDownExecStreamTest | ( | ) | [protected, virtual, inherited] |
ExecStream-specific handler called from testCaseTearDown.
Reimplemented from ExecStreamTestBase.
Definition at line 319 of file ExecStreamUnitTestBase.cpp.
References ExecStreamUnitTestBase::pGraph, and ExecStreamUnitTestBase::pGraphEmbryo.
Referenced by ExecStreamUnitTestBase::resetExecStreamTest().
00320 { 00321 pGraph.reset(); 00322 pGraphEmbryo.reset(); 00323 }
SharedExecStreamGraph ExecStreamTestBase::newStreamGraph | ( | ) | [protected, virtual, inherited] |
Creates a stream graph.
Definition at line 37 of file ExecStreamTestBase.cpp.
References ExecStreamGraph::newExecStreamGraph().
Referenced by ExecStreamUnitTestBase::resetExecStreamTest(), and ExecStreamUnitTestBase::testCaseSetUp().
00038 { 00039 SharedExecStreamGraph pGraph = ExecStreamGraph::newExecStreamGraph(); 00040 pGraph->enableDummyTxnId(true); 00041 return pGraph; 00042 }
SharedExecStreamGraphEmbryo ExecStreamTestBase::newStreamGraphEmbryo | ( | SharedExecStreamGraph | ) | [protected, virtual, inherited] |
Creates an embryo for a stream graph.
Definition at line 45 of file ExecStreamTestBase.cpp.
References CacheTestBase::pCache, ExecStreamTestBase::pScheduler, and SegStorageTestBase::pSegmentFactory.
Referenced by ExecStreamUnitTestBase::resetExecStreamTest(), and ExecStreamUnitTestBase::testCaseSetUp().
00046 { 00047 return SharedExecStreamGraphEmbryo( 00048 new ExecStreamGraphEmbryo( 00049 g, pScheduler, pCache, pSegmentFactory)); 00050 }
ExecStreamScheduler * ExecStreamTestBase::newScheduler | ( | ) | [protected, virtual, inherited] |
Creates a scheduler.
Reimplemented in ParallelExecStreamSchedulerTest.
Definition at line 52 of file ExecStreamTestBase.cpp.
Referenced by ExecStreamUnitTestBase::resetExecStreamTest(), and ExecStreamTestBase::testCaseSetUp().
00053 { 00054 return new DfsTreeExecStreamScheduler( 00055 shared_from_this(), 00056 "DfsTreeExecStreamScheduler"); 00057 }
ExecStreamGovernor * ExecStreamTestBase::newResourceGovernor | ( | ExecStreamResourceKnobs const & | knobSettings, | |
ExecStreamResourceQuantity const & | resourcesAvailable | |||
) | [protected, virtual, inherited] |
Creates the resource governor.
Definition at line 59 of file ExecStreamTestBase.cpp.
Referenced by ExecStreamTestBase::testCaseSetUp().
00062 { 00063 return new SimpleExecStreamGovernor( 00064 knobSettings, resourcesAvailable, shared_from_this(), 00065 "SimpleExecStreamGovernor"); 00066 }
void SegStorageTestBase::openStorage | ( | DeviceMode | openMode | ) | [virtual, inherited] |
Reimplemented from CacheTestBase.
Reimplemented in SegmentTestBase.
Definition at line 31 of file SegStorageTestBase.cpp.
References SegStorageTestBase::openSegmentStorage(), and CacheTestBase::openStorage().
Referenced by SegStorageTestBase::openRandomSegment(), SegmentTestBase::openStorage(), LhxHashTableTest::testCaseSetUp(), ExecStreamTestBase::testCaseSetUp(), BTreeTest::testCaseSetUp(), BTreeReadersTest::testCaseSetUp(), LbmEntryTest::testCaseSetUp(), SegPageIterTest::testIter(), SegPageEntryIterTest::testIter(), SegStreamTest::testMarkReset(), SegStreamTest::testReadSeg(), LogicalTxnTest::testTxn(), SegStreamTest::testWriteSeg(), and SegStreamTest::testWriteSpillAndRead().
00032 { 00033 CacheTestBase::openStorage(openMode); 00034 openSegmentStorage(openMode); 00035 }
void SegStorageTestBase::openSegmentStorage | ( | DeviceMode | openMode | ) | [virtual, inherited] |
Reimplemented in LinearViewSegmentTest, SnapshotSegmentTestBase, and VersionedSegmentTest.
Definition at line 37 of file SegStorageTestBase.cpp.
References CacheTestBase::cbPageFull, DeviceMode::create, SegStorageTestBase::createLinearDeviceSegment(), CacheTestBase::dataDeviceId, SegStorageTestBase::pLinearSegment, and CacheTestBase::pRandomAccessDevice.
Referenced by VersionedSegmentTest::openSegmentStorage(), and SegStorageTestBase::openStorage().
00038 { 00039 pLinearSegment = createLinearDeviceSegment( 00040 dataDeviceId, 00041 openMode.create ? 0 00042 : pRandomAccessDevice->getSizeInBytes() / cbPageFull); 00043 }
void SegStorageTestBase::openRandomSegment | ( | ) | [virtual, inherited] |
Reimplemented in LcsClusterReplaceExecStreamTest.
Definition at line 45 of file SegStorageTestBase.cpp.
References SegStorageTestBase::closeStorage(), DeviceMode::load, SegStorageTestBase::openStorage(), SegStorageTestBase::pLinearSegment, SegStorageTestBase::pRandomSegment, and SegStorageTestBase::pSegmentFactory.
Referenced by RandomAllocationSegmentTest::testAllocateAndDeallocate(), LhxHashTableTest::testCaseSetUp(), ExecStreamUnitTestBase::testCaseSetUp(), BTreeTest::testCaseSetUp(), and BTreeReadersTest::testCaseSetUp().
00046 { 00047 // reopen will interpret pages as already allocated, which 00048 // is what RandomAllocationSegment expects 00049 closeStorage(); 00050 openStorage(DeviceMode::load); 00051 pRandomSegment = pSegmentFactory->newRandomAllocationSegment( 00052 pLinearSegment, true); 00053 pLinearSegment.reset(); 00054 }
SharedSegment SegStorageTestBase::createLinearDeviceSegment | ( | DeviceId | deviceId, | |
uint | nPages | |||
) | [inherited] |
Definition at line 56 of file SegStorageTestBase.cpp.
References LinearDeviceSegmentParams::firstBlockId, LinearDeviceSegmentParams::nPagesAllocated, LinearDeviceSegmentParams::nPagesMin, CacheTestBase::pCache, SegStorageTestBase::pSegmentFactory, CompoundId::setBlockNum(), and CompoundId::setDeviceId().
Referenced by VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), SegStorageTestBase::openSegmentStorage(), and LinearViewSegmentTest::openSegmentStorage().
00058 { 00059 BlockId blockId(0); 00060 CompoundId::setDeviceId(blockId,deviceId); 00061 CompoundId::setBlockNum(blockId,0); 00062 LinearDeviceSegmentParams deviceParams; 00063 deviceParams.firstBlockId = blockId; 00064 deviceParams.nPagesMin = nPages; 00065 deviceParams.nPagesAllocated = nPages; 00066 return pSegmentFactory->newLinearDeviceSegment( 00067 pCache,deviceParams); 00068 }
void SegStorageTestBase::closeLinearSegment | ( | ) | [inherited] |
Definition at line 70 of file SegStorageTestBase.cpp.
References SegStorageTestBase::pLinearSegment.
Referenced by VersionedSegmentTest::closeStorage(), SnapshotSegmentTestBase::closeStorage(), SegStorageTestBase::closeStorage(), and SnapshotSegmentTest::testUncommittedReads().
00071 { 00072 if (pLinearSegment) { 00073 assert(pLinearSegment.unique()); 00074 pLinearSegment.reset(); 00075 } 00076 }
void SegStorageTestBase::closeRandomSegment | ( | ) | [inherited] |
Definition at line 78 of file SegStorageTestBase.cpp.
References SegStorageTestBase::pRandomSegment.
Referenced by VersionedSegmentTest::closeStorage(), and SegStorageTestBase::closeStorage().
00079 { 00080 if (pRandomSegment) { 00081 assert(pRandomSegment.unique()); 00082 pRandomSegment.reset(); 00083 } 00084 }
void SegStorageTestBase::closeVersionedRandomSegment | ( | ) | [inherited] |
Definition at line 86 of file SegStorageTestBase.cpp.
References SegStorageTestBase::pVersionedRandomSegment.
Referenced by SnapshotSegmentTestBase::closeStorage(), and SegStorageTestBase::closeStorage().
00087 { 00088 if (pVersionedRandomSegment) { 00089 assert(pVersionedRandomSegment.unique()); 00090 pVersionedRandomSegment.reset(); 00091 } 00092 }
void SegStorageTestBase::closeSnapshotRandomSegment | ( | ) | [inherited] |
Definition at line 94 of file SegStorageTestBase.cpp.
References SegStorageTestBase::pSnapshotRandomSegment.
Referenced by SnapshotSegmentTestBase::closeStorage().
00095 { 00096 if (pSnapshotRandomSegment) { 00097 assert(pSnapshotRandomSegment.unique()); 00098 pSnapshotRandomSegment.reset(); 00099 } 00100 }
void SegStorageTestBase::closeStorage | ( | ) | [virtual, inherited] |
Reimplemented from CacheTestBase.
Reimplemented in SnapshotSegmentTestBase, and VersionedSegmentTest.
Definition at line 102 of file SegStorageTestBase.cpp.
References SegStorageTestBase::closeLinearSegment(), SegStorageTestBase::closeRandomSegment(), CacheTestBase::closeStorage(), and SegStorageTestBase::closeVersionedRandomSegment().
Referenced by VersionedSegmentTest::closeStorage(), SnapshotSegmentTestBase::closeStorage(), SegStorageTestBase::openRandomSegment(), SegPageIterTest::testIter(), SegPageEntryIterTest::testIter(), SegStreamTest::testMarkReset(), SegStreamTest::testReadSeg(), SegmentTestBase::testSingleThread(), SegStreamTest::testWriteSeg(), and SegStreamTest::testWriteSpillAndRead().
00103 { 00104 closeLinearSegment(); 00105 closeRandomSegment(); 00106 closeVersionedRandomSegment(); 00107 // TODO: assert pSegmentFactory.unique(), but not here 00108 CacheTestBase::closeStorage(); 00109 }
Cache & CacheTestBase::getCache | ( | ) | [inherited] |
Definition at line 42 of file CacheTestBase.cpp.
References CacheTestBase::pCache.
Referenced by CacheTest::lockPage(), CacheTest::prefetchBatch(), SegmentTestBase::prefetchPage(), CacheTest::prefetchPage(), PagingTestBase::testCacheResize(), PagingTestBase::testCheckpoint(), PagingTestBase::testOp(), PagingTestBase::testScratch(), SegmentTestBase::unlockPage(), and CacheTest::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::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::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 }
Definition at line 49 of file LcsClusterAppendExecStreamTest.cpp.
Referenced by setUpDelIndexScan(), testCaseSetUp(), testLoadMultiCol(), testLoadSingleCol(), testScanMultiCol(), testScanSingleCol(), and verifyClusterPages().
Definition at line 50 of file LcsClusterAppendExecStreamTest.cpp.
Referenced by setUpDelIndexScan(), and testCaseSetUp().
PageId LcsClusterAppendExecStreamTest::savedRootPageId [protected] |
Definition at line 52 of file LcsClusterAppendExecStreamTest.cpp.
Referenced by testCaseSetUp(), testLoadMultiCol(), and testLoadSingleCol().
Definition at line 53 of file LcsClusterAppendExecStreamTest.cpp.
Referenced by testCaseTearDown(), testLoadMultiCol(), testLoadSingleCol(), testScanMultiCol(), testScanSingleCol(), and verifyClusterPages().
SharedExecStreamGraph ExecStreamUnitTestBase::pGraph [protected, inherited] |
Definition at line 46 of file ExecStreamUnitTestBase.h.
Referenced by ExecStreamUnitTestBase::prepareConfluenceGraph(), ExecStreamUnitTestBase::prepareConfluenceTransformGraph(), ExecStreamUnitTestBase::prepareDAG(), ExecStreamUnitTestBase::prepareTransformGraph(), ExecStreamUnitTestBase::resetExecStreamTest(), LbmSplicerExecStreamTest::spliceInput(), ExecStreamUnitTestBase::tearDownExecStreamTest(), ExecStreamTestSuite::testBTreeInsertExecStream(), ExecStreamUnitTestBase::testCaseSetUp(), CorrelationJoinExecStreamTestSuite::testCorrelationJoin(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), LbmLoadBitmapTest::testLoad(), ExecStreamTestSuite::testReshapeExecStream(), LbmSearchTest::testScanIdx(), ExecStreamUnitTestBase::verifyBufferedOutput(), ExecStreamUnitTestBase::verifyConstantOutput(), FlatFileExecStreamTest::verifyOutput(), and ExecStreamUnitTestBase::verifyOutput().
SharedExecStreamGraphEmbryo ExecStreamUnitTestBase::pGraphEmbryo [protected, inherited] |
Definition at line 47 of file ExecStreamUnitTestBase.h.
Referenced by ExecStreamUnitTestBase::prepareConfluenceGraph(), ExecStreamUnitTestBase::prepareConfluenceTransformGraph(), ExecStreamUnitTestBase::prepareDAG(), ExecStreamUnitTestBase::prepareTransformGraph(), ExecStreamUnitTestBase::resetExecStreamTest(), ExecStreamUnitTestBase::tearDownExecStreamTest(), and ExecStreamUnitTestBase::testCaseSetUp().
const uint ExecStreamTestBase::DefaultCacheReservePercent = 5 [static, protected, inherited] |
Definition at line 45 of file ExecStreamTestBase.h.
Referenced by ExecStreamTestBase::testCaseSetUp().
const uint ExecStreamTestBase::DefaultConcurrentStatements = 4 [static, protected, inherited] |
Definition at line 47 of file ExecStreamTestBase.h.
Referenced by ExecStreamTestBase::testCaseSetUp().
SharedExecStreamScheduler ExecStreamTestBase::pScheduler [protected, inherited] |
Definition at line 49 of file ExecStreamTestBase.h.
Referenced by ExecStreamTestBase::newStreamGraphEmbryo(), ExecStreamUnitTestBase::resetExecStreamTest(), ExecStreamTestBase::testCaseSetUp(), ExecStreamTestBase::testCaseTearDown(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), ExecStreamUnitTestBase::verifyBufferedOutput(), ExecStreamUnitTestBase::verifyConstantOutput(), FlatFileExecStreamTest::verifyOutput(), and ExecStreamUnitTestBase::verifyOutput().
SharedExecStreamGovernor ExecStreamTestBase::pResourceGovernor [protected, inherited] |
Definition at line 51 of file ExecStreamTestBase.h.
Referenced by ExecStreamUnitTestBase::resetExecStreamTest(), ExternalSortExecStreamTest::testCaseSetUp(), ExecStreamUnitTestBase::testCaseSetUp(), ExecStreamTestBase::testCaseSetUp(), ExecStreamGovernorTest::testCaseSetUp(), ExecStreamTestBase::testCaseTearDown(), ExecStreamGovernorTest::testMinGreaterAllocation(), ExecStreamUnitTestBase::verifyBufferedOutput(), ExecStreamUnitTestBase::verifyConstantOutput(), FlatFileExecStreamTest::verifyOutput(), and ExecStreamUnitTestBase::verifyOutput().
SharedCacheAccessor ExecStreamTestBase::pCacheAccessor [protected, inherited] |
Definition at line 53 of file ExecStreamTestBase.h.
Referenced by ExecStreamTestSuite::testBTreeInsertExecStream(), ExecStreamUnitTestBase::testCaseSetUp(), ExecStreamTestBase::testCaseTearDown(), ExecStreamTestSuite::testMergeImplicitPullInputs(), ExecStreamTestSuite::testSegBufferExecStream(), and ExecStreamTestSuite::testSegBufferReaderWriterExecStream().
SharedSegmentFactory SegStorageTestBase::pSegmentFactory [protected, inherited] |
Definition at line 40 of file SegStorageTestBase.h.
Referenced by BackupRestoreTest::backup(), SegStorageTestBase::createLinearDeviceSegment(), LogicalTxnTest::createRecoveryLog(), LbmSearchTest::initBTreeExecStreamParam(), LbmLoadBitmapTest::initBTreeExecStreamParam(), LcsClusterReplaceExecStreamTest::initClusterAppendParams(), LbmExecStreamTestBase::initSorterExecStream(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), LbmMinusExecStreamTest::newMinusStream(), ExecStreamTestBase::newStreamGraphEmbryo(), SegStorageTestBase::openRandomSegment(), VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), BackupRestoreTest::restore(), SegStorageTestBase::SegStorageTestBase(), LbmSplicerExecStreamTest::spliceInput(), ExecStreamTestSuite::testBTreeInsertExecStream(), LhxHashTableTest::testCaseSetUp(), LcsClusterReplaceExecStreamTest::testClusterReplace(), LhxAggExecStreamTest::testCountImpl(), ExecStreamTestSuite::testDoubleBufferExecStream(), ExecStreamGovernorTest::testGovernor(), LhxAggExecStreamTest::testGroupCountImpl(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), BTreeTest::testInserts(), LbmIntersectExecStreamTest::testIntersect(), LbmEntryTest::testldb35(), LbmEntryTest::testler5920(), LbmLoadBitmapTest::testLoad(), testLoadMultiCol(), testLoadSingleCol(), LbmEntryTest::testMergeEntry(), BTreeTest::testMultiKeySearches(), BTreeTest::testScan(), ExecStreamTestSuite::testScratchBufferExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), FlatFileExecStreamTest::testStream(), LhxAggExecStreamTest::testSumImpl(), LogicalTxnTest::testTxn(), SnapshotSegmentTest::testUncommittedReads(), LbmUnionExecStreamTest::testUnion(), SegStreamTest::testWriteSpillAndRead(), and LbmEntryTest::testZeroBytes().
SharedSegment SegStorageTestBase::pLinearSegment [protected, inherited] |
Segment supporting linear page allocation.
Definition at line 45 of file SegStorageTestBase.h.
Referenced by SegStorageTestBase::closeLinearSegment(), LogicalTxnTest::createRecoveryLog(), SegmentTestBase::lockPage(), SegStorageTestBase::openRandomSegment(), VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), SegStorageTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), SegmentTestBase::openStorage(), SegmentTestBase::prefetchPage(), SnapshotSegmentTestBase::testAllocateAll(), LinearViewSegmentTest::testAllocateAll(), VersionedSegmentTest::testCheckpoint(), SegmentTestBase::testCheckpoint(), SegPageIterTest::testIter(), SegPageEntryIterTest::testIter(), SegStreamTest::testMarkReset(), SegStreamTest::testReadSeg(), VersionedSegmentTest::testRecovery(), LogicalTxnTest::testTxn(), SnapshotSegmentTest::testUncommittedReads(), SegStreamTest::testWriteSeg(), and VersionedSegmentTest::verifyPage().
SharedSegment SegStorageTestBase::pRandomSegment [protected, inherited] |
(Optional) segment supporting random page allocation.
Definition at line 50 of file SegStorageTestBase.h.
Referenced by SegStorageTestBase::closeRandomSegment(), SnapshotSegmentTestBase::closeStorage(), LbmSplicerExecStreamTest::createBTree(), LbmSplicerExecStreamTest::initBTreeParam(), LbmSearchTest::initBTreeParam(), LbmLoadBitmapTest::initBTreeParam(), LbmLoadBitmapTest::initBTreeTupleDesc(), LcsClusterReplaceExecStreamTest::initClusterAppendParams(), LbmExecStreamTestBase::initSorterExecStream(), LcsClusterReplaceExecStreamTest::loadCluster(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), SegStorageTestBase::openRandomSegment(), SnapshotSegmentTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), SegmentTestBase::openStorage(), SegmentTestBase::testAllocate(), RandomAllocationSegmentTest::testAllocateAndDeallocate(), ExecStreamTestSuite::testBTreeInsertExecStream(), BTreeTest::testBulkLoad(), LhxHashTableTest::testCaseSetUp(), BTreeTest::testCaseSetUp(), BTreeReadersTest::testCaseSetUp(), LcsRowScanExecStreamTest::testCaseSetUp(), LcsMultiClusterAppendTest::testCaseSetUp(), LcsClusterReplaceExecStreamTest::testCaseSetUp(), testCaseSetUp(), LbmExecStreamTestBase::testCaseSetUp(), LcsClusterReplaceExecStreamTest::testClusterReplace(), LhxAggExecStreamTest::testCountImpl(), SegmentTestBase::testDeallocate(), LhxAggExecStreamTest::testGroupCountImpl(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), BTreeTest::testInserts(), LbmLoadBitmapTest::testLoad(), testLoadMultiCol(), testLoadSingleCol(), ExecStreamTestSuite::testMergeImplicitPullInputs(), BTreeTest::testMultiKeySearches(), BTreeReadersTest::testReaders(), LcsRowScanExecStreamTest::testScanOnEmptyCluster(), ExecStreamTestSuite::testSegBufferExecStream(), ExecStreamTestSuite::testSegBufferReaderWriterExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), LhxAggExecStreamTest::testSumImpl(), and LbmUnionExecStreamTest::testUnion().
SharedSegment SegStorageTestBase::pVersionedRandomSegment [protected, inherited] |
(Optional) segment supporting versioned random page allocation.
Definition at line 55 of file SegStorageTestBase.h.
Referenced by BackupRestoreTest::backup(), SnapshotSegmentTestBase::closeStorage(), SegStorageTestBase::closeVersionedRandomSegment(), SnapshotSegmentTest::deallocateOldPages(), SnapshotSegmentTestBase::openSegmentStorage(), BackupRestoreTest::restore(), LcsClusterReplaceExecStreamTest::testClusterReplace(), SnapshotSegmentTest::testRollback(), and SnapshotSegmentTest::testUncommittedReads().
SharedSegment SegStorageTestBase::pSnapshotRandomSegment [protected, inherited] |
(Optional) segment supporting snapshot random page allocation.
Definition at line 60 of file SegStorageTestBase.h.
Referenced by SegStorageTestBase::closeSnapshotRandomSegment(), SnapshotSegmentTestBase::commitChanges(), SnapshotSegmentTestBase::openSegmentStorage(), LcsClusterReplaceExecStreamTest::testClusterReplace(), and SnapshotSegmentTest::testDeallocateOld().
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(), CacheTest::testLargeCacheInit(), CacheTest::testLargeCacheRequest(), LbmEntryTest::testldb35(), LbmEntryTest::testler5920(), LbmLoadBitmapTest::testLoad(), testLoadMultiCol(), testLoadSingleCol(), SegStreamTest::testMarkReset(), LbmEntryTest::testMergeEntry(), BTreeTest::testMultiKeySearches(), CacheTest::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(), CacheTest::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::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(), CacheTest::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().