feat: add feature-gated profiler spans - #817
Conversation
|
Claude finished @aram-devdocs's task in 3m 57s —— View job Code Review — feat: add feature-gated profiler spansVerdict: APPROVED Clean, well-scoped, feature-gated instrumentation. Compiles out entirely by default, doesn't touch FFI/SDK surfaces, and the spec test verifies plumbing at the Phase 2–3: Architecture & Anti-Patterns
WARNINGS (non-blocking)
Scope note (informational, not blocking)
Positive callouts
|
|
Follow-up pushed in 93127fe: addressed both non-blocking Claude warnings by removing the redundant Puffin begin-frame helper/call and closing the profiler frame before the WGPU no-active-frame early return. Also noting for traceability: the deny.toml changes remove stale advisory ignores that are no longer needed with the current lockfile. |
93127fe to
a47b37f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
a47b37f to
027ba50
Compare
Overview
Type: feature
Summary:
Adds feature-gated Tracy/Puffin profiling support and spans for the WGPU frame path plus ECS schedule execution. Profiling is off by default and remains separate from fixed ENG2 phase counters.
Related Issues: Fixes #744
Changes Made
Engine Core (
goud_engine/src/)profiling-tracyandprofiling-puffinoptional features/dependencies.libs::profilinghelper so profiler backend selection is centralized and compiles out when disabled.FFI Layer (
goud_engine/src/ffi/)No changes.
C# SDK (
sdks/csharp/)No changes.
Python SDK (
sdks/python/)No changes.
TypeScript SDK (
sdks/typescript/)No changes.
Codegen Pipeline (
codegen/)No changes;
./codegen.shwas run and produced no generated drift.Proc Macros (
goud_engine_macros/)#[goud_api]attribute changesNo changes.
Tools (
tools/)No changes.
WASM (
goud_engine/src/wasm/)No changes.
Examples (
examples/)No changes.
Documentation
docs/src/development/profiling.mdwith backend usage, viewer notes, span names, and feature check commands.Architectural Compliance
./codegen.shrunTesting
cargo testpasses locally withGOUD_SKIP_NATIVE_SMOKE=1because this machine has no usable native displaycargo clippy -- -D warningsis cleancargo fmt --all -- --checkpassespython3 sdks/python/test_bindings.py) — if SDK changeddotnet test sdks/csharp.tests/) — if SDK changedcd sdks/typescript && npm test) — if TS SDK changed./codegen.sh,scripts/check-generated-artifacts.sh)Additional verification run:
Code Quality
todo!()orunimplemented!()in production code#[allow(unused)]without justification commentResult, notunwrap()/expect()in library codeDocumentation
AGENTS.mdfiles (if architecture changed)README.md(if user-facing behavior changed)Breaking Changes
None.
Version Bump
Bump type: none
Justification: Internal feature-gated developer instrumentation only.
Security
unsafeblocks — or each one has a// SAFETY:comment and is necessarycargo deny check advisories)Performance
Default builds do not enable the profiler backends. The span sites compile out unless
profiling-tracyorprofiling-puffinis enabled. This is developer instrumentation, not a perf gate capture.Deployment
Reviewer Notes
cargo testpreviously reaches the native present path and fails on this no-display machine;GOUD_SKIP_NATIVE_SMOKE=1 cargo testpassed and the skipped smoke tests reportno display available.