@coherent.js/core 1.0.0-beta.3 → 1.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -106,6 +106,7 @@ function createPerformanceMonitor(options = {}) {
106
106
  },
107
107
  alerts: {
108
108
  enabled: true,
109
+ debounceMs: 5e3,
109
110
  rules: []
110
111
  },
111
112
  resources: {
@@ -267,7 +268,7 @@ function createPerformanceMonitor(options = {}) {
267
268
  const alertKey = `${rule.metric}-${rule.condition}-${rule.threshold}`;
268
269
  const lastTriggered = alertState.triggered.get(alertKey);
269
270
  const now = Date.now();
270
- if (!lastTriggered || now - lastTriggered > 5e3) {
271
+ if (!lastTriggered || now - lastTriggered > opts.alerts.debounceMs) {
271
272
  alertState.triggered.set(alertKey, now);
272
273
  alertState.history.push({
273
274
  rule,