bloc_tracker 1.0.1
bloc_tracker: ^1.0.1 copied to clipboard
A powerful, zero-dependency performance profiler for the bloc library.
1.0.1 - 2025-10-15 #
- Updated README.md to include a banner and web ui image
1.0.0 - 2025-10-15 #
Added #
- Initial Release of
bloc_tracker! 🎉 - Automatic Performance Profiling: Core functionality to track the total execution time of BLoC event handlers using the
onDoneobserver. - Breakpoint Tracking: Introduced the
BlocBreakpointclass with thebp.add()method to measure the duration of specific, named sections of code within an event handler. - Declarative Handler API: Added the
tracker.on()wrapper, providing a clean, declarative way to instrument BLoC event handlers and automatically receive thebpobject. - Configurable Performance Thresholds:
- Created the
Thresholdsclass to define performance budgets. - Added
warningandseverestatus levels for granular performance feedback. - Thresholds can be set globally in
BlocTrackerSettingsand overridden on a per-breakpoint basis.
- Created the
- Granular Error Reporting:
- Introduced
bp.raise([error, stackTrace])to manually flag a failure from within an event handler, perfect for functional error patterns (Either.fold). - Errors are attached directly to the breakpoint where they occurred, providing precise context.
- Introduced
- Real-time Web UI:
- Added a self-contained, local web server that launches via the
launchsetting. - The web UI provides a real-time stream of all BLoC event traces using WebSockets.
- Added a self-contained, local web server that launches via the
- Flexible Output & Integration:
- A beautifully formatted, color-coded console logger is enabled by default.
- Added the
onTracecallback inBlocTrackerto allow for custom integration with any logging or monitoring service. - The
EventTraceobject includesprettyPrint()for on-demand console logging andtoJson()for easy serialization.
- Developer Experience Enhancements:
- Added
Durationextensions (.ms,.s,.micro) for a more readable and concise API when defining thresholds. - Added configurable settings (
printErrors,printStackTraces) to control the verbosity of the console output.
- Added