Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(console): fix gpu monitor chart #2208

Merged
merged 1 commit into from
Dec 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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