This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user