Skip to content

Commit

Permalink
don't compare with structs (#60)
Browse files Browse the repository at this point in the history
Fixes #58
  • Loading branch information
SteffenDE authored Dec 5, 2024
1 parent 2d090e0 commit 6c2a091
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ecto_psql_extras/diagnose_logic.ex
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ defmodule EctoPSQLExtras.DiagnoseLogic do
format: :raw
).rows
|> Enum.filter(fn(el) ->
Enum.at(el, 3) > Decimal.from_float(@bloat_min_value)
# el = [type, schemaname, object_name, bloat, waste]
bloat = Decimal.to_float(Enum.at(el, 3)) |> Float.round(6)
bloat > @bloat_min_value
end)

[ok, message] = case bloated_objects do
Expand Down

0 comments on commit 6c2a091

Please sign in to comment.