perf(ui): shared KPI cache, live-cache-backed alarm summary, coalesced debug renders
This commit is contained in:
@@ -71,6 +71,13 @@ public class NotificationKpisPageTests : BunitContext
|
||||
|
||||
Services.AddSingleton(_comms);
|
||||
|
||||
// arch-review WP2.4 — the page reads the process-level memoized KPI cache
|
||||
// rather than querying CommunicationService per circuit. The real cache is
|
||||
// registered so the scripted-actor seam above still answers the queries.
|
||||
Services.AddSingleton<IKpiSnapshotCache>(sp => new KpiSnapshotCache(
|
||||
sp.GetRequiredService<CommunicationService>(),
|
||||
sp.GetRequiredService<IServiceScopeFactory>()));
|
||||
|
||||
var siteRepo = Substitute.For<ISiteRepository>();
|
||||
siteRepo.GetAllSitesAsync(Arg.Any<CancellationToken>())
|
||||
.Returns(Task.FromResult<IReadOnlyList<Site>>(new List<Site>
|
||||
|
||||
Reference in New Issue
Block a user