ash/benchmarks/side_load.ex

18 lines
359 B
Elixir
Raw Permalink Normal View History

2020-05-26 06:32:45 +12:00
Benchee.run(
%{
"ecto" => fn ->
AshExample.Ticket
|> AshExample.Repo.all()
|> AshExample.Repo.preload(:representative, in_parallel: false)
end,
"ash" => fn ->
:ticket
|> AshExample.Api.query()
|> Ash.Query.side_load(:representative)
|> AshExample.Api.read!()
end
},
time: 10,
memory_time: 2
)