feat: add resource timing metrics for API calls and image loads#485
Open
DeePrincipal-dev-lang wants to merge 3 commits into
Open
feat: add resource timing metrics for API calls and image loads#485DeePrincipal-dev-lang wants to merge 3 commits into
DeePrincipal-dev-lang wants to merge 3 commits into
Conversation
- Add performanceTiming.ts: rolling window tracker with p50/p95/avg/min/max/errorRate - Add API_TIMING, IMAGE_TIMING, RESOURCE_TIMING_SUMMARY events and ResourceTimingMetric enum - Instrument axios interceptors to auto-time every API request Closes rinafcode#31 rinafcode#32 rinafcode#33 rinafcode#34
|
@DeePrincipal-dev-lang 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! 🚀 |
- useRequestTimeout: tick-based countdown hook (100ms interval), exposes progress (0-1), remaining ms, isTimedOut, start, reset - RequestTimeoutOverlay: progress bar + remaining seconds + Retry button, auto-starts when loading=true, shows retry on timeout - Exported from hooks/index.ts and components/mobile/index.ts Closes rinafcode#11 rinafcode#20
Contributor
|
Kindly resolve conflict and fix workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Resource Timing Metrics
Implements resource timing tracking to identify performance bottlenecks in API
calls and image loading.
Changes:
success/failure, and HTTP status for each resource. Maintains a rolling window
of 200 entries and computes aggregated metrics (p50, p95, avg, min, max, error
rate) per resource type (api | image). Exposes startTiming, timeAsync,
getMetrics, getEntries, subscribe, and clearEntries.
RESOURCE_TIMING_SUMMARY to AnalyticsEvent enum, and a new ResourceTimingMetric
enum for structured metric names.
request interceptor and records the result (success + status code) in the
response interceptor, so every API call is timed automatically with zero
changes at call sites.
Remaining tasks (not yet pushed):
Closes #336