@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.js CHANGED
@@ -29,6 +29,7 @@ function createPerformanceMonitor(options = {}) {
29
29
  },
30
30
  alerts: {
31
31
  enabled: true,
32
+ debounceMs: 5e3,
32
33
  rules: []
33
34
  },
34
35
  resources: {
@@ -190,7 +191,7 @@ function createPerformanceMonitor(options = {}) {
190
191
  const alertKey = `${rule.metric}-${rule.condition}-${rule.threshold}`;
191
192
  const lastTriggered = alertState.triggered.get(alertKey);
192
193
  const now = Date.now();
193
- if (!lastTriggered || now - lastTriggered > 5e3) {
194
+ if (!lastTriggered || now - lastTriggered > opts.alerts.debounceMs) {
194
195
  alertState.triggered.set(alertKey, now);
195
196
  alertState.history.push({
196
197
  rule,