mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 12:59:06 +01:00
review findThresholds logic in metricPlot
This commit is contained in:
parent
1a3cf7edd6
commit
8a10b69716
@ -84,19 +84,20 @@
|
|||||||
|
|
||||||
|
|
||||||
if (metricConfig?.aggregation == "sum") {
|
if (metricConfig?.aggregation == "sum") {
|
||||||
let divisor = 1
|
let divisor;
|
||||||
if (isShared == true) { // Shared
|
if (isShared == true) { // Shared
|
||||||
if (numaccs > 0) divisor = subClusterTopology.accelerators.length / numaccs;
|
if (numaccs > 0) divisor = subClusterTopology.accelerators.length / numaccs;
|
||||||
else if (numhwthreads > 0) divisor = subClusterTopology.node.length / numhwthreads;
|
else if (numhwthreads > 0) divisor = subClusterTopology.core.length / numhwthreads;
|
||||||
}
|
}
|
||||||
else if (scope == 'socket') divisor = subClusterTopology.socket.length;
|
else if (scope == 'node') divisor = 1; // Use as configured for nodes
|
||||||
else if (scope == "core") divisor = subClusterTopology.core.length;
|
else if (scope == 'socket') divisor = subClusterTopology.socket.length;
|
||||||
else if (scope == "accelerator")
|
else if (scope == "memoryDomain") divisor = subClusterTopology.memoryDomain.length;
|
||||||
divisor = subClusterTopology.accelerators.length;
|
else if (scope == "core") divisor = subClusterTopology.core.length;
|
||||||
else if (scope == "hwthread") divisor = subClusterTopology.node.length;
|
else if (scope == "hwthread") divisor = subClusterTopology.core.length; // alt. name for core
|
||||||
|
else if (scope == "accelerator") divisor = subClusterTopology.accelerators.length;
|
||||||
else {
|
else {
|
||||||
// console.log('TODO: how to calc thresholds for ', scope)
|
console.log('Unknown scope, return default thresholds ', scope)
|
||||||
return null;
|
divisor = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user