PerformanceInfo constructor
PerformanceInfo({})
Describes the performance of an action.
Note: Negative durations are invalid and will result in ArgumentErrors.
Implementation
factory PerformanceInfo({
Duration? networkTime,
Duration? serverTime,
Duration? transferTime,
Duration? domProcessingTime,
Duration? domCompletionTime,
Duration? onloadTime,
}) {
assertDurationNotNegative(value: networkTime, name: 'networkTime');
assertDurationNotNegative(value: serverTime, name: 'serverTime');
assertDurationNotNegative(value: transferTime, name: 'transferTime');
assertDurationNotNegative(
value: domProcessingTime,
name: 'domProcessingTime',
);
assertDurationNotNegative(
value: domCompletionTime,
name: 'domCompletionTime',
);
assertDurationNotNegative(value: onloadTime, name: 'onloadTime');
return PerformanceInfo._(
networkTime: networkTime,
serverTime: serverTime,
transferTime: transferTime,
domProcessingTime: domProcessingTime,
domCompletionTime: domCompletionTime,
onloadTime: onloadTime,
);
}