Class LogProfiler
Implements IProfiler by writing profiling results to an
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Logging
Assembly: Umbraco.Core.dll
Syntax
public class LogProfiler : IProfiler
Constructors
View SourceLogProfiler(ILogger<LogProfiler>)
Declaration
public LogProfiler(ILogger<LogProfiler> logger)
Parameters
Type | Name | Description |
---|---|---|
ILogger<LogProfiler> | logger |
Methods
View SourceStart()
Starts the profiler.
Declaration
public void Start()
Step(String)
Declaration
public IDisposable Step(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
IDisposable |
Stop(Boolean)
Stops the profiler.
Declaration
public 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.