feat(analytics): add batch metric and trend updates with size limit#545
Conversation
|
@martinshub-tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
92e56b9 to
0580bd4
Compare
|
Hi @martinshub-tech 👋 thanks for picking up issue #512 — the Heads-up before this can land: this PR currently won't merge and several CI checks are red, so a rebase + local repro/fix is required before re-opening. Merge state
Most likely conflict points (in priority order, based on line churn + overlap with the recently-merged main)These three files in
Start the conflict resolution work in fractional (highest line churn both sides, most likely textual conflict), then analytics, then Failing CI checks (workflow run 28056769773)
So at minimum: Rustfmt (likely trivial Suggested rebase + repro loopgit fetch origin main
git checkout batch-updates
git rebase origin/main
# resolve conflicts in fractional -> analytics -> lib/src/lib.rs
git push --force-with-lease origin batch-updatesThen locally: cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test -p propchain-fractional
cargo test -p propchain-analytics
cargo build --target wasm32-unknown-unknown --release -p propchain-analytics
cargo deny check # matches the Security Audit CI jobOnce the rebase + the five failing checks are green, push and re-request review. If you'd like, opened as a recovery/triage PR I can carry the rebase forward and open a PR on your behalf — just say the word. Reference: issue #512. |
|
@martinshub-tech resolve conflicts. |
2fa1053 to
dc52274
Compare
Review: feat(analytics): add batch metric and trend updates with size limitThanks for the batch surface expansion - public API looks intentional ( A few things worth addressing:
Net: cap is a good guardrail; tighten the storage story before this lands on main. |
Merge conflict with
|
|
Batch metric + trend updates with an explicit size cap is a sensible throughput improvement, and the public surface stays compatible. Good cross-cutting coverage across analytics/insurance/tax-compliance. Merging. ✅ |
this pr closes #512
Pull Request: Batch Updates for Analytics Contract
Summary
Implemented batch operations for the
AnalyticsDashboardcontract to improve throughput and reduce gas consumption:batch_update_metricsandbatch_add_trendsfunctions with a configurableMAX_BATCH_SIZE(20).BatchMetricsUpdatedevent containing the number of items processed.BatchSizeExceedederror handling.Tests
BatchSizeExceeded.Impact
Checklist
cargo testpasses).Ready for review.