@@ -73,20 +73,20 @@ function extract_number_and_unit(str::AbstractString)
73
73
end
74
74
75
75
function plot_cpu_utilization_rates ()
76
- y = get_cpu_percent ()
77
- npad = 1 + floor (Int, log10 (length (y )))
78
- x = [" id: $(lpad (i- 1 , npad)) " for (i, _) in enumerate (y )]
76
+ ys = get_cpu_percent ()
77
+ npad = 1 + floor (Int, log10 (length (ys )))
78
+ xs = [" id: $(lpad (i- 1 , npad)) " for (i, _) in enumerate (ys )]
79
79
80
- ncpus = length (y )
81
- y = round .(y , digits = 1 )
80
+ ncpus = length (ys )
81
+ ys = round .(ys , digits = 1 )
82
82
83
83
plts = []
84
84
85
85
chunks = collect .(collect (Iterators. partition ((1 : ncpus), 4 )))
86
86
for c in chunks
87
87
push! (
88
88
plts,
89
- barplot (x [c], y [c], maximum = 100 , width = max ( 5 , 15 ) , height = length (c)),
89
+ barplot (xs [c], ys [c], maximum = 100 , width = 15 , height = length (c)),
90
90
)
91
91
end
92
92
return plts
@@ -120,7 +120,7 @@ function plot_cpu_memory_utilization()
120
120
# Adds a space for better styling
121
121
name = " $(memorytotal) $(memorytotal_unit) " ,
122
122
maximum = memorytotal,
123
- width = max ( 5 , 15 ) ,
123
+ width = 30 ,
124
124
),
125
125
)
126
126
@@ -140,7 +140,8 @@ function main(dummyargs...)
140
140
141
141
f /= prod (UnicodePlots. panel .(plot_cpu_memory_utilization ()))
142
142
143
- if isdefined (Main, :CUDA ) && getproperty (getproperty (Main, :CUDA ), :functional )()
143
+ if isdefined (Main, :CUDA ) &&
144
+ getproperty (getproperty (Main, :CUDA ), :functional )()
144
145
cudaplts = []
145
146
n = max (1 , cols ÷ 50 )
146
147
plts1:: Vector{Any} = plot_gpu_utilization_rates (MLDataDevices. CUDADevice)
0 commit comments