Пример #1
0
            public async Task Process(IncomingStepContext context, Func <Task> next)
            {
                var statsContext = new StatsContext();

                // save stats context for all the ProfilerSteps to find
                context.Save(statsContext);

                await next();

                _profilerStats.Register(statsContext);
            }
Пример #2
0
            public async Task Process(IncomingStepContext context, Func<Task> next)
            {
                var statsContext = new StatsContext();

                // save stats context for all the ProfilerSteps to find
                context.Save(statsContext);

                await next();

                _profilerStats.Register(statsContext);
            }
Пример #3
0
        internal void Register(StatsContext statsContext)
        {
            var measurements = statsContext.GetMeasurements();

            foreach (var measurement in measurements)
            {
                _stats.AddOrUpdate(measurement.StepType,
                                   key => measurement.Elapsed,
                                   (key, elapsed) => elapsed + measurement.Elapsed);
            }
        }
Пример #4
0
        internal void Register(StatsContext statsContext)
        {
            var measurements = statsContext.GetMeasurements();

            foreach (var measurement in measurements)
            {
                _stats.AddOrUpdate(measurement.StepType,
                    key => measurement.Elapsed,
                    (key, elapsed) => elapsed + measurement.Elapsed);
            }
        }
Пример #5
0
 public StatsContextDisposable(StatsContext statsContext, IIncomingStep nextStep)
 {
     _statsContext = statsContext;
     _nextStep = nextStep;
 }
Пример #6
0
 public StatsContextDisposable(StatsContext statsContext, IIncomingStep nextStep)
 {
     _statsContext = statsContext;
     _nextStep     = nextStep;
 }