Solved issue with W suffix in GPU powerdraw
This commit is contained in:
parent
a615b58a7d
commit
a3c3a69f0e
|
@ -1,7 +1,7 @@
|
|||
name = "GreenFlux"
|
||||
uuid = "ccad5352-7643-4eb2-b711-e9c298e87bf0"
|
||||
authors = ["Eduardo Cueto Mendoza"]
|
||||
version = "0.1.0"
|
||||
version = "0.0.4"
|
||||
|
||||
[deps]
|
||||
CUDAapi = "3895d2a7-ec45-59b8-82bb-cfc6a382f9b3"
|
||||
|
|
|
@ -34,17 +34,20 @@ function gpupowerdraw()
|
|||
usagestr = ""
|
||||
capstr = ""
|
||||
if g[5] == "N/A"
|
||||
usagestr = "0.0"
|
||||
usagestr = "0W"
|
||||
else
|
||||
usagestr = usagestr * g[5]
|
||||
end
|
||||
if g[7] == "N/A"
|
||||
capstr = "0.0"
|
||||
capstr = "0W"
|
||||
else
|
||||
capstr = capstr * g[7]
|
||||
end
|
||||
powerdraw = vcat(powerdraw, parse(Float64,usagestr))
|
||||
powercap = vcat(powercap, parse(Float64,capstr))
|
||||
regexw = r"(\d+)"
|
||||
wattusg = match(regexw,usagestr)
|
||||
wattcap = match(regexw,capstr)
|
||||
powerdraw = vcat(powerdraw, parse(Float64,wattusg.match))
|
||||
powercap = vcat(powercap, parse(Float64,wattcap.match))
|
||||
end
|
||||
usage[count] = mean(powerdraw)
|
||||
cap[count] = mean(powercap)
|
||||
|
|
Loading…
Reference in New Issue