Class NoopProfiler
Inheritance
object
Namespace: Umbraco.Cms.Core.Logging
Assembly: Umbraco.Core.dll
Syntax
public class NoopProfiler : IProfiler
Properties
View SourceIsEnabled
Whether the profiler is enabled.
Declaration
public bool IsEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceStart()
Starts the profiler.
Declaration
public void Start()
Step(string)
Gets an System.IDisposable that will time the code between its creation and disposal.
Declaration
public IDisposable Step(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the step. |
Returns
| Type | Description |
|---|---|
| IDisposable | A step. |
Remarks
The returned System.IDisposable is meant to be used within a using (...) {{ ... }} block.
Stop(bool)
Stops the profiler.
Declaration
public void Stop(bool discardResults = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | discardResults | A value indicating whether to discard results. |
Remarks
Set discardResult to true to abandon all profiling - useful when eg someone is not authenticated or you want to clear the results, based upon some other mechanism.