From 203606905116d8bb973afe643b91544ad3df99ab Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 9 Feb 2024 16:49:56 +0100 Subject: [PATCH 1/4] Remove unresponsive histogram selections --- web/frontend/src/HistogramSelection.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/frontend/src/HistogramSelection.svelte b/web/frontend/src/HistogramSelection.svelte index 00f558a..9856742 100644 --- a/web/frontend/src/HistogramSelection.svelte +++ b/web/frontend/src/HistogramSelection.svelte @@ -7,7 +7,7 @@ export let metricsInHistograms export let isOpen - let availableMetrics = ['cpu_load', 'flops_any', 'mem_used', 'mem_bw', 'net_bw', 'file_bw'] + let availableMetrics = ['cpu_load', 'flops_any', 'mem_used', 'mem_bw'] // 'net_bw', 'file_bw' let pendingMetrics = [...metricsInHistograms] // Copy const client = getContextClient() From c897c8e56be3a89f1aa5dfe5f4a1b0533c612e58 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 9 Feb 2024 17:06:46 +0100 Subject: [PATCH 2/4] Add missing rounding func --- web/frontend/src/JobFootprint.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/frontend/src/JobFootprint.svelte b/web/frontend/src/JobFootprint.svelte index 04b03a3..daecb0b 100644 --- a/web/frontend/src/JobFootprint.svelte +++ b/web/frontend/src/JobFootprint.svelte @@ -44,7 +44,7 @@ const avgs = jm.metric.series.map(jms => jms.statistics.avg) mv = round(mean(avgs), 2) } else { - mv = jm.metric.series[0].statistics.avg + mv = round(jm.metric.series[0].statistics.avg, 2) } } From 71386f8466937dbf49cab7ffbc5edc7060a416f6 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 9 Feb 2024 17:09:08 +0100 Subject: [PATCH 3/4] Fix footprint logic for metrics equal zero --- web/frontend/src/JobFootprint.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/frontend/src/JobFootprint.svelte b/web/frontend/src/JobFootprint.svelte index daecb0b..e4839af 100644 --- a/web/frontend/src/JobFootprint.svelte +++ b/web/frontend/src/JobFootprint.svelte @@ -111,12 +111,12 @@ else return (mean <= thresholds.peak && mean > thresholds.normal) case 'alert': if (metric === 'mem_used') return (mean <= thresholds.alert && mean > thresholds.caution) - else return (mean <= thresholds.alert && mean > 0) + else return (mean <= thresholds.alert && mean >= 0) case 'caution': if (metric === 'mem_used') return (mean <= thresholds.caution && mean > thresholds.normal) else return (mean <= thresholds.caution && mean > thresholds.alert) case 'normal': - if (metric === 'mem_used') return (mean <= thresholds.normal && mean > 0) + if (metric === 'mem_used') return (mean <= thresholds.normal && mean >= 0) else return (mean <= thresholds.normal && mean > thresholds.caution) default: return false From 2d8cf02296ec42c4466beef1c54c97c44779ec1a Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 9 Feb 2024 17:19:58 +0100 Subject: [PATCH 4/4] Add nullsafe to footprint mean gather --- web/frontend/src/JobFootprint.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/frontend/src/JobFootprint.svelte b/web/frontend/src/JobFootprint.svelte index e4839af..e860e04 100644 --- a/web/frontend/src/JobFootprint.svelte +++ b/web/frontend/src/JobFootprint.svelte @@ -43,8 +43,10 @@ } else if (jm?.metric?.series?.length > 1) { const avgs = jm.metric.series.map(jms => jms.statistics.avg) mv = round(mean(avgs), 2) - } else { + } else if (jm?.metric?.series) { mv = round(jm.metric.series[0].statistics.avg, 2) + } else { + mv = 0.0 } }