Skip to content

⬅️ Back to Table of Contents

📄 TimestampQueryPool.js

📊 Analysis Summary

Metric Count
🔧 Functions 3
🧱 Classes 1

📚 Table of Contents

🛠️ File Location:

📂 src/renderers/common/TimestampQueryPool.js

Functions

TimestampQueryPool.allocateQueriesForContext(): number

JSDoc:

/**
     * Allocate queries for a specific renderContext.
     *
     * @abstract
     * @param {Object} renderContext - The render context to allocate queries for.
     * @returns {?number}
     */

Returns: number

Code
allocateQueriesForContext( /* renderContext */ ) {}

TimestampQueryPool.resolveQueriesAsync(): number | Promise<number>

JSDoc:

/**
     * Resolve all timestamps and return data (or process them).
     *
     * @abstract
     * @async
     * @returns {Promise<number>|number} The resolved timestamp value.
     */

Returns: number | Promise<number>

Code
async resolveQueriesAsync() {}

TimestampQueryPool.dispose(): void

JSDoc:

/**
     * Dispose of the query pool.
     *
     * @abstract
     */

Returns: void

Code
dispose() {}

Classes

TimestampQueryPool

Class Code
class TimestampQueryPool {

    /**
     * Creates a new timestamp query pool.
     *
     * @param {number} [maxQueries=256] - Maximum number of queries this pool can hold.
     */
    constructor( maxQueries = 256 ) {

        /**
         * Whether to track timestamps or not.
         *
         * @type {boolean}
         * @default true
         */
        this.trackTimestamp = true;

        /**
         * Maximum number of queries this pool can hold.
         *
         * @type {number}
         * @default 256
         */
        this.maxQueries = maxQueries;

        /**
         * How many queries allocated so far.
         *
         * @type {number}
         * @default 0
         */
        this.currentQueryIndex = 0;

        /**
         * Tracks offsets for different contexts.
         *
         * @type {Map<string, number>}
         */
        this.queryOffsets = new Map();

        /**
         * Whether the pool has been disposed or not.
         *
         * @type {boolean}
         * @default false
         */
        this.isDisposed = false;

        /**
         * TODO
         *
         * @type {number}
         * @default 0
         */
        this.lastValue = 0;

        /**
         * TODO
         *
         * @type {boolean}
         * @default false
         */
        this.pendingResolve = false;

    }

    /**
     * Allocate queries for a specific renderContext.
     *
     * @abstract
     * @param {Object} renderContext - The render context to allocate queries for.
     * @returns {?number}
     */
    allocateQueriesForContext( /* renderContext */ ) {}

    /**
     * Resolve all timestamps and return data (or process them).
     *
     * @abstract
     * @async
     * @returns {Promise<number>|number} The resolved timestamp value.
     */
    async resolveQueriesAsync() {}

    /**
     * Dispose of the query pool.
     *
     * @abstract
     */
    dispose() {}

}

Methods

allocateQueriesForContext(): number
Code
allocateQueriesForContext( /* renderContext */ ) {}
resolveQueriesAsync(): number | Promise<number>
Code
async resolveQueriesAsync() {}
dispose(): void
Code
dispose() {}