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