Ejemplo n.º 1
0
        public void CanBranchThePipeline()
        {
            using (var process = new FibonacciBranchingProcess(30, 2))
                process.Execute();

            AssertCountForFibonacci(60);
        }
Ejemplo n.º 2
0
        public void CanBranchThePipeline()
        {
            using (var process = new FibonacciBranchingProcess(30, 2))
                process.Execute();

            AssertCountForFibonacci(60);
        }
Ejemplo n.º 3
0
        public void CanBranchThePipelineEfficiently()
        {
            var initialMemory = GC.GetTotalMemory(true);

            using (var process = new FibonacciBranchingProcess(30000, 10))
                process.Execute();

            var finalMemory = GC.GetTotalMemory(true);

            Assert.True(finalMemory - initialMemory < 10 * 1000 * 1000, "Consuming too much memory");
            AssertCountForFibonacci(300000);
        }
Ejemplo n.º 4
0
        public void CanBranchThePipelineEfficiently()
        {
            var initialMemory = GC.GetTotalMemory(true);

            using (var process = new FibonacciBranchingProcess(30000, 10))
                process.Execute();

            var finalMemory = GC.GetTotalMemory(true);

            Assert.True(finalMemory - initialMemory < 10 * 1000 * 1000, "Consuming too much memory");
            AssertCountForFibonacci(300000);
        }