Repository navigation
Profiler: typed events + viewer Phase 4 + cache v8 (#243) - #245
Merged
Merged
Conversation
Engine - GaugeSnapshotEmitter for per-tick memory / page-cache / WAL / tx / GC gauges - GcEventListener + GcEventQueue + GcIngestionThread (ETW → typed events on a dedicated thread slot, preserves SPSC invariant) - Remove Volatile.Read/Write on ≤64-bit fields per project rule Server - PathGuard on /api/trace/chunk and /api/trace/chunk-binary - TraceFileCacheConstants.EventCap (50k) + bump CurrentChunkerVersion 7→8 - Cached GC-suspension list on session slot for stable viewer yMax - ChunkBinaryHeaders const class (single source of truth for header names) Viewer - OPFS-backed persistent chunk cache keyed by source fingerprint, with corruption fallback + serialized writes - Worker pool (1-4 workers, least-busy dispatch) for parallel chunk decode - Per-call pinned set threaded through loadChunk (fixes cross-call eviction race), per-cache over-budget warning, failed-chunk retry-after map - Load-epoch guard in open handlers (fixes two-handler trace-switch race) - AVG_BYTES_PER_EVENT 200→500 to reflect real V8 object overhead - "Loading ticks…" overlay while a dense chunk decodes If you want it tighter for a one-line subject + brief body, here's an alternative: Profiler gauge snapshots + GC ingestion; viewer chunk pipeline hardened Adds engine-side gauge snapshot subsystem and a dedicated GC event ingestion thread. Hardens the viewer's chunk loading: OPFS persistence with corruption fallback, parallel decode via worker pool, race-safe trace switches, failed-chunk retry suppression, and server-side event-count chunk cap (cache v8).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FileExporter,TcpExporter), JIT-gated viastatic readonlyflags. 37 typed event kinds covering BTree / Tx / ECS / PageCache (with async-completion correlation) / WAL / Checkpoint / Statistics / ClusterMigration / NamedSpan / scheduler internals / GC / MemoryAllocEvent / PerTickSnapshot / ThreadInfo. Migrated 25 call sites; deletedIRuntimeInspector+TraceEventCaptureBase+TraceFileInspector+TcpStreamInspector+DagScheduler.Inspector.cs..typhon-trace-cache(ChunkerVersion = 8), chunk-based lazy loading, binary LZ4 transport through a 1–4 Web Worker pool with per-slot failure isolation, OPFS persistent chunk cache (1 GB/trace, 5 GB global), live SSE streaming, FlameGraph tab fed by.nettrace, gauge region with 5 tracks (Memory / Page Cache / WAL / Tx+UoW / GC) and per-sub-row tooltips.ChunkManifestEntry.Flagsbit 0 =IsContinuation. Pathologically dense ticks split across multiple chunks; client merges transparently viamergeTickDatachain-fold at assembly time. Gold-standard correctness test pins byte-identical merge output to single-pass output. Chunk endpoint switched tochunkIdxidentity;X-Chunk-Is-Continuationresponse header plumbed throughChunkBinaryHeadersconst class.GcEventListener+GcEventQueue+GcIngestionThread(in-process EventPipe onMicrosoft-Windows-DotNETRuntime/ GCKeyword); emitsGcStart(7) /GcEnd(8) /GcSuspension(75). Per-tick gauge snapshot system (GaugeSnapshotEmitter+PerTickSnapshotkind 76 + wire-stableGaugeIdregistry).MemoryAllocEvent(kind 9) for allPinnedMemoryBlocktraffic.ThreadInfo(kind 77) records for slot identity. Each subsystem independently gated by its ownTelemetryConfig.Profiler*Activeflag.chunkDecoder.test.ts,traceModel.test.ts). Design doc rewritten, user manual added, 4 D2 architecture diagrams authored + rendered, README index updated.Test plan
isContinuationtick-counter seed invariantsioprofile-1k.typhon-trace,ioprofile-2k.typhon-trace, andioprofile-split-test.typhon-trace(200 K entities in a single tick → 6 continuation chunks)ProfileRunnercaptures expected spans across configsnpx tsc --noEmiton ClientApp — cleanProfilerGcTracingActive→ events appear in GC trackResolves #243