Skip to main content

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