CsCheck/Causal.cs
/// <summary>Marks the start of causal profiling region.</summary>
/// <param name="name">The region name.</param>
Marks the start of causal profiling region.
Marks the start of causal profiling region .
public static Region RegionStart(string name)
        {
            if (runType == RunType.Nothing) return new Region();
            var now = Stopwatch.GetTimestamp();
            var lockTaken = false;
            spinLock.Enter(ref lockTaken);
            if (delayName == name && delayTime < 0)
                if (delayCount++ == 0)
                    onSince = now;
            var localTotalDelay = totalDelay;
            var localOnSince = onSince;
            if (lockTaken) spinLock.Exit(false);
            return new Region { Name = name, Start = now, TotalDelay = localTotalDelay, OnSince = localOnSince };
        }
public static Region RegionStart ( string name ) { if ( runType == RunType . Nothing ) return new Region ( ) ; var now = Stopwatch . GetTimestamp ( ) ; var lockTaken = false ; spinLock . Enter ( ref lockTaken ) ; if ( delayName == name && delayTime < 0 ) if ( delayCount ++ == 0 ) onSince = now ; var localTotalDelay = totalDelay ; var localOnSince = onSince ; if ( lockTaken ) spinLock . Exit ( false ) ; return new Region { Name = name , Start = now , TotalDelay = localTotalDelay , OnSince = localOnSince } ; }
Marks the start of causal profiling region.
Marks the start of causal profiling region .
name
string
The region name.
The region name .