Skip to content

@orillusion/core


Class: ProfilerUtil

Defined in: src/util/ProfilerUtil.ts:38

Lightweight profiling helper: accumulates per-pass draw statistics for each View3D and tracks named timing labels for performance measurement.

Constructors

Constructor

new ProfilerUtil(): ProfilerUtil

Returns

ProfilerUtil

Properties

viewMap

static viewMap: Map<View3D, ProfilerDraw>

Defined in: src/util/ProfilerUtil.ts:43

Per-view draw-statistic records keyed by the owning View3D.


testObj

static testObj: object

Defined in: src/util/ProfilerUtil.ts:46

Scratch counters available for ad-hoc debugging.

testValue1

testValue1: number = 0

testValue2

testValue2: number = 0

testValue3

testValue3: number = 0

testValue4

testValue4: number = 0

Methods

startView()

static startView(view): void

Defined in: src/util/ProfilerUtil.ts:54

Ensure a draw-stat record exists for the view and reset all pass counters to zero.

Parameters

view

View3D

Returns

void


viewCount()

static viewCount(view): ProfilerDraw

Defined in: src/util/ProfilerUtil.ts:90

Reset and return the draw-stat record for the view.

Parameters

view

View3D

Returns

ProfilerDraw


viewCount_vertex()

static viewCount_vertex(view, pass, v): void

Defined in: src/util/ProfilerUtil.ts:96

Accumulate vertex count for a pass of the view.

Parameters

view

View3D

pass

string

v

number

Returns

void


viewCount_indices()

static viewCount_indices(view, pass, v): void

Defined in: src/util/ProfilerUtil.ts:101

Accumulate index count for a pass of the view.

Parameters

view

View3D

pass

string

v

number

Returns

void


viewCount_tri()

static viewCount_tri(view, pass, v): void

Defined in: src/util/ProfilerUtil.ts:106

Accumulate triangle count for a pass of the view.

Parameters

view

View3D

pass

string

v

number

Returns

void


viewCount_instance()

static viewCount_instance(view, pass, v): void

Defined in: src/util/ProfilerUtil.ts:111

Accumulate instance count for a pass of the view.

Parameters

view

View3D

pass

string

v

number

Returns

void


viewCount_draw()

static viewCount_draw(view, pass): void

Defined in: src/util/ProfilerUtil.ts:116

Increment the draw-call count for a pass of the view.

Parameters

view

View3D

pass

string

Returns

void


viewCount_pipeline()

static viewCount_pipeline(view, pass): void

Defined in: src/util/ProfilerUtil.ts:121

Increment the pipeline-switch count for a pass of the view.

Parameters

view

View3D

pass

string

Returns

void


removeView()

static removeView(view): void

Defined in: src/util/ProfilerUtil.ts:128

Drop the view's draw-stat record.

Parameters

view

View3D

Returns

void


start()

static start(id): void

Defined in: src/util/ProfilerUtil.ts:133

Begin (or restart) timing the named label.

Parameters

id

string

Returns

void


end()

static end(id): void

Defined in: src/util/ProfilerUtil.ts:153

Stop timing the named label and record its total elapsed time.

Parameters

id

string

Returns

void


countStart()

static countStart(id, id2?): void

Defined in: src/util/ProfilerUtil.ts:162

Increment a label's call count and optionally begin timing a child label.

Parameters

id

string

id2?

string = ""

Returns

void


countEnd()

static countEnd(id, id2): void

Defined in: src/util/ProfilerUtil.ts:186

Stop timing a child label and record its elapsed time and count.

Parameters

id

string

id2

string

Returns

void


print()

static print(id): void

Defined in: src/util/ProfilerUtil.ts:208

Log the named label's total elapsed time to the console.

Parameters

id

string

Returns

void