diff options
Diffstat (limited to 'internal/metrics/dashboard.html')
| -rw-r--r-- | internal/metrics/dashboard.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/metrics/dashboard.html b/internal/metrics/dashboard.html index 363f1f7..63b42ed 100644 --- a/internal/metrics/dashboard.html +++ b/internal/metrics/dashboard.html | |||
| @@ -295,6 +295,12 @@ | |||
| 295 | document.getElementById('event_deletions').textContent = | 295 | document.getElementById('event_deletions').textContent = |
| 296 | sumMetric(metrics, `${prefix}_relay_event_deletions_total`); | 296 | sumMetric(metrics, `${prefix}_relay_event_deletions_total`); |
| 297 | 297 | ||
| 298 | const durationSum = sumMetric(metrics, `${prefix}_relay_request_duration_seconds_sum`); | ||
| 299 | const durationCount = sumMetric(metrics, `${prefix}_relay_request_duration_seconds_count`); | ||
| 300 | const avgLatencyMs = durationCount > 0 ? (durationSum / durationCount * 1000) : 0; | ||
| 301 | document.getElementById('avg_latency').innerHTML = | ||
| 302 | `${avgLatencyMs.toFixed(1)}<span class="metric-unit">ms</span>`; | ||
| 303 | |||
| 298 | const processStart = sumMetric(metrics, 'process_start_time_seconds'); | 304 | const processStart = sumMetric(metrics, 'process_start_time_seconds'); |
| 299 | if (processStart > 0) { | 305 | if (processStart > 0) { |
| 300 | if (!processStartTime) processStartTime = processStart; | 306 | if (!processStartTime) processStartTime = processStart; |
