Metrics
Overview
Web Vitals Metrics Overview
Metric Calculation Methods
1. Largest Contentful Paint (LCP)
navigationStart
) to the rendering completion of the largest visible content element (such as images, text blocks).2. First Contentful Paint (FCP)
3. Interaction to Next Paint (INP)
4. Cumulative Layout Shift (CLS)
5. First Input Delay (FID)
Custom Performance Monitoring
1. Component-level Performance Measurement
customVital
API to monitor the performance of specific components or interactions, suitable for:Example: Measuring Component Rendering
Example: Directly Report Duration
2. Performance Timestamp Recording
addTiming
API to record key timestamps, suitable for:Example: Recording First Scroll
Example: Asynchronous Scenario
Considerations
1. Naming Conventions
login_form_render
).2. SPA Scenario Handling
3. Performance Impact Control
Common Issues
1. Abnormal Page Loading Time
2. Inaccurate Activity Status Determination
excludedActivityUrls
to exclude interference.