Add Stats Logging System with Build Flag Control#374
Add Stats Logging System with Build Flag Control#374wouterlucas wants to merge 13 commits intodevfrom
Conversation
Test Results: ❌ FAILEDRun at: 2025-05-26T09:48:06.409Z Summary: Error Output: |
1 similar comment
Test Results: ❌ FAILEDRun at: 2025-05-26T09:48:06.409Z Summary: Error Output: |
Test Results: ❌ FAILEDRun at: 2025-05-26T11:04:33.055Z Summary: Error Output: |
Test Results: ❌ FAILEDRun at: 2025-05-26T11:11:08.325Z Summary: Error Output: |
Test Results: ✅ PASSEDRun at: 2025-05-26T12:14:21.408Z Summary: |
Test Results: ✅ PASSEDRun at: 2025-05-26T12:41:11.004Z Summary: |
Test Results: ✅ PASSEDRun at: 2025-05-26T14:07:55.319Z Summary: |
Test Results: ✅ PASSEDRun at: 2025-05-26T16:29:18.953Z Summary: |
|
Squashed and rebased against latest master, will need some @DouweCnossen or @erikhaandrikman love on the overlay. Maybe sprites down the road. |
Test Results: ✅ PASSEDRun at: 2025-05-27T07:34:57.281Z Summary: |
Test Results: ✅ PASSEDRun at: 2025-05-27T08:16:07.059Z Summary: |
…imeouts, and intervals
…listeners, timeouts and intervals.
Test Results: ✅ PASSEDRun at: 2025-05-28T11:57:41.212Z Summary: |
Summary
This PR adds a comprehensive stats logging system that tracks component, element, and event listener activity throughout the application. The system is fully controlled by a Vite build flag (
__BLITS_STATS__), ensuring all stats-related code is optimized out of production builds for maximum performance.Key Features
Build-Time Flag for Zero Runtime Overhead
__BLITS_STATS__Vite flag to enable/disable stats at build timeBLITS_STATS_ENABLEDfor use in other modulesEnhanced Statistics Collection
Visual Stats Overlay Component
StatsOverlaycomponent for real-time stats visualizationDocumentation
docs/built-in/stats.mdImplementation Details
Testing
Future Improvements
This change maintains the high-performance standards of Blits while providing valuable debug and monitoring capabilities for developers during the development process.