MCPcopy Create free account
hub / github.com/code-pushup/cli / validateFlushThreshold

Function validateFlushThreshold

packages/utils/src/lib/performance-observer.ts:67–77  ·  view source on GitHub ↗
(
  flushThreshold: number,
  maxQueueSize: number,
)

Source from the content-addressed store, hash-verified

65 * @throws {Error} If flushThreshold is not positive or exceeds maxQueueSize
66 */
67export function validateFlushThreshold(
68 flushThreshold: number,
69 maxQueueSize: number,
70): void {
71 if (flushThreshold <= 0) {
72 throw new Error('flushThreshold must be > 0');
73 }
74 if (flushThreshold > maxQueueSize) {
75 throw new Error('flushThreshold must be <= maxQueueSize');
76 }
77}
78
79/**
80 * Configuration options for the PerformanceObserverSink.

Callers 2

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected