Interface IProfiler
Defines the profiling service.
Namespace: Umbraco.Cms.Core.Logging
Assembly: Umbraco.Core.dll
Syntax
public interface IProfiler
Methods
View SourceStart()
Starts the profiler.
Declaration
void Start()
Step(String)
Gets an
Declaration
IDisposable? Step(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the step. |
Returns
Type | Description |
---|---|
System.Nullable<IDisposable> | A step. |
Remarks
The returned using (...) {{ ... }}
block.
Stop(Boolean)
Stops the profiler.
Declaration
void Stop(bool discardResults = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | 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.