using System.Collections.Generic; namespace StellaOps.Provcache; /// /// Result of a batch cache lookup. /// public sealed record ProvcacheBatchLookupResult { /// /// Entries found in cache, keyed by VeriKey. /// public required IReadOnlyDictionary Hits { get; init; } /// /// VeriKeys that were not found in cache. /// public required IReadOnlyList Misses { get; init; } /// /// Time taken for the lookup in milliseconds. /// public double ElapsedMs { get; init; } /// /// Cache hit rate for this batch (0.0 - 1.0). /// public double HitRate => Hits.Count == 0 && Misses.Count == 0 ? 0.0 : (double)Hits.Count / (Hits.Count + Misses.Count); }