projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Benchmarks: fix user timeline and tags benchmarks
[akkoma]
/
benchmarks
/
mix
/
tasks
/
pleroma
/
benchmarks
/
timelines.ex
diff --git
a/benchmarks/mix/tasks/pleroma/benchmarks/timelines.ex
b/benchmarks/mix/tasks/pleroma/benchmarks/timelines.ex
index 9b7ac6111fd935fc7cfdf8036dc0263ded2880e5..3770ca163b541e6cc50da4404c8dbb6726d09d74 100644
(file)
--- 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
# 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} ->
# 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)
activity
end)
@@
-42,7
+42,7
@@
defmodule Mix.Tasks.Pleroma.Benchmarks.Timelines do
|> Conn.assign(:user, reading_user)
|> Conn.assign(:skip_link_headers, true)
|> 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},
end
},
inputs: %{"user" => user, "no user" => nil},
@@
-60,7
+60,7
@@
defmodule Mix.Tasks.Pleroma.Benchmarks.Timelines do
|> Conn.assign(:user, reading_user)
|> Conn.assign(:skip_link_headers, true)
|> 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},
end
},
inputs: %{"user" => user, "no user" => nil},