ParallelExecStreamSchedulerTest.cpp

Go to the documentation of this file.
00001 /*
00002 // $Id: //open/dev/fennel/test/ParallelExecStreamSchedulerTest.cpp#9 $
00003 // Fennel is a library of data storage and processing components.
00004 // Copyright (C) 2008-2009 The Eigenbase Project
00005 // Copyright (C) 2008-2009 SQLstream, Inc.
00006 // Copyright (C) 2008-2009 LucidEra, Inc.
00007 //
00008 // This program is free software; you can redistribute it and/or modify it
00009 // under the terms of the GNU General Public License as published by the Free
00010 // Software Foundation; either version 2 of the License, or (at your option)
00011 // any later version approved by The Eigenbase Project.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the Free Software
00020 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 */
00022 
00023 #include "fennel/common/CommonPreamble.h"
00024 #include "fennel/exec/ParallelExecStreamScheduler.h"
00025 #include "fennel/test/ExecStreamTestSuite.h"
00026 #include "fennel/synch/ThreadTracker.h"
00027 
00032 class ParallelExecStreamSchedulerTest : public ExecStreamTestSuite
00033 {
00034     ThreadTracker threadTracker;
00035 
00036     uint degreeOfParallelism;
00037 
00038     // override ExecStreamTestBase
00039     virtual ExecStreamScheduler *newScheduler()
00040     {
00041         return new ParallelExecStreamScheduler(
00042             shared_from_this(),
00043             "ParallelExecStreamScheduler",
00044             threadTracker,
00045             degreeOfParallelism);
00046     }
00047 
00048     uint getDegreeOfParallelism()
00049     {
00050         return degreeOfParallelism;
00051     }
00052 
00053 public:
00054 
00055     // we have to be selective about inheritance of test cases
00056     // since some of them are not parallel-safe yet
00057     explicit ParallelExecStreamSchedulerTest()
00058         : ExecStreamTestSuite(false)
00059     {
00060         degreeOfParallelism =
00061             configMap.getIntParam(paramDegreeOfParallelism, 4);
00062 
00063         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testScratchBufferExecStream);
00064         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testDoubleBufferExecStream);
00065         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testCopyExecStream);
00066         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testMergeExecStream);
00067         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testSegBufferExecStream);
00068         FENNEL_UNIT_TEST_CASE(
00069             ExecStreamTestSuite,testCartesianJoinExecStreamOuter);
00070         FENNEL_UNIT_TEST_CASE(
00071             ExecStreamTestSuite,testCartesianJoinExecStreamInner);
00072         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testCountAggExecStream);
00073         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testSumAggExecStream);
00074         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testGroupAggExecStream1);
00075         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testGroupAggExecStream2);
00076         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testGroupAggExecStream3);
00077         FENNEL_UNIT_TEST_CASE(ExecStreamTestSuite,testGroupAggExecStream4);
00078         FENNEL_UNIT_TEST_CASE(
00079             ExecStreamTestSuite,testReshapeExecStreamCastFilter);
00080         FENNEL_UNIT_TEST_CASE(
00081             ExecStreamTestSuite,testReshapeExecStreamNoCastFilter);
00082         FENNEL_UNIT_TEST_CASE(
00083             ExecStreamTestSuite,testReshapeExecStreamDynamicParams);
00084         FENNEL_UNIT_TEST_CASE(
00085             ExecStreamTestSuite,
00086             testSingleValueAggExecStream);
00087         FENNEL_UNIT_TEST_CASE(
00088             ExecStreamTestSuite,
00089             testMergeImplicitPullInputs);
00090         FENNEL_UNIT_TEST_CASE(
00091             ExecStreamTestSuite,
00092             testBTreeInsertExecStreamStaticBTree);
00093         FENNEL_UNIT_TEST_CASE(
00094             ExecStreamTestSuite,
00095             testBTreeInsertExecStreamDynamicBTree);
00096 
00097         // TODO jvs 4-Aug-2008:  enable these once
00098         // NLJ is parallel-safe
00099         FENNEL_EXTRA_UNIT_TEST_CASE(
00100             ExecStreamTestSuite,
00101             testNestedLoopJoinExecStream1);
00102         FENNEL_EXTRA_UNIT_TEST_CASE(
00103             ExecStreamTestSuite,
00104             testNestedLoopJoinExecStream2);
00105 
00106         FENNEL_UNIT_TEST_CASE(
00107             ExecStreamTestSuite,
00108             testSplitterPlusBarrier);
00109 
00110         FENNEL_UNIT_TEST_CASE(
00111             ExecStreamTestSuite,
00112             testSegBufferReaderWriterExecStream1);
00113         FENNEL_UNIT_TEST_CASE(
00114             ExecStreamTestSuite,
00115             testSegBufferReaderWriterExecStream2);
00116         FENNEL_UNIT_TEST_CASE(
00117             ExecStreamTestSuite,
00118             testSegBufferReaderWriterExecStream3);
00119         FENNEL_UNIT_TEST_CASE(
00120             ExecStreamTestSuite,
00121             testSegBufferReaderWriterExecStream4);
00122     }
00123 };
00124 
00125 using namespace fennel;
00126 
00127 // instantiate the ExecStreamTestSuite as a stand-alone program
00128 FENNEL_UNIT_TEST_SUITE(ParallelExecStreamSchedulerTest);
00129 
00130 // End ParallelExecStreamSchedulerTest.cpp

Generated on Mon Jun 22 04:00:20 2009 for Fennel by  doxygen 1.5.1