Datalayer VS Code Extension - v0.0.17
    Preparing search index...

    Performance monitoring utilities for tracking operation timing and memory usage.

    Index

    Constructors

    Methods

    • Create a performance timer that can be manually controlled. Useful for tracking operations that span multiple function calls.

      Parameters

      • operationName: string

        Human-readable name for the operation.

      • Optionalcontext: Record<string, unknown>

        Additional context information.

      Returns PerformanceTimer

      PerformanceTimer instance.

    • Track operation performance with automatic logging and memory monitoring. Logs start, completion, and failure with detailed performance metrics.

      Type Parameters

      • T

      Parameters

      • operationName: string

        Human-readable name for the operation.

      • operation: () => Promise<T>

        Async function to execute and monitor.

      • Optionalcontext: Record<string, unknown>

        Additional context information.

      Returns Promise<T>

      Promise that resolves with the operation result.

    • Track synchronous operation performance. For operations that don't return promises but still need timing.

      Type Parameters

      • T

      Parameters

      • operationName: string

        Human-readable name for the operation.

      • operation: () => T

        Synchronous function to execute and monitor.

      • Optionalcontext: Record<string, unknown>

        Additional context information.

      Returns T

      The operation result.

      Re-throws any error from the tracked operation after logging performance data.