Beispiel #1
0
        public PipelineAfterOptimizations <IBehaviorContext> V8_PipelineBeforeOptimizations()
        {
            var pipeline = new PipelineAfterOptimizations <IBehaviorContext>(null, new SettingsHolder(),
                                                                             pipelineModificationsBeforeOptimizations);

            return(pipeline);
        }
Beispiel #2
0
        public void SetUp()
        {
            behaviorContext = new BehaviorContext();

            pipelineModificationsBeforeOptimizations = new PipelineModifications();
            for (int i = 0; i < PipelineDepth; i++)
            {
                pipelineModificationsBeforeOptimizations.Additions.Add(RegisterStep.Create(i.ToString(),
                                                                                           typeof(Behavior1AfterOptimization), i.ToString(), b => new Behavior1AfterOptimization()));
            }

            pipelineModificationsAfterOptimizationsWithUnsafe = new PipelineModifications();
            for (int i = 0; i < PipelineDepth; i++)
            {
                pipelineModificationsAfterOptimizationsWithUnsafe.Additions.Add(RegisterStep.Create(i.ToString(),
                                                                                                    typeof(Behavior1AfterOptimization), i.ToString(), b => new Behavior1AfterOptimization()));
            }

            pipelineBeforeOptimizations = new PipelineAfterOptimizations <IBehaviorContext>(null, new SettingsHolder(),
                                                                                            pipelineModificationsBeforeOptimizations);
            pipelineAfterOptimizationsWithUnsafe = new PipelineAfterOptimizationsUnsafeAndMemoryMarshal <IBehaviorContext>(null, new SettingsHolder(),
                                                                                                                           pipelineModificationsAfterOptimizationsWithUnsafe);

            // warmup and cache
            pipelineBeforeOptimizations.Invoke(behaviorContext).GetAwaiter().GetResult();
            pipelineAfterOptimizationsWithUnsafe.Invoke(behaviorContext).GetAwaiter().GetResult();
        }
Beispiel #3
0
        public void SetUp()
        {
            behaviorContext = new BehaviorContext();

            pipelineModificationsBeforeOptimizations = new PipelineModifications();
            for (int i = 0; i < PipelineDepth; i++)
            {
                pipelineModificationsBeforeOptimizations.Additions.Add(RegisterStep.Create(i.ToString(),
                                                                                           typeof(Behavior1BeforeOptimization), i.ToString(), b => new Behavior1BeforeOptimization()));
            }

            pipelineModificationsAfterOptimizations = new PipelineModifications();
            for (int i = 0; i < PipelineDepth; i++)
            {
                pipelineModificationsAfterOptimizations.Additions.Add(RegisterStep.Create(i.ToString(),
                                                                                          typeof(Behavior1AfterOptimization), i.ToString(), b => new Behavior1AfterOptimization()));
            }

            pipelineBeforeOptimizations = new PipelineBeforeOptimization <IBehaviorContext>(null, new SettingsHolder(),
                                                                                            pipelineModificationsBeforeOptimizations);
            pipelineAfterOptimizations = new PipelineAfterOptimizations <IBehaviorContext>(null, new SettingsHolder(),
                                                                                           pipelineModificationsAfterOptimizations);
            pipelineAfterOptimizationsFastExpressionCompiler = new PipelineFastExpressionCompiler <IBehaviorContext>(null, new SettingsHolder(),
                                                                                                                     pipelineModificationsAfterOptimizations);

            // warmup and cache
            pipelineBeforeOptimizations.Invoke(behaviorContext).GetAwaiter().GetResult();
            pipelineAfterOptimizations.Invoke(behaviorContext).GetAwaiter().GetResult();
            pipelineAfterOptimizationsFastExpressionCompiler.Invoke(behaviorContext).GetAwaiter().GetResult();
        }