diagnostics ff #114
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
rust
technical-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-seq!114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "diagnostics-ff"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes made:
- StrandSlot, StrandRegistry structs and impls
- STRAND_REGISTRY static and strand_registry() function
- register() and unregister() calls in spawn path
- 4 registry-related tests
Usage for benchmarks:
Build without diagnostics (no SystemTime::now() syscalls, no O(n) registry scans)
cargo build --release -p seq-runtime --no-default-features
Or in the compiler:
cargo build --release --no-default-features
Test results:
Code Review - PR #114: Diagnostics Feature Flag
This PR adds a feature flag to make diagnostics optional, allowing cleaner benchmarking without syscall overhead. Overall, this is a well-designed and well-executed change with proper documentation and testing.
✅ Strengths
Clean Feature Flag Design
Comprehensive Coverage
Excellent Documentation
Testing
🔍 Minor Suggestions
scheduler.rs:293, 297 - Consider adding comments explaining why signal handler and watchdog setup can be safely skipped when diagnostics are disabled
Performance Impact Documentation - Consider adding a benchmark comparison showing actual performance delta with/without diagnostics
Test Coverage - Consider adding a test that verifies strand spawning works correctly with --no-default-features to ensure core scheduler functionality is unaffected
🔒 Security Considerations
⚡ Performance Considerations
Eliminated Overhead:
Memory Impact: STRAND_REGISTRY not compiled saves ~16KB (default config)
✨ Recommendation
Approve with minor suggestions.
This PR is production-ready. The feature flag design is clean, the implementation is thorough, and testing is comprehensive. Minor suggestions are optional improvements for follow-up PRs.
Great work! 🚀