Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IProfiler

    Defines the profiling service.

    Namespace: Umbraco.Cms.Core.Logging
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IProfiler

    Methods

    View Source

    Start()

    Starts the profiler.

    Declaration
    void Start()
    View Source

    Step(String)

    Gets an that will time the code between its creation and disposal.

    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 is meant to be used within a using (...) {{ ... }} block.

    View Source

    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.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • Start()
      • Step(String)
      • Stop(Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX