-
Notifications
You must be signed in to change notification settings - Fork 142
fix(gas): dont include error iters in metric #3796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🚅 Deployed to the rivet-pr-3796 environment in rivet-frontend
|
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
ce9397d to
a6a1a86
Compare
PR Review: fix(gas): dont include error iters in metricSummaryThis PR fixes a metric recording issue where loop iteration durations were being recorded even when the iteration callback failed with an error. The fix ensures that the Changes AnalysisWhat Changed:
✅ Positives
🔍 Code Quality ObservationsGood:
Minor Observations:
🐛 Potential IssuesNone identified - The logic appears sound. 🔒 Security ConsiderationsNo security concerns - this is purely a metrics recording change. ⚡ Performance Considerations
🧪 Test CoverageRecommendation: Consider adding a test case that:
Example test scenario: // Loop that fails on iteration 2, succeeds on 1 and 3
// Verify metric only has 2 recordings (for iterations 1 and 3)However, this may require exposing metric values in tests, which might not be straightforward. 📝 Suggestions
✅ VerdictLGTM with minor suggestions. The fix is correct and improves metric accuracy. The suggested comment update would improve code clarity but is not blocking. Score: 9/10 - Solid fix with good implementation, minor documentation improvement opportunity. |
Pull Request ReviewSummaryThis PR fixes a bug where the Changes
Code Quality ✅Strengths:
Variable naming consistency:
Potential Issues 🔍1. Initial iteration always skips metric (minor)
This appears intentional (to avoid recording replayed iterations), but it means iteration 0's duration is never recorded even on first run. Consider if this is the desired behavior. 2. Error iterations still affect timing (edge case)
This is likely acceptable since we don't want to skew metrics with error cases, but worth documenting. Performance ✅No performance concerns. The change:
Security ✅No security concerns identified. Test Coverage
|
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/virtual-websocket
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |

No description provided.