示例#1
0
        static void Main(string[] args)
        {
            // generate source test data
            const int genChaptersCount = 1500;
            var       rnd = new Random(DateTime.Now.Millisecond);

            IList <ProjectLine> testData1 = TestDataLoader.GenerateDemoData(genChaptersCount);

            File.WriteAllLines(TestDataLoader.DemoGenDataFileName, testData1.Select(i => i.Chapter).OrderBy(l => rnd.Next(genChaptersCount)));

            // simple slow build test
            //IList<ProjectLine> testData = TestDataLoader.LoadDemoData(TestDataLoader.DemoGenDataFileName);
            //RunTest(testData, SimpleSlowTreeBuilder.BuildTree);

            // put your test here
            IList <ProjectLine> testData2 = TestDataLoader.LoadDemoData(TestDataLoader.DemoGenDataFileName);

            RunTest(testData2, TreeBuilderTM.BuildTree);

            testData2 = TestDataLoader.LoadDemoData(TestDataLoader.DemoGenDataFileName);
            RunTest(testData2, TreeBuilderNick.BuildTree);

            var summary = BenchmarkRunner.Run <Program>();

            Console.ReadKey();
        }
示例#2
0
 public void Test_SimpleSlowTreeBuilder()
 {
     IList <ProjectLine> testData    = TestDataLoader.LoadDemoData(TestDataLoader.DemoGenDataFileName);
     IList <ProjectLine> resTestData = SimpleSlowTreeBuilder.BuildTree(testData);
 }
示例#3
0
 public void Test_TreeBuilderAlexV()
 {
     IList <ProjectLine> testData    = TestDataLoader.LoadDemoData(TestDataLoader.DemoGenDataFileName);
     IList <ProjectLine> resTestData = TreeBuilderAlexV.BuildTree(testData);
 }