Table of Contents

Class PerformanceWatcher

Namespace
Framework.Systems.Diagnostics.Detection
Assembly
Assembly-CSharp.dll

IPerformanceWatcher 구현체. DiagnosticSnapshot 기반 6가지 성능 문제 자동 감지.

public sealed class PerformanceWatcher : IPerformanceWatcher
Inheritance
object
PerformanceWatcher
Implements

Remarks

감지 시 반드시: log.Warning + metrics.Record + SaveSnapshot. ZString.Format으로 GC-free 문자열 생성. MemoryLeak: TotalMemory가 MemoryLeakSamples 연속 증가 시 감지. SpawnBurst: InstantiateCounter를 외부에서 IncrementSpawn으로 증가.

Constructors

PerformanceWatcher(ILogSystem, IMetrics, PerformanceThreshold)

public PerformanceWatcher(ILogSystem log, IMetrics metrics, PerformanceThreshold threshold)

Parameters

log ILogSystem
metrics IMetrics
threshold PerformanceThreshold

Methods

IncrementSpawn(float)

외부(ObjectPool / Factory)에서 Instantiate 발생 시 호출.

public void IncrementSpawn(float dt)

Parameters

dt float

Tick(in DiagnosticSnapshot)

스냅샷을 기반으로 임계값 초과 여부 검사.

public void Tick(in DiagnosticSnapshot snapshot)

Parameters

snapshot DiagnosticSnapshot

현재 프레임 DiagnosticSnapshot.