frame_insights 0.1.0
frame_insights: ^0.1.0 copied to clipboard
In-app frame timing for Flutter: a live FPS HUD, a frame-time chart, and a dashboard that ties each janky frame to the traced work that produced it.
0.1.0 #
Initial release, extracted from the in-app performance monitor of a Flutter demo app.
Core (package:frame_insights/frame_insights.dart)
PerformanceMonitorcollects engine frame timings and emits reports.PerformanceMonitorStorekeeps a rolling window of frames, reports, and jank records, and derives live metrics such as FPS, jank rate, and dropped frame estimates.PerformanceTracerrecords named regions of work so jank can be attributed to code;PerformanceRebuildCountercounts rebuilds through it.PerformanceRouteObserverlabels measurements with the visible route, and ignores the dashboard route by default so opening it does not restart the measurement.PerformanceHealthclassifies jank rate and first-frame time against documented thresholds.FrameMetrics,PerformanceReport, andPerformanceJankRecordexpose the measurements, each withtoJson().
UI (package:frame_insights/ui.dart)
PerformanceHud: draggable, collapsible floating window.FrameTimeChart: stacked build/raster/other bars with the over-budget part highlighted.PerformanceDashboardPageandperformanceDashboardRoute(): the detail view.PerformanceTheme(aThemeExtension) carries every colour andPerformanceStringscarries every user-visible string, so the UI follows the app's theme and can be translated.PerformanceStrings.english(default) andPerformanceStrings.chineseship with the package.PerformanceHudControllerpersists visibility, expansion, and position through an injectablePerformanceHudStorage(shared_preferencesby default,InMemoryPerformanceHudStoragefor tests).