---
title: "DeviceStatistics: TypeShade 셰이더 API의 런타임 분류 인터페이스 참조 문서"
description: "DeviceStatistics, TypeShade API의 런타임 분류에 속하는 인터페이스입니다. 디바이스가 자기가 만든 배열에 대해 세는 값입니다."
url: https://typeshade.dev/ko/api/devicestatistics/
language: ko
---

# `DeviceStatistics`

인터페이스, 런타임 분류

디바이스가 자기가 만든 배열에 대해 세는 값입니다.

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

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

```ts
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'>>;
}
```

## 설명

바이트 수는 타입 배열의 바이트 수입니다.

## 인스턴스 속성

**`live` 읽기 전용 `number`**

디바이스가 만들고 아직 해제하지 않은 배열이며, 풀에 있는 배열도 들어갑니다.

**`liveBytes` 읽기 전용 `number`**

**`pooledBytes` 읽기 전용 `number`**

다시 쓰려고 보관한 반환된 배열의 바이트 수입니다.

**`allocations` 읽기 전용 `number`**

`array()`가 새로 만든 배열 수입니다.

**`reuses` 읽기 전용 `number`**

`array()`가 새로 만들지 않고 풀에서 가져온 배열 수입니다.

**`uploadBytes` 읽기 전용 `number`**

`array(value)`에 준 값의 바이트 수입니다.

**`readBytes` 읽기 전용 `number`**

디바이스 배열의 `read()`가 돌려준 바이트 수입니다.

**`variants` 읽기 전용 `Readonly<Record<string, 'tree' | 'subgroup'>>`**

각 함수의 마지막 커널 호출이 WebGPU에서 디스패치한 텍스트를 함수 이름별로 나타냅니다(변경 0119). 서브그룹 변형이면 `'subgroup'`, 함수 자체의 텍스트이면 `'tree'`입니다. 변형이 없는 함수와 다른 tier에서 실행된 모든 호출은 `'tree'`입니다.

## 소스

[`src/runtime/device.ts`, 111행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/runtime/device.ts#L111), 커밋 af54ddad5 기준
