protected override void OnRequestStarting(HttpRequestMessage request, PerfItContext context) { context.Data.Add(TimeTakenTicksKey + Name, Stopwatch.StartNew()); }
/// <summary> /// called when request arrives in delegating handler /// </summary> /// <param name="request"></param> /// <param name="context"></param> protected abstract void OnRequestStarting(HttpRequestMessage request, PerfItContext context);
protected override void OnRequestEnding(HttpResponseMessage response, PerfItContext context) { var sw = (Stopwatch)context.Data[TimeTakenTicksKey + Name]; sw.Stop(); _counter.Value.RawValue = sw.ElapsedMilliseconds; }
protected override void OnRequestStarting(IDictionary<string, object> contextBag, PerfItContext context) { _counter.Value.Increment(); }
/// <summary> /// called as the async continuation on the delegating handler (when response is sent back) /// </summary> /// <param name="response"></param> /// <param name="context"></param> protected abstract void OnRequestEnding(HttpResponseMessage response, PerfItContext context);
protected override void OnRequestEnding(IDictionary<string, object> contextBag, PerfItContext context) { var sw = (Stopwatch)context.Data[TimeTakenTicksKey + _instanceName]; sw.Stop(); _counter.Value.Increment(); }
protected override void OnRequestStarting(IDictionary<string, object> contextBag, PerfItContext context) { context.Data.Add(TimeTakenTicksKey + _instanceName, Stopwatch.StartNew()); }
protected override void OnRequestEnding(HttpResponseMessage response, PerfItContext context) { var sw = (Stopwatch)context.Data[TimeTakenTicksKey + _instanceName]; sw.Stop(); _counter.Value.Increment(); }
/// <summary> /// called when request arrives in delegating handler /// </summary> /// <param name="request"></param> /// <param name="context"></param> protected abstract void OnRequestStarting(IDictionary<string, object> contextBag, PerfItContext context);
protected override void OnRequestStarting(HttpRequestMessage request, PerfItContext context) { // nothing }
protected override void OnRequestEnding(HttpResponseMessage response, PerfItContext context) { _counter.Value.Increment(); }
protected override void OnRequestEnding(HttpResponseMessage response, PerfItContext context) { var sw = (Stopwatch) context.Data[AverageTimeTakenTicksKey + Name]; sw.Stop(); _counter.Value.IncrementBy(sw.ElapsedTicks); _baseCounter.Value.Increment(); }
protected override void OnRequestStarting(IDictionary<string, object> contextBag, PerfItContext context) { // nothing }
protected override void OnRequestStarting(HttpRequestMessage request, PerfItContext context) { context.Data.Add(AverageTimeTakenTicksKey + Name, Stopwatch.StartNew()); }