Options
All
  • Public
  • Public/Protected
  • All
Menu

A factory to create performance timers

Hierarchy

  • PerfTimerFactory

Index

Methods

  • getScopedTimer(group: "network" | "components" | "tools" | "manual", scope: string): PerfTimer
  • Returns an instance of the scoped performance timer for a specific group. The scoped timer is a timer that measures timestamps from the moment of the first scope using. This moment is called the time origin.

    example
    // The 'handlers' scope is created at this moment
    const timer = factory.getScopedTimer('manual', 'handlers');

    // <some code>

    // Uses the previous timer origin
    const anotherTimer = factory.getScopedTimer('manual', 'handlers');

    Parameters

    • group: "network" | "components" | "tools" | "manual"

      group name, that timer should belong to. It appears at the beginning of all time marks namespaces.

    • scope: string

      scope name, that defines the scope. It doesn't appear in any time mark namespaces.

    Returns PerfTimer

  • getTimer(group: "network" | "components" | "tools" | "manual"): PerfTimer
  • Returns an instance of the performance timer for a specific group

    Parameters

    • group: "network" | "components" | "tools" | "manual"

      group name, that timer should belong to. It appears at the beginning of all time marks namespaces.

    Returns PerfTimer