collector_flutter 0.1.3
collector_flutter: ^0.1.3 copied to clipboard
Real-time resource monitoring for Flutter apps — FPS, jank, memory, CPU, battery, HTTP traffic, and custom events with an embedded dashboard and actionable recommendations.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased] #
0.1.3 - 2026-06-16 #
Changed #
- Updated dependency constraints to support the latest stable releases of
fl_chart,google_fonts,http, andvm_service. - Raised the minimum SDKs to Dart
3.9.0and Flutter3.35.0to match the latest dependency constraints and color opacity API.
Fixed #
- Replaced deprecated
.withOpacity()calls with.withValues(alpha: ...)to keep static analysis clean on current Flutter SDKs.
0.1.2 - 2026-06-15 #
0.1.0 - 2026-04-18 #
Added #
ResourceCollector— main facade for unified lifecycle management (start,stop,dispose,collectNow)FrameDataSource— frame timing collection viaSchedulerBinding.addTimingsCallback; buffers up to 600 framesMemoryDataSource— RSS and heap monitoring via the Dart VM Service, withProcessInfo.currentRssfallback; maintains up to 120 samplesHttpClientWrapper/TelemetryHttpClient— transparent HTTP client wrapper that records method, URL, status, latency, and payload sizes; stores up to 1 000 eventsEventDataSource— timestamped custom event recording; stores up to 1 000 entriesAnalyzer— heuristic engine computing FPS estimate, P50 / P95 / P99 frame percentiles, jank count, memory trend (MB/min), and network statisticsRecommender— generates severity-coded (info/low/medium/high) actionable recommendations fromAnalysisResultCollectorBloc— reactive state management for the collection lifecycle (CollectorIdle,CollectorRunning,CollectorData,CollectorError)DashboardPage— embedded real-time dashboard with frame chart, five metric cards, network panel, recommendations, and JSON clipboard exportRebuildObserver— widget wrapper for automatic rebuild counting on a subtreePerformanceBudget— configurable target frame rate, memory warning threshold, and network request thresholdExportService— JSON snapshot generation for the current telemetry session- Clean Architecture structure: Data / Domain / Presentation layers with repository pattern and use-case interactors
Fixed #
- Frame chart X-axis: replaced
DateTime.now()with sequential frame indices to produce a correct timing plot - Memory history: introduced
_lastMemorySnapshotguard to prevent false downward spikes from missed samples - Chart rendering: wrapped chart in
ClipRRect+SingleChildScrollViewwith dynamic Y-axis scaling (interval = maxY / 4) - Network URL display: added
_extractShortHost()for readable, non-redundant URL truncation - Collection synchronisation: memory sampling interval set to
0.9 × collectionIntervalto guarantee fresh data on every collection cycle StreamSubscriptionleak inDashboardPage.dispose(): subscription now correctly cancelledResourceCollector.dispose(): now callsstop()beforebloc.dispose(), preventing in-flight collection after disposal