DeviceStatistics
On this page

DeviceStatistics

Interface in Runtime

What a device counts of the arrays it made.

import type { DeviceStatistics } from 'typeshade'
import type { DeviceStatistics } from 'typeshade/runtime'

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

Syntax

interface DeviceStatistics {
readonly live: number;
readonly liveBytes: number;
readonly pooledBytes: number;
readonly allocations: number;
readonly reuses: number;
readonly uploadBytes: number;
readonly readBytes: number;
readonly variants: Readonly<Record<string, 'tree' | 'subgroup'>>;
}

Description

The bytes are those of typed arrays.

Instance properties

liveread only number

The arrays the device made and has not freed, the pooled ones among them.

liveBytesread only number
pooledBytesread only number

The bytes of the released arrays kept for reuse.

allocationsread only number

How many arrays array() made new.

reusesread only number

How many arrays array() took from the pool instead.

uploadBytesread only number

The bytes of the values array(value) was given.

readBytesread only number

The bytes read() of the device’s arrays returned.

variantsread only Readonly<Record<string, 'tree' | 'subgroup'>>

The text the last kernel call of each function dispatched on WebGPU (change 0119), by the function’s name: 'subgroup' for the subgroup variant, 'tree' for the function’s own. A function whose face has no variant, and every call on another tier, is 'tree'.

Source

src/runtime/device.ts, line 111, at commit af54ddad5

Edit this page Report a problem