Batch analyses

BatchAnalysis passes all analysis units and the configured n_workers value to one backend invocation. The concrete analysis controls how it uses that worker budget. The result type and number of returned values are determined by the concrete analysis.

class ASOkai.Analysis.BatchAnalysis[source]

Bases: Analysis

Pass the whole collection of units to one backend invocation.

final run(units, *, n_workers=1)[source]

Pass the collected units and worker count to the backend.

Parameters:
  • units (Iterable[Any])

  • n_workers (int)

Return type:

list[Any]

abstractmethod analyze_batch(units, *, n_workers)[source]

Return results using the supplied worker budget as needed.

Parameters:
  • units (list[Any])

  • n_workers (int)

Return type:

Iterable[Any]