EXPERIMENTAL: new stats logic
Release rolling / release (push) Successful in 8m29s

This commit is contained in:
Raven Scott
2026-08-04 21:47:32 -04:00
parent ab6cea96c7
commit a9e2b54c70
13 changed files with 931 additions and 154 deletions
+10 -6
View File
@@ -3,13 +3,17 @@
*/
export const CONFIG = {
// Stats collection
// Stats collection (server/services/stats.js)
// Prefer one-shot polls over perpetual stream:true attachments — each live
// stream forces dockerd to sample that container ~1Hz and is a host CPU hog.
// Override at runtime: PEARDOCK_STATS_INTERVAL_MS, PEARDOCK_STATS_CONCURRENCY.
STATS: {
INTERVAL_MS: 2000, // Base stats collection interval
ACTIVE_INTERVAL_MS: 1000, // Interval for active containers
IDLE_INTERVAL_MS: 5000, // Interval for idle containers
CACHE_TTL_MS: 1000, // Stats cache TTL
SMOOTHING_FACTOR: 0.2, // Stats smoothing factor
INTERVAL_MS: 2000, // Min gap between allStats broadcasts
ACTIVE_INTERVAL_MS: 2000, // Collection tick while peers are connected
IDLE_INTERVAL_MS: 5000, // Reserved (peer-idle uses full pause)
CACHE_TTL_MS: 1000, // Per-container broadcast cache TTL
CONCURRENCY: 6, // Max parallel one-shot stats to dockerd
SMOOTHING_FACTOR: 0.2, // Client-side smoothing (if used)
},
// UI updates