From eb7f92282d560ed68c5b3584fecdedf1322552e9 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 17 Nov 2023 11:34:17 +0100 Subject: [PATCH] add log, force node scope --- web/frontend/src/JobFootprint.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/frontend/src/JobFootprint.svelte b/web/frontend/src/JobFootprint.svelte index df34b36..fed3649 100644 --- a/web/frontend/src/JobFootprint.svelte +++ b/web/frontend/src/JobFootprint.svelte @@ -33,6 +33,8 @@ const footprintMetrics = ['mem_used', 'mem_bw','flops_any', 'cpu_load'] // 'acc_utilization' / missing: energy , move to central config before deployment + console.log('JMs', jobMetrics.filter((jm) => footprintMetrics.includes(jm.name))) + const footprintMetricConfigs = footprintMetrics.map((fm) => { return getContext('metrics')(job.cluster, fm) }).filter( Boolean ) // Filter only "truthy" vals, see: https://stackoverflow.com/questions/28607451/removing-undefined-values-from-array @@ -46,12 +48,12 @@ // console.log("FMTs", footprintMetricThresholds) const meanVals = footprintMetrics.map((fm) => { - let jm = jobMetrics.find((jm) => jm.name === fm) + let jm = jobMetrics.find((jm) => jm.name === fm && jm.scope === 'node') // Only Node Scope let mv = null if (jm?.metric?.statisticsSeries) { - mv = {name: jm.name, scope: jm.scope, avg: round(mean(jm.metric.statisticsSeries.mean), 2)} + mv = {name: jm.name, avg: round(mean(jm.metric.statisticsSeries.mean), 2)} } else if (jm?.metric?.series[0]) { - mv = {name: jm.name, scope: jm.scope, avg: jm.metric.series[0].statistics.avg} + mv = {name: jm.name, avg: jm.metric.series[0].statistics.avg} } if (jm?.metric?.unit?.base) {