You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically it is complaining about the division on line 37 in the lib/wobserver/system/scheduler.ex file, the whole function is:
def utilization do
ensure_started()
case last_utilization() do
false ->
get_utilization()
|> Enum.map(fn {_, u, t} ->u / t end)
last ->
get_utilization()
|> Enum.zip(last)
|> Enum.map(fn {{_, u0, t0}, {_, u1, t1}} -> (u1 - u0) / (t1 - t0) end)
end
end
I also see the error happen on the other Enum.map line as well, specifically it seems t can be 0 in the first Enum.map and t1-t0 can be 0 in the other Enum.map at times, checks probably need to be added to do an alternative action instead.
The text was updated successfully, but these errors were encountered:
In the logs I keep getting a
:badarith
error randomly between 2 to 30 seconds, the stacktrace is (reformatted for readability):Specifically it is complaining about the division on line 37 in the
lib/wobserver/system/scheduler.ex
file, the whole function is:I also see the error happen on the other Enum.map line as well, specifically it seems
t
can be 0 in the first Enum.map andt1-t0
can be 0 in the other Enum.map at times, checks probably need to be added to do an alternative action instead.The text was updated successfully, but these errors were encountered: