Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Verify
on:
push:
pull_request:

permissions:
contents: read

jobs:
flutter:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.44.7'
channel: stable
cache: true
- run: flutter pub get
- run: dart format --output=none --set-exit-if-changed lib test example/lib example/test
- run: flutter analyze --no-pub
- run: flutter test --no-pub --coverage
- run: flutter test --no-pub
working-directory: example
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## Unreleased

* Generate list snapshots lazily, retain cached sanitized details on ordinary response updates and add a reproducible ingestion benchmark.
* Add pause/resume without deleting retained logs, method/host/slow/cancelled filters, general-log level/search filters and programmatic query APIs.
* Add sanitized HAR/JSON exports, POSIX cURL templates, background whole-list encoding on native platforms and clipboard feedback.
* Preserve console filter selections across details and tabs, and omit credentials embedded in URLs or redirect locations.
* Bound network/general logs, UTF-8 body/message previews and structured body traversal; coalesce subscriber notifications during bursts.
* Use unique request IDs and constant-time log lookup; remove the unused Dio request map.
* Preserve http stream errors, forward pause/resume/cancellation and capture headers before body consumption without altering caller payloads.
* Make debugPrint initialization idempotent, add shutdown and implement EasyDebug.log.
* Disable capture/UI by default in release builds; add configurable sensitive-header and structured-credential masking.
* Refresh the console with adaptive light/dark cards, search, pending filters, bounded dragging and live details inside the console.
* Replace the stale example test, add network/manager/widget regressions and a verification workflow; update setup and release documentation.

## 0.0.4

* Add standard http client support and a separate general-log view.
* Add debugPrint capture and update the debug console layout.

## 0.0.3

* **[DOCS] Update README**: Added comprehensive documentation for Environment Switcher feature.
Expand Down
24 changes: 24 additions & 0 deletions PERFORMANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Log ingestion performance

The benchmark is `test/performance_test.dart`:

```sh
flutter test --no-pub test/performance_test.dart --reporter expanded
```

Each of three consecutive samples writes 100,000 short general-log messages, with a listener attached and retention set to 200. The measured interval contains ingestion only. The test then reads the snapshot, verifies its contents and independence from later changes, and checks one batched notification per burst. Timing is diagnostic; there is no machine-dependent pass/fail threshold.

Observed on this macOS workspace using Flutter 3.44.7 / Dart 3.12.2 in the debug test process:

| Implementation | Sample 1 | Sample 2 | Sample 3 | Median |
| --- | ---: | ---: | ---: | ---: |
| Baseline `031b962` | 151.554 ms | 115.314 ms | 109.887 ms | 115.314 ms |
| Lazy snapshots in this change | 29.580 ms | 14.246 ms | 12.515 ms | 14.246 ms |

The observed median ingestion time was about 8.1 times lower. Both versions retained 200 messages and emitted one notification per burst. These are local samples, not a frame-rate claim or a performance guarantee across devices. JIT, garbage collection, load and message size affect results.

The previous implementation copied the entire retained list on every message. The new path appends/trims the bounded queue and invalidates its cached snapshot; the list is copied only when a consumer reads a changed revision. A listener reading on every write still pays for those reads. Network response updates also reuse already sanitized, unchanged request/response details; configuration changes and caller-mutated stored records force sanitization again.

The console uses lazy slivers for result lists and debounces text search. Whole-list copy/export uses a compute isolate on native platforms; Web compute runs on its current event loop. Captured body and log-count limits continue to apply. Exports do not add persistent disk storage or background uploads.

Real-device profile-mode frame timings, heap allocation traces and long-duration memory curves remain unmeasured. Use Flutter DevTools on the target app to assess those under its actual request rate and payload distribution.
28 changes: 12 additions & 16 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# Publishing to pub.dev
# Publishing

Follow these steps to publish `easy_debug` to pub.dev.
Before publishing a new version:

## 1. Final Review
- **Repository URL**: Open `pubspec.yaml` and uncomment/fill in the `repository` line with your GitHub URL. This is critical for pub.dev verification score.
- **License**: Ensure `LICENSE` file has your correct name (already done).
1. Update the version in pubspec.yaml and the HAR creator version in lib/src/core/log_export.dart, and move the unreleased Changelog entries to that version.
2. Verify the repository metadata and supported SDK/platform claims.
3. Run the formatting, analysis and test commands from README.md.
4. Inspect the example on supported devices, including a profile build for frame/memory checks and a release build to confirm the default disabled behavior.
5. Run the packaging check:

## 2. Dry Run
Run this command to check for errors:
```bash
```sh
flutter pub publish --dry-run
```
Fix any warnings that appear.

## 3. Publish
```bash
Only publish after reviewing the archive and warnings:

```sh
flutter pub publish
```
1. Type `y` to confirm.
2. Click the link to zero-auth with your Google Account.
3. Success!

## 4. Verification
Visit [pub.dev](https://pub.dev/packages/easy_debug) to see your package.
Publishing is a separate release action. The CI workflow and a dry run do not publish the package.
Loading
Loading