X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=benchmarks%2Fmix%2Ftasks%2Fpleroma%2Fbenchmarks%2Ftimelines.ex;h=3770ca163b541e6cc50da4404c8dbb6726d09d74;hb=73609211a425922a5068d3912a36b82abe24e12c;hp=aed32f1946a58e5fc28e864d4e4103da169de729;hpb=31c89acd00396f95a35ea325ed848ffeb2826017;p=akkoma diff --git a/benchmarks/mix/tasks/pleroma/benchmarks/timelines.ex b/benchmarks/mix/tasks/pleroma/benchmarks/timelines.ex index aed32f194..3770ca163 100644 --- a/benchmarks/mix/tasks/pleroma/benchmarks/timelines.ex +++ b/benchmarks/mix/tasks/pleroma/benchmarks/timelines.ex @@ -17,14 +17,14 @@ defmodule Mix.Tasks.Pleroma.Benchmarks.Timelines do # Let the user make 100 posts 1..100 - |> Enum.each(fn i -> CommonAPI.post(user, %{"status" => to_string(i)}) end) + |> Enum.each(fn i -> CommonAPI.post(user, %{status: to_string(i)}) end) # Let 10 random users post posts = users |> Enum.take_random(10) |> Enum.map(fn {:ok, random_user} -> - {:ok, activity} = CommonAPI.post(random_user, %{"status" => "."}) + {:ok, activity} = CommonAPI.post(random_user, %{status: "."}) activity end) @@ -42,7 +42,7 @@ defmodule Mix.Tasks.Pleroma.Benchmarks.Timelines do |> Conn.assign(:user, reading_user) |> Conn.assign(:skip_link_headers, true) - Pleroma.Web.MastodonAPI.AccountController.statuses(conn, %{"id" => user.id}) + Pleroma.Web.MastodonAPI.AccountController.statuses(conn, %{id: user.id}) end }, inputs: %{"user" => user, "no user" => nil}, @@ -50,7 +50,7 @@ defmodule Mix.Tasks.Pleroma.Benchmarks.Timelines do ) users - |> Enum.each(fn {:ok, follower, user} -> Pleroma.User.follow(follower, user) end) + |> Enum.each(fn {:ok, follower} -> Pleroma.User.follow(follower, user) end) Benchee.run( %{ @@ -60,7 +60,7 @@ defmodule Mix.Tasks.Pleroma.Benchmarks.Timelines do |> Conn.assign(:user, reading_user) |> Conn.assign(:skip_link_headers, true) - Pleroma.Web.MastodonAPI.AccountController.statuses(conn, %{"id" => user.id}) + Pleroma.Web.MastodonAPI.AccountController.statuses(conn, %{id: user.id}) end }, inputs: %{"user" => user, "no user" => nil},