feat(health): additive script-scheduler stats on ISiteHealthCollector + SiteHealthReport (S2/UA5)
This commit is contained in:
@@ -38,6 +38,25 @@ public class SiteHealthCollectorTests
|
||||
Assert.Equal(2, report.AlarmEvaluationErrorCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CollectReport_CarriesScriptSchedulerStats()
|
||||
{
|
||||
_collector.SetScriptSchedulerStats(queueDepth: 7, busyThreads: 3, oldestBusyAgeSeconds: 42.5);
|
||||
var report = _collector.CollectReport("site-1");
|
||||
Assert.Equal(7, report.ScriptQueueDepth);
|
||||
Assert.Equal(3, report.ScriptBusyThreads);
|
||||
Assert.Equal(42.5, report.ScriptOldestBusyAgeSeconds);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CollectReport_ScriptSchedulerStats_DefaultToZeroAndNull()
|
||||
{
|
||||
var report = _collector.CollectReport("site-1");
|
||||
Assert.Equal(0, report.ScriptQueueDepth);
|
||||
Assert.Equal(0, report.ScriptBusyThreads);
|
||||
Assert.Null(report.ScriptOldestBusyAgeSeconds);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IncrementDeadLetter_AccumulatesBetweenReports()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user