validate method

void validate()

Implementation

void validate() {
  if (maxEvents < 1 ||
      maxEvents > 200000 ||
      maxPayloadBytes < 256 ||
      maxPayloadBytes > 1024 * 1024 ||
      maxPayloadDepth < 1 ||
      maxPayloadDepth > 32 ||
      sampleEvery < Duration.zero ||
      lifecycleTimeout <= Duration.zero ||
      lifecycleTimeout > const Duration(minutes: 1) ||
      categories.length > 256 ||
      categories.any(
        (value) => value.trim().isEmpty || value.trim().length > 128,
      )) {
    throw ArgumentError('Performance plugin options are invalid.');
  }
}