mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
Fix roofline component not rendering in jobview if missing data
- Addresses issue #70
This commit is contained in:
parent
b0cd88bba1
commit
81e17771fd
@ -114,8 +114,8 @@
|
|||||||
cluster={clusters
|
cluster={clusters
|
||||||
.find(c => c.name == $initq.data.job.cluster).subClusters
|
.find(c => c.name == $initq.data.job.cluster).subClusters
|
||||||
.find(sc => sc.name == $initq.data.job.subCluster)}
|
.find(sc => sc.name == $initq.data.job.subCluster)}
|
||||||
flopsAny={$jobMetrics.data.jobMetrics.find(m => m.name == 'flops_any' && m.metric.scope == 'node').metric}
|
flopsAny={$jobMetrics.data.jobMetrics.find(m => m.name == 'flops_any' && m.metric.scope == 'node')}
|
||||||
memBw={$jobMetrics.data.jobMetrics.find(m => m.name == 'mem_bw' && m.metric.scope == 'node').metric} />
|
memBw={$jobMetrics.data.jobMetrics.find(m => m.name == 'mem_bw' && m.metric.scope == 'node')} />
|
||||||
</Col>
|
</Col>
|
||||||
{:else}
|
{:else}
|
||||||
<Col></Col>
|
<Col></Col>
|
||||||
|
@ -243,6 +243,8 @@
|
|||||||
|
|
||||||
/* c will contain values from 0 to 1 representing the time */
|
/* c will contain values from 0 to 1 representing the time */
|
||||||
const x = [], y = [], c = []
|
const x = [], y = [], c = []
|
||||||
|
|
||||||
|
if (flopsAny && memBw) {
|
||||||
for (let i = 0; i < nodes; i++) {
|
for (let i = 0; i < nodes; i++) {
|
||||||
const flopsData = flopsAny.series[i].data
|
const flopsData = flopsAny.series[i].data
|
||||||
const memBwData = memBw.series[i].data
|
const memBwData = memBw.series[i].data
|
||||||
@ -257,6 +259,9 @@
|
|||||||
c.push(colorDots ? j / timesteps : 0)
|
c.push(colorDots ? j / timesteps : 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
console.warn("transformData: metrics for 'mem_bw' and/or 'flops_any' missing!")
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
x, y, c,
|
x, y, c,
|
||||||
@ -272,8 +277,10 @@
|
|||||||
for (let node of nodes) {
|
for (let node of nodes) {
|
||||||
let flopsAny = node.metrics.find(m => m.name == 'flops_any' && m.metric.scope == 'node')?.metric
|
let flopsAny = node.metrics.find(m => m.name == 'flops_any' && m.metric.scope == 'node')?.metric
|
||||||
let memBw = node.metrics.find(m => m.name == 'mem_bw' && m.metric.scope == 'node')?.metric
|
let memBw = node.metrics.find(m => m.name == 'mem_bw' && m.metric.scope == 'node')?.metric
|
||||||
if (!flopsAny || !memBw)
|
if (!flopsAny || !memBw) {
|
||||||
|
console.warn("transformPerNodeData: metrics for 'mem_bw' and/or 'flops_any' missing!")
|
||||||
continue
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
let flopsData = flopsAny.series[0].data, memBwData = memBw.series[0].data
|
let flopsData = flopsAny.series[0].data, memBwData = memBw.series[0].data
|
||||||
const f = flopsData[flopsData.length - 1], m = memBwData[flopsData.length - 1]
|
const f = flopsData[flopsData.length - 1], m = memBwData[flopsData.length - 1]
|
||||||
@ -311,7 +318,7 @@
|
|||||||
|
|
||||||
let ctx, canvasElement, prevWidth = width, prevHeight = height
|
let ctx, canvasElement, prevWidth = width, prevHeight = height
|
||||||
data = data != null ? data : (flopsAny && memBw
|
data = data != null ? data : (flopsAny && memBw
|
||||||
? transformData(flopsAny, memBw, colorDots)
|
? transformData(flopsAny.metric, memBw.metric, colorDots)
|
||||||
: {
|
: {
|
||||||
tiles: tiles,
|
tiles: tiles,
|
||||||
xLabel: 'Intensity [FLOPS/byte]',
|
xLabel: 'Intensity [FLOPS/byte]',
|
||||||
|
Loading…
Reference in New Issue
Block a user