Skip to content

Commit

Permalink
fix(console): fix gpu monitor chart (#2208)
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-hnny authored Dec 12, 2022
1 parent dce0917 commit c8d4613
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions web/console/src/modules/cluster/models/MonitorPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,27 @@ const gpuMemFields = table => [
{
expr: `mean(k8s_${table}_gpu_used)`,
alias: t('GPU使用量'),
unit: t('卡')
unit: t('卡'),
valueTransform: value => {
if (value) return value / 100;

return value;
}
},
{
expr: `mean(k8s_${table}_rate_gpu_used_node)`,
alias: t('GPU使用量(占节点)'),
unit: t('卡')
alias: t('GPU使用率(占节点)'),
unit: '%'
},
{
expr: `mean(k8s_${table}_rate_gpu_used_request)`,
alias: t('GPU使用量(占Request)'),
unit: t('卡')
alias: t('GPU使用率(占Request)'),
unit: '%',
valueTransform: value => {
if (value) return value * 100;

return value;
}
},
{
expr: `mean(k8s_${table}_gpu_memory_used)`,
Expand Down

0 comments on commit c8d4613

Please sign in to comment.