zeba_academy_performance_monitor 1.0.0
zeba_academy_performance_monitor: ^1.0.0 copied to clipboard
Flutter performance monitoring toolkit with FPS, memory, rebuild tracking, API latency monitoring and overlay.
zeba_academy_performance #
๐ A lightweight Flutter performance monitoring toolkit to help developers analyze and improve app performance during development.
zeba_academy_performance provides tools for monitoring FPS, widget rebuilds, API latency, memory usage, app startup time, and a live performance overlay โ all in one simple package.
โจ Features #
- ๐ FPS Monitoring โ Track frames per second to detect UI performance issues
- ๐ Widget Rebuild Tracker โ Identify unnecessary widget rebuilds
- ๐ง Memory Usage Tracker โ Monitor memory behavior during runtime
- ๐ API Latency Tracker โ Measure network request performance
- โก App Startup Time Analyzer โ Analyze application startup duration
- ๐ฅ Performance Overlay โ On-screen overlay displaying performance metrics
๐ฆ Installation #
Add this package to your pubspec.yaml.
dependencies:
zeba_academy_performance: ^1.0.0
Then run:
flutter pub get
๐ Getting Started #
Import the package:
import 'package:zeba_academy_performance/zeba_academy_performance.dart';
๐ Performance Overlay #
Wrap your app with the performance overlay widget.
import 'package:flutter/material.dart';
import 'package:zeba_academy_performance/zeba_academy_performance.dart';
void main() {
runApp(
PerformanceOverlayWidget(
child: MyApp(),
),
);
}
This will display a live performance panel showing FPS and rebuild information.
๐ Widget Rebuild Tracker #
Track how many times a widget rebuilds.
RebuildTracker(
name: "HomePage",
child: HomePage(),
)
Useful for identifying unnecessary rebuilds.
๐ API Latency Tracker #
Measure the time taken for API requests.
final result = await ApiLatencyTracker.track(
Future.delayed(const Duration(milliseconds: 200), () => "API response"),
);
Example console output:
API Latency: 200 ms
โก App Startup Time Analyzer #
Measure how long your app takes to start.
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(MyApp());
StartupTimeAnalyzer.stop();
}
Example console output:
App Startup Time: 350 ms
๐ง Memory Usage Tracker #
Log memory information for debugging.
await MemoryTracker.logMemoryUsage();
๐ FPS Monitor #
Start FPS monitoring.
final fpsMonitor = FPSMonitor();
fpsMonitor.start();
print(fpsMonitor.fps);
๐งช Testing #
Run tests using:
flutter test
๐ค Contributing #
Contributions are welcome!
If you would like to improve this package:
- Fork the repository
- Create a feature branch
- Submit a pull request
๐ License #
This project is licensed under the GNU General Public License v3.0.
About Me #
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin
Your all-in-one no-bloat hub! #
๐ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! ๐ปโจ
Zeba Academy is a learning platform dedicated to coding, technology, and development.
โก Visit our main site: https://zeba.academy โก Explore hands-on courses and resources at: https://code.zeba.academy โก Check out our YouTube for more tutorials: https://www.youtube.com/@zeba.academy โก Follow us on Instagram: https://www.instagram.com/zeba.academy/
โญ If you find this package useful, consider giving it a star and sharing it with the community!
Thank you for visiting!