feat: PR3A — Instruments signposts for tunnel lifecycle profiling#8
Open
mrmidi wants to merge 1 commit into
Open
feat: PR3A — Instruments signposts for tunnel lifecycle profiling#8mrmidi wants to merge 1 commit into
mrmidi wants to merge 1 commit into
Conversation
TunnelSignposts (FptnVPNTunnel/Diagnostics/TunnelSignposts.swift): - OSSignposter with subsystem net.mrmidi.FptnVPN.FptnVPNTunnel - Compiled only when FPTN_SIGNPOSTS is defined (Debug + Measurement) Intervals: - TunnelStartup: startTunnel → finishStart - BridgeLifetime: bridge created → bridge stopped (per generation) - NativeTeardown: bridge detached → final status captured - TunnelShutdown: stopTunnel → completionHandler - ReconnectDelay: reconnect scheduled → fired/cancelled Point events: - TransportConnected, TransportDisconnected - NetworkPathChanged, MemoryWarning, InvariantViolation - PacketReadLoopStarted, PacketReadLoopStopped Build config: - FPTN_SIGNPOSTS added to Debug and Measurement configs - No signposts in Release (production) No persistence, no JSON, no per-packet instrumentation. Numeric metadata only, no interpolated strings. Tests: 27/27 passed. Debug build succeeded.
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.
PR3A — Instruments Signposts
Base:
pr3/binary-diagnostics· 3 files, +144/-1Scope
Deliberately small: no persistence, no JSON changes, no state-machine changes, no per-packet instrumentation.
Signposts
Intervals (begin/end around async operations):
TunnelStartupstartTunnelenteredfinishStartcalledBridgeLifetimeNativeTeardownTunnelShutdownstopTunnelenteredcompletionHandlercalledReconnectDelayPoint events (instantaneous):
TransportConnected,TransportDisconnected,NetworkPathChanged,MemoryWarning,InvariantViolation,PacketReadLoopStarted,PacketReadLoopStoppedBuild config
FPTN_SIGNPOSTSadded to Debug and Measurement configsimport OSLogguarded by#if FPTN_SIGNPOSTSState storage
Single active bridge signpost (PR2 guarantees single exposed bridge):
Acceptance test
Record Allocations + VM Tracker in Instruments and verify:
Verification
Stack