better history for metrics

This commit is contained in:
KingKDot
2026-05-01 19:13:11 -05:00
parent 5380282726
commit 73c860c530
6 changed files with 54 additions and 9 deletions
+2 -2
View File
@@ -178,13 +178,13 @@ describe("MetricsCollector", () => {
});
test("history is capped at maxHistoryPoints", () => {
for (let i = 0; i < 100; i++) {
for (let i = 0; i < 4500; i++) {
const snap = metrics.getSnapshot();
metrics.recordHistoryEntry(snap);
}
const history = metrics.getHistory();
expect(history.length).toBeLessThanOrEqual(60);
expect(history.length).toBeLessThanOrEqual(4320);
});
test("getHistory returns a copy", () => {