Beispiel #1
0
 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++;
        }
Beispiel #4
0
 public void NotifyLayerDisposed(ITracedScope tracedScope)
 {
 }
Beispiel #5
0
 public void NotifyLayerCreated(ITracedScope tracedScope)
 {
     HasChildren = true;
 }
Beispiel #6
0
 public ParallelScopeContext(ITracedScope scope)
 {
     Scope = scope;
 }
Beispiel #7
0
 public static ITracedScope SetUniqueValue(this ITracedScope tracedScope, string key)
 {
     return(tracedScope.SetProperty(key, Guid.NewGuid().ToString("N")));
 }
Beispiel #8
0
 public static ITracedScope As3RdParty(this ITracedScope tracedScope, string name)
 {
     return(tracedScope.SetType("3rd party").SetName(name));
 }
Beispiel #9
0
 public static ITracedScope AsSql(this ITracedScope tracedScope, string provider)
 {
     return(tracedScope.SetType("sql").SetName("sql").SetProperty("provider", provider));
 }
Beispiel #10
0
 public static ITracedScope AsCPU(this ITracedScope tracedScope, string name)
 {
     return(tracedScope.SetType("cpu").SetName(name));
 }
Beispiel #11
0
 public static ITracedScope SetType(this ITracedScope tracedScope, string type)
 {
     tracedScope.SetProperty(LayerTypeKey, type);
     return(tracedScope);
 }
Beispiel #12
0
 public static ITracedScope SetName(this ITracedScope tracedScope, string name)
 {
     tracedScope.SetProperty(LayerNameKey, name);
     return(tracedScope);
 }
 public SequentialScopeContext(ITracedScope scope)
 {
     Scope = scope;
 }