Skip to main content

Performance

Measure, analyze, and optimize application performance.

Eg performance

Interfaces

I
v
Performance

Deno supports User Timing Level 3 which is not widely supported yet in other runtimes.

I
v
PerformanceEntry

Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the .mark() method) at an explicit point in an application.

I
v
PerformanceMark

PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the performance timeline.

I
PerformanceMarkOptions

Options which are used in conjunction with performance.mark. Check out the MDN performance.mark() documentation for more details.

I
v
PerformanceMeasure

PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the performance timeline.

I
PerformanceMeasureOptions

Options which are used in conjunction with performance.measure. Check out the MDN performance.mark() documentation for more details.

I
v
PerformanceObserver

Observes performance measurement events and is notified of new PerformanceEntry objects as they are recorded.

I
PerformanceObserverCallback

The callback invoked when observed performance entries are recorded.

    I
    v
    PerformanceResourceTiming

    Detailed network timing data for the fetching of a resource, an entry in the performance timeline with an entryType of "resource".

    Type Aliases

    T
    PerformanceEntryList
    No documentation available

      Variables

      v
      performance

      The global Performance instance, providing access to high-resolution timing via performance.now() and the user-timing marks and measures APIs.


        interface Performance

        Deno supports User Timing Level 3 which is not widely supported yet in other runtimes.

        Check out the Performance API documentation on MDN for further information about how to use the API.

        Methods #

        #mark(
        markName: string,
        ): PerformanceMark

        Stores a timestamp with the associated name (a "mark").

        #measure(
        measureName: string,
        ): PerformanceMeasure

        Stores the DOMHighResTimeStamp duration between two marks along with the associated name (a "measure").

        Properties #

        #timeOrigin: number
        readonly

        Returns a timestamp representing the start of the performance measurement.

        Methods #

        #clearMarks(markName?: string): void

        Removes the stored timestamp with the associated name.

        #clearMeasures(measureName?: string): void

        Removes stored timestamp with the associated name.

        Removes all performance entries with an entryType of "resource" from the performance timeline and sets the size of the performance resource data buffer to zero.

        Note: Deno does not currently track resource timings, so this method has no observable effect. It is provided for API compatibility.

        #setResourceTimingBufferSize(maxSize: number): void

        Sets the desired size of the browser's resource timing buffer which stores the "resource" performance entries.

        Note: Deno does not currently track resource timings, so this method has no observable effect. It is provided for API compatibility.

        #getEntriesByName(
        name: string,
        type?: string,
        ): PerformanceEntryList
        #mark(
        markName: string,
        ): PerformanceMark

        Stores a timestamp with the associated name (a "mark").

        #measure(
        measureName: string,
        ): PerformanceMeasure

        Stores the DOMHighResTimeStamp duration between two marks along with the associated name (a "measure").

        #measure(
        measureName: string,
        startMark?: string,
        endMark?: string,
        ): PerformanceMeasure

        Stores the DOMHighResTimeStamp duration between two marks along with the associated name (a "measure").

        #now(): number

        Returns a current time from Deno's start in fractional milliseconds.

        const t = performance.now();
        console.log(`${t} ms since start!`);
        
        #toJSON(): any

        Returns a JSON representation of the performance object.

        variable Performance

        The constructor object for Performance.

        The Performance instance is accessed via the global performance property rather than constructed directly, so calling the constructor throws.

        Type #

        globalThis extends { document: any; Performance: infer T; } ? T : { readonly prototype: Performance; }

        interface PerformanceEntry

        Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the .mark() method) at an explicit point in an application.

        Properties #

        #duration: number
        readonly
        #entryType: string
        readonly
        #name: string
        readonly
        #startTime: number
        readonly

        Methods #

        #toJSON(): any

        variable PerformanceEntry

        Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the .mark() method) at an explicit point in an application.

        Type #

        globalThis extends { document: any; PerformanceEntry: infer T; } ? T : { readonly prototype: PerformanceEntry; }

        interface PerformanceMark

        PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the performance timeline.

        Properties #

        #detail: any
        readonly
        #entryType: "mark"
        readonly

        variable PerformanceMark

        PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the performance timeline.

        Type #

        globalThis extends { document: any; PerformanceMark: infer T; } ? T : { readonly prototype: PerformanceMark; }

        interface PerformanceMarkOptions

        Options which are used in conjunction with performance.mark. Check out the MDN performance.mark() documentation for more details.

        Properties #

        #detail: any
        optional

        Metadata to be included in the mark.

        #startTime: number
        optional

        Timestamp to be used as the mark time.

        Properties #

        #detail: any
        optional

        Metadata to be included in the mark.

        #startTime: number
        optional

        Timestamp to be used as the mark time.


        interface PerformanceMeasure

        PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the performance timeline.

        Properties #

        #detail: any
        readonly
        #entryType: "measure"
        readonly

        variable PerformanceMeasure

        PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the performance timeline.

        Type #

        globalThis extends { document: any; PerformanceMeasure: infer T; } ? T : { readonly prototype: PerformanceMeasure; }

        interface PerformanceMeasureOptions

        Options which are used in conjunction with performance.measure. Check out the MDN performance.mark() documentation for more details.

        Properties #

        #detail: any
        optional

        Metadata to be included in the measure.

        #start: string | number
        optional

        Timestamp to be used as the start time or string to be used as start mark.

        #duration: number
        optional

        Duration between the start and end times.

        #end: string | number
        optional

        Timestamp to be used as the end time or string to be used as end mark.

        Properties #

        #detail: any
        optional

        Metadata to be included in the measure.

        #start: string | number
        optional

        Timestamp to be used as the start time or string to be used as start mark.

        #duration: number
        optional

        Duration between the start and end times.

        #end: string | number
        optional

        Timestamp to be used as the end time or string to be used as end mark.


        interface PerformanceObserver

        Observes performance measurement events and is notified of new PerformanceEntry objects as they are recorded.

        Methods #

        #disconnect(): void
        #observe(options?: { entryTypes?: string[]; type?: string; buffered?: boolean; }): void

        variable PerformanceObserver

        Observes performance measurement events and is notified of new PerformanceEntry objects as they are recorded.

        Type #

        globalThis extends { document: any; PerformanceObserver: infer T; } ? T : { readonly prototype: PerformanceObserver; readonly supportedEntryTypes: readonly string[]; }


        interface PerformanceObserverEntryList

        A list of PerformanceEntry objects passed to a PerformanceObserver callback.

        Methods #

        variable PerformanceObserverEntryList

        A list of PerformanceEntry objects passed to a PerformanceObserver callback.

        Type #

        globalThis extends { document: any; PerformanceObserverEntryList: infer T; } ? T : { readonly prototype: PerformanceObserverEntryList; }

        interface PerformanceResourceTiming

        Detailed network timing data for the fetching of a resource, an entry in the performance timeline with an entryType of "resource".

        Properties #

        #entryType: "resource"
        readonly

        variable PerformanceResourceTiming

        Detailed network timing data for the fetching of a resource, an entry in the performance timeline with an entryType of "resource".

        Type #

        globalThis extends { document: any; PerformanceResourceTiming: infer T; } ? T : { readonly prototype: PerformanceResourceTiming; }


        variable performance

        The global Performance instance, providing access to high-resolution timing via performance.now() and the user-timing marks and measures APIs.

        Type #

        globalThis extends { document: any; performance: infer T; } ? T : Performance

        Did you find what you needed?

        Privacy policy