batch-cluster
    Preparing search index...

    Interface FindFlushMillisOptions<T>

    Options for findStreamFlushMillis.

    interface FindFlushMillisOptions<T = unknown> {
        coarseTasks?: number;
        confirmationTasks?: number;
        confirmationTrials?: number;
        exitCommand?: string;
        fail: string | RegExp;
        hi?: number;
        lo?: number;
        logger?: () => Logger;
        maxProcs?: number;
        pass: string | RegExp;
        processFactory: () => ChildProcess | Promise<ChildProcess>;
        taskFactory: (taskIndex: number) => Task<T>;
        validationRadius?: number;
        validationTasks?: number;
        validationTrials?: number;
        versionCommand: string;
    }

    Type Parameters

    • T = unknown

      The resolved type of the tasks produced by taskFactory. The search ignores task results (only noTaskData events matter), so this can be anything.

    Index

    Properties

    coarseTasks?: number

    Tasks per binary-search step in the coarse phase.

    10
    
    confirmationTasks?: number

    Tasks per trial in the confirmation phase.

    50
    
    confirmationTrials?: number

    Number of trials at the found minimum during confirmation.

    20
    
    exitCommand?: string

    Command to gracefully shut down a child process.

    fail: string | RegExp

    Pattern indicating a task failed.

    hi?: number

    Upper bound of the search range in milliseconds.

    500
    
    lo?: number

    Lower bound of the search range in milliseconds.

    0
    
    logger?: () => Logger

    Logger for progress messages. Progress goes to info, failures to warn. When not provided, all output is silently discarded.

    maxProcs?: number

    Maximum concurrent child processes during trials.

    4
    
    pass: string | RegExp

    Pattern indicating a task passed.

    processFactory: () => ChildProcess | Promise<ChildProcess>

    Factory that spawns child processes.

    taskFactory: (taskIndex: number) => Task<T>

    Creates a fresh Task for each trial iteration. Called with a 0-based index. Callers should vary commands across calls to exercise different code paths (clean successes, stderr-emitting commands, writes, etc.).

    validationRadius?: number

    How many ms above/below the coarse result to validate.

    3
    
    validationTasks?: number

    Tasks per trial in the validation phase.

    50
    
    validationTrials?: number

    Number of trials at each candidate value during validation.

    5
    
    versionCommand: string

    Low-overhead startup command to verify the child process started.