src/Uno.Diagnostics.Eventing/Performance/Performance.cs
/// <summary>
/// Measures the time between the call to measure, and the call to dispose of the returned instance.
/// </summary>
/// <param name="name">The name of the measured scope</param>
/// <returns>An IDisposable instance that will stop the measure of the scope</returns>
Measures the time between the call to measure, and the call to dispose of the returned instance.
Measures the time between the call to measure and the call to dispose of the returned instance .
public static IDisposable Measure(string name)
		{
			if (Service != null && Service.IsEnabled)
			{
				return Service.Measure(name);
			}
			else
			{
                if (_trace.IsEnabled)
                {
                    return _trace.WriteEventActivity(
                        TraceProvider.Performance_MeasureStart,
                        TraceProvider.Performance_MeasureStop,
                        new[] { name }
                    );
                }
                else
                {
                    return null;
                }
			}
		}
public static IDisposable Measure ( string name ) { if ( Service != null && Service . IsEnabled ) { return Service . Measure ( name ) ; } else { if ( _trace . IsEnabled ) { return _trace . WriteEventActivity ( TraceProvider . Performance_MeasureStart , TraceProvider . Performance_MeasureStop , new [ ] { name } ) ; } else { return null ; } } }
Measures the time between the call to measure, and the call to dispose of the returned instance.
Measures the time between the call to measure and the call to dispose of the returned instance .
// Null is acceptable as a disposable value, the using construct supports it.
An IDisposable instance that will stop the measure of the scope
An IDisposable instance that will stop the measure of the scope
name
string
The name of the measured scope
The name of the measured scope