Skip to content

Commit

Permalink
review findThresholds logic in metricPlot
Browse files Browse the repository at this point in the history
  • Loading branch information
spacehamster87 committed Dec 2, 2024
1 parent 1a3cf7e commit 8a10b69
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions web/frontend/src/generic/plots/MetricPlot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,20 @@
if (metricConfig?.aggregation == "sum") {
let divisor = 1
let divisor;
if (isShared == true) { // Shared
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 == "core") divisor = subClusterTopology.core.length;
else if (scope == "accelerator")
divisor = subClusterTopology.accelerators.length;
else if (scope == "hwthread") divisor = subClusterTopology.node.length;
else if (scope == 'node') divisor = 1; // Use as configured for nodes
else if (scope == 'socket') divisor = subClusterTopology.socket.length;
else if (scope == "memoryDomain") divisor = subClusterTopology.memoryDomain.length;
else if (scope == "core") divisor = subClusterTopology.core.length;
else if (scope == "hwthread") divisor = subClusterTopology.core.length; // alt. name for core
else if (scope == "accelerator") divisor = subClusterTopology.accelerators.length;
else {
// console.log('TODO: how to calc thresholds for ', scope)
return null;
console.log('Unknown scope, return default thresholds ', scope)
divisor = 1;
}
return {
Expand Down

0 comments on commit 8a10b69

Please sign in to comment.