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); }
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); }
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); } }
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); } }
public StatsContextDisposable(StatsContext statsContext, IIncomingStep nextStep) { _statsContext = statsContext; _nextStep = nextStep; }
public StatsContextDisposable(StatsContext statsContext, IIncomingStep nextStep) { _statsContext = statsContext; _nextStep = nextStep; }