@vivliostyle/core
    Preparing search index...

    Class Profiler

    Performance profiler measuring execution time of the script.

    Index

    Constructors

    Properties

    performanceInstance: Performance
    registerEndTiming: (name: string, timestamp?: number) => any
    registerStartTiming: (name: string, timestamp?: number) => any
    timestamps: { [key: string]: { [key: string]: number } } = {}

    Methods

    • Disable profiling.

      Returns void

    • Enable profiling.

      Returns void

    • Registers end timing of some event, even if profile is disabled.

      Parameters

      • name: string

        Name of event

      • Optionaltimestamp: number

        Used as the actual timestamp of the event if specified, instead of "now"

      Returns void

    • Registers start timing of some event, even if profile is disabled.

      Parameters

      • name: string

        Name of event

      • Optionaltimestamp: number

        Used as the actual timestamp of the event if specified, instead of "now"

      Returns void

    • Returns if profiling is enabled or not.

      Returns boolean

    • Log registered timings (start/end/duration). All values are printed in ms unit.

      Returns void