change: small gpu proc changes (#1325)

* other: use consistent casing with Mem/Mem% in processes for GPU cols

* other: remove mem check for GPU enable check
This commit is contained in:
Clement Tsang 2023-11-20 07:30:57 +00:00 committed by GitHub
parent e4a6e751ec
commit 10a37c263a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -433,7 +433,7 @@ pub fn build_app(
use_cpu: used_widget_set.get(&Cpu).is_some() || used_widget_set.get(&BasicCpu).is_some(),
use_mem,
use_cache: use_mem && get_enable_cache_memory(matches, config),
use_gpu: use_mem && get_enable_gpu(matches, config),
use_gpu: get_enable_gpu(matches, config),
use_net: used_widget_set.get(&Net).is_some() || used_widget_set.get(&BasicNet).is_some(),
use_proc: used_widget_set.get(&Proc).is_some(),
use_disk: used_widget_set.get(&Disk).is_some(),

View File

@ -91,9 +91,9 @@ impl ColumnHeader for ProcColumn {
ProcColumn::User => "User",
ProcColumn::Time => "Time",
#[cfg(feature = "gpu")]
ProcColumn::GpuMem => "GMEM",
ProcColumn::GpuMem => "GMem",
#[cfg(feature = "gpu")]
ProcColumn::GpuMemPercent => "GMEM%",
ProcColumn::GpuMemPercent => "GMem%",
#[cfg(feature = "gpu")]
ProcColumn::GpuUtilPercent => "GPU%",
}
@ -117,9 +117,9 @@ impl ColumnHeader for ProcColumn {
ProcColumn::User => "User",
ProcColumn::Time => "Time",
#[cfg(feature = "gpu")]
ProcColumn::GpuMem => "GMEM",
ProcColumn::GpuMem => "GMem",
#[cfg(feature = "gpu")]
ProcColumn::GpuMemPercent => "GMEM%",
ProcColumn::GpuMemPercent => "GMem%",
#[cfg(feature = "gpu")]
ProcColumn::GpuUtilPercent => "GPU%",
}