Lei.BatchAnalyzer (LowEndInsight v0.13.1)

Copy Markdown View Source

Batch SBOM analysis engine.

Analyzes lists of dependencies with parallel cache lookups, targeting <500ms for 50 dependencies when mostly cached.

Summary

Functions

Analyze a batch of dependencies.

{hits, misses} for a batch, before any work: what admission prices it at. The same lookup analyze/2 partitions on.

Functions

analyze(dependencies, opts \\ [])

Analyze a batch of dependencies.

Each dependency should be a map with "ecosystem", "package", and "version" keys. Returns a summary with cached results, and for each miss either a queued job or the reason there is none.

Options:

  • :schedule - a function taking the dependency and returning {:ok, job_id} or {:error, reason}. This library has no queue; the caller supplies one (ADR-004). Without it a miss is reported as "uncached": it is not analysed, and no job id is invented for it.
  • :cache_mode - "stale" (default) or "fresh".

cache_split(dependencies, opts \\ [])

{hits, misses} for a batch, before any work: what admission prices it at. The same lookup analyze/2 partitions on.