default
FitFileViewer - API Documentation v29.4.0
FitFileViewer - API Documentation / utils/debug / default
Variable: default
default: {
testFaveroCase: ;testFaveroStringCase: ;testNewFormatting: ;checkDataAvailability: ;debugSensorInfo: ;showDataKeys: ;showSensorNames: ;testManufacturerId: ;testProductId: ;throttledAnimLog: (message:any) =>void;criticalAnimLog: (message:string) =>void;perfAnimLog: (message:any,startTime:any) =>void;performanceMonitor:StatePerformanceMonitor;debugUtilities:StateDebugUtilities;cleanupStateDevTools: ;initializeStateDevTools: ;measureStateOperation: ;withPerformanceMonitoring: ; }
Defined in: utils/debug/index.js:15
Type Declarationβ
testFaveroCaseβ
Re-exports testFaveroCase
testFaveroStringCaseβ
Re-exports testFaveroStringCase
testNewFormattingβ
Re-exports testNewFormatting
checkDataAvailabilityβ
Re-exports checkDataAvailability
debugSensorInfoβ
Re-exports debugSensorInfo
showDataKeysβ
Re-exports showDataKeys
showSensorNamesβ
Re-exports showSensorNames
testManufacturerIdβ
Re-exports testManufacturerId
testProductIdβ
Re-exports testProductId
throttledAnimLog()β
throttledAnimLog: (
message:any) =>void
Internal
Logs animation progress messages to the console at most once every 500ms to prevent log flooding. Intended for development/debug logging onlyβautomatically disabled in production builds.
This utility uses a closure to maintain state and throttle log messages, which is particularly useful for high-frequency events like animation frames or scroll handlers.
Parametersβ
messageβ
any
The message to log to the console
Returnsβ
void
Examplesβ
// Log animation frame updates (throttled to max once per 500ms)
throttledAnimLog('Animation frame updated: frame 1234');
throttledAnimLog('Chart rendering progress: 45%');
// Use in animation loops
function animateChart() {
throttledAnimLog(`Chart animation progress: ${progress}%`);
// ... animation logic
requestAnimationFrame(animateChart);
}
@internal
Sinceβ
1.0.0
criticalAnimLog()β
criticalAnimLog: (
message:string) =>void
Internal
Alternative logging function for critical animation events that should always be logged even if throttling is active. Use sparingly to avoid console flooding.
Parametersβ
messageβ
string
The critical message to log immediately
Returnsβ
void
Exampleβ
criticalAnimLog('Animation failed: unable to render chart');
criticalAnimLog('Animation completed successfully');
@internal
Sinceβ
1.0.0
perfAnimLog()β
perfAnimLog: (
message:any,startTime:any) =>void
Internal
Performance-aware animation logger that includes timing information Logs with high-resolution timestamps for performance analysis
Parametersβ
messageβ
any
The message to log with timing information
startTimeβ
any
Optional start time for duration calculation
Returnsβ
void
Exampleβ
const start = performance.now();
// ... animation work
perfAnimLog('Chart render completed', start);
@internal
Sinceβ
1.0.0
performanceMonitorβ
performanceMonitor:
StatePerformanceMonitor
Create global instances
debugUtilitiesβ
debugUtilities:
StateDebugUtilities
cleanupStateDevToolsβ
Re-exports cleanupStateDevTools
initializeStateDevToolsβ
Re-exports initializeStateDevTools
measureStateOperationβ
Re-exports measureStateOperation
withPerformanceMonitoringβ
Re-exports withPerformanceMonitoring