Table of Contents

Namespace PopcorningGuineaPig.Engine.Diagnostics

Classes

FileMemorySink

Writes each received MemorySnapshot as a JSON file in the configured directory. Opens and closes the file per write so a crash mid-run cannot leave a corrupted handle behind.

MemoryProfiler

Game-side, opt-in memory profiling API. Produces MemorySnapshot values that are bit-comparable with editor-side snapshots from Story 12.2, so the same diff tooling works against both editor and game captures.

MemorySnapshot

A point-in-time view of memory usage across categories. Designed to be cheap to construct (small allocations only) and trivially serializable via System.Text.Json.

ProcessMemory

Working set and private bytes for the current process, read without the cost of Process.

RingBufferMemorySink

Keeps the last N snapshots in memory. Useful for "always-on" sampling at a fixed interval with no I/O cost; flush to disk on demand via a FileMemorySink when something interesting happens.

Interfaces

IMemorySink

Receives MemorySnapshot values produced by a MemoryProfiler. Implement to fan out snapshots to disk, in-memory buffers, or custom transports.

Enums

MemoryCategory

Memory categories tracked by MemorySnapshot.