public static ITracedScope SetDbCommandParameters(this ITracedScope tracedScope, DbCommand command) { tracedScope.SetProperty("sqlcommand text size", command.CommandText.Length * sizeof(char)); tracedScope.SetProperty("sqlcommand text", command.CommandText); tracedScope.SetProperty("sqlcommand type", command.CommandType.ToString()); return(tracedScope); }
public void NotifyLayerDisposed(ITracedScope tracedScope) { _openedChildrenCount--; if (_openedChildrenCount == 0) { _totalWindowSum = _totalWindowSum.Add(DateTime.Now.Subtract(_windowStartTime)); } }
public void NotifyLayerCreated(ITracedScope tracedScope) { if (_openedChildrenCount == 0) { _windowStartTime = DateTime.Now; } _openedChildrenCount++; }
public void NotifyLayerDisposed(ITracedScope tracedScope) { }
public void NotifyLayerCreated(ITracedScope tracedScope) { HasChildren = true; }
public ParallelScopeContext(ITracedScope scope) { Scope = scope; }
public static ITracedScope SetUniqueValue(this ITracedScope tracedScope, string key) { return(tracedScope.SetProperty(key, Guid.NewGuid().ToString("N"))); }
public static ITracedScope As3RdParty(this ITracedScope tracedScope, string name) { return(tracedScope.SetType("3rd party").SetName(name)); }
public static ITracedScope AsSql(this ITracedScope tracedScope, string provider) { return(tracedScope.SetType("sql").SetName("sql").SetProperty("provider", provider)); }
public static ITracedScope AsCPU(this ITracedScope tracedScope, string name) { return(tracedScope.SetType("cpu").SetName(name)); }
public static ITracedScope SetType(this ITracedScope tracedScope, string type) { tracedScope.SetProperty(LayerTypeKey, type); return(tracedScope); }
public static ITracedScope SetName(this ITracedScope tracedScope, string name) { tracedScope.SetProperty(LayerNameKey, name); return(tracedScope); }
public SequentialScopeContext(ITracedScope scope) { Scope = scope; }