mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-10 00:47:26 +01:00
Fix polar and roofline sizes in jobView
- add option for adaptable roofline sizing
This commit is contained in:
parent
c4a9fcc1ca
commit
827a85412e
@ -131,7 +131,6 @@
|
||||
lazyFetchMoreMetrics();
|
||||
|
||||
let plots = {},
|
||||
roofWidth,
|
||||
jobTags,
|
||||
statsTable;
|
||||
$: document.title = $initq.fetching
|
||||
@ -253,24 +252,20 @@
|
||||
/>
|
||||
</Col>
|
||||
<Col>
|
||||
<div bind:clientWidth={roofWidth}>
|
||||
<Roofline
|
||||
width={roofWidth - 10}
|
||||
height={(roofWidth / 2) - 5}
|
||||
renderTime={true}
|
||||
cluster={clusters
|
||||
.find((c) => c.name == $initq.data.job.cluster)
|
||||
.subClusters.find(
|
||||
(sc) => sc.name == $initq.data.job.subCluster
|
||||
)}
|
||||
data={
|
||||
transformDataForRoofline (
|
||||
$jobMetrics.data.jobMetrics.find((m) => m.name == "flops_any" && m.scope == "node").metric,
|
||||
$jobMetrics.data.jobMetrics.find((m) => m.name == "mem_bw" && m.scope == "node").metric
|
||||
)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<Roofline
|
||||
renderTime={true}
|
||||
cluster={clusters
|
||||
.find((c) => c.name == $initq.data.job.cluster)
|
||||
.subClusters.find(
|
||||
(sc) => sc.name == $initq.data.job.subCluster
|
||||
)}
|
||||
data={
|
||||
transformDataForRoofline (
|
||||
$jobMetrics.data.jobMetrics.find((m) => m.name == "flops_any" && m.scope == "node").metric,
|
||||
$jobMetrics.data.jobMetrics.find((m) => m.name == "mem_bw" && m.scope == "node").metric
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Col>
|
||||
{:else}
|
||||
<Col />
|
||||
|
@ -427,6 +427,7 @@
|
||||
<div bind:clientWidth={plotWidths[i]}>
|
||||
{#key $mainQuery.data.nodeMetrics}
|
||||
<Roofline
|
||||
allowSizeChange={true}
|
||||
width={plotWidths[i] - 10}
|
||||
height={300}
|
||||
cluster={subCluster}
|
||||
|
@ -25,6 +25,7 @@
|
||||
export let metrics
|
||||
export let cluster
|
||||
export let jobMetrics
|
||||
export let height = 350
|
||||
|
||||
const metricConfig = getContext('metrics')
|
||||
|
||||
@ -94,7 +95,7 @@
|
||||
</script>
|
||||
|
||||
<div class="chart-container">
|
||||
<Radar {data} {options}/>
|
||||
<Radar {data} {options} {height}/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
export let data = null
|
||||
export let renderTime = false
|
||||
export let maxY = null // Optional
|
||||
export let allowSizeChange = false
|
||||
export let cluster = null
|
||||
export let width = 500
|
||||
export let height = 300
|
||||
export let width = 600
|
||||
export let height = 350
|
||||
|
||||
let plotWrapper = null
|
||||
let uplot = null
|
||||
@ -135,7 +135,7 @@
|
||||
log: 10, // log exp
|
||||
},
|
||||
y: {
|
||||
range: [1.0, nearestThousand(cluster.flopRateSimd.value || maxY)],
|
||||
range: [1.0, cluster?.flopRateSimd?.value ? nearestThousand(cluster.flopRateSimd.value) : 10000],
|
||||
distr: 3, // Render as log
|
||||
log: 10, // log exp
|
||||
},
|
||||
@ -238,7 +238,7 @@
|
||||
render(data)
|
||||
}, 200)
|
||||
}
|
||||
$: sizeChanged(width, height)
|
||||
$: if (allowSizeChange) sizeChanged(width, height)
|
||||
</script>
|
||||
|
||||
{#if data != null}
|
||||
|
Loading…
Reference in New Issue
Block a user