ash/benchmarks/side_load.ex
Zach Daniel 227532db29
WIP
2020-05-27 00:29:54 -04:00

17 lines
359 B
Elixir

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
)