// // Copyright (c) StellaOps. Licensed under AGPL-3.0-or-later. // using System.Collections.Immutable; namespace StellaOps.Facet; /// /// Result of facet extraction from an image. /// public sealed record FacetExtractionResult { /// /// Gets the extracted facet entries. /// public required ImmutableArray Facets { get; init; } /// /// Gets files that didn't match any facet selector. /// public required ImmutableArray UnmatchedFiles { get; init; } /// /// Gets files that were skipped (too large, unreadable, etc.). /// public required ImmutableArray SkippedFiles { get; init; } /// /// Gets the combined Merkle root of all facets. /// public required string CombinedMerkleRoot { get; init; } /// /// Gets extraction statistics. /// public required FacetExtractionStats Stats { get; init; } /// /// Gets extraction warnings (non-fatal issues). /// public ImmutableArray Warnings { get; init; } = []; } /// /// A file that was skipped during extraction. /// /// The file path. /// Why the file was skipped. public sealed record SkippedFile(string Path, string Reason); /// /// Statistics from facet extraction. /// public sealed record FacetExtractionStats { /// /// Gets the total files processed. /// public required int TotalFilesProcessed { get; init; } /// /// Gets the total bytes across all files. /// public required long TotalBytes { get; init; } /// /// Gets the number of files matched to facets. /// public required int FilesMatched { get; init; } /// /// Gets the number of files not matching any facet. /// public required int FilesUnmatched { get; init; } /// /// Gets the number of files skipped. /// public required int FilesSkipped { get; init; } /// /// Gets the extraction duration. /// public required TimeSpan Duration { get; init; } }