CoreWebVitalsCollector class
Aggregates and calculates Core Web Vitals percentiles according to Google standards.
Constructors
- CoreWebVitalsCollector({int maxSamplesPerMetric = 10000})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxSamplesPerMetric → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Clears all stored observations.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
record(
{required WebVitalName name, required double value, required String path, DateTime? timestamp, String? connectionType}) → void - Records a new performance observation. Automatically strips any URL query parameters.
-
summarize(
) → Map< WebVitalName, MetricSummary> - Calculates statistical summaries and CrUX ratings across all collected metrics.
-
toJsonReport(
) → String - Generates a standardized JSON report suitable for CI/CD checks and monitoring dashboards.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
rate(
WebVitalName name, double p75Value) → MetricRating - Evaluates Google Chrome CrUX rating thresholds.