mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-18 07:48:19 +00:00
Fix benchmarks
This commit is contained in:
parent
f726d953d5
commit
478f0883eb
|
@ -39,10 +39,12 @@ defmodule Pleroma.LoadTesting.Fetcher do
|
||||||
"muting_user" => user
|
"muting_user" => user
|
||||||
}
|
}
|
||||||
|
|
||||||
|
following = User.following(user)
|
||||||
|
|
||||||
Benchee.run(%{
|
Benchee.run(%{
|
||||||
"User home timeline" => fn ->
|
"User home timeline" => fn ->
|
||||||
Pleroma.Web.ActivityPub.ActivityPub.fetch_activities(
|
Pleroma.Web.ActivityPub.ActivityPub.fetch_activities(
|
||||||
[user.ap_id | user.following],
|
following,
|
||||||
home_timeline_params
|
home_timeline_params
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
|
@ -60,7 +62,7 @@ defmodule Pleroma.LoadTesting.Fetcher do
|
||||||
|
|
||||||
home_activities =
|
home_activities =
|
||||||
Pleroma.Web.ActivityPub.ActivityPub.fetch_activities(
|
Pleroma.Web.ActivityPub.ActivityPub.fetch_activities(
|
||||||
[user.ap_id | user.following],
|
following,
|
||||||
home_timeline_params
|
home_timeline_params
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -45,15 +45,13 @@ defmodule Pleroma.LoadTesting.Generator do
|
||||||
%{
|
%{
|
||||||
ap_id: ap_id,
|
ap_id: ap_id,
|
||||||
follower_address: ap_id <> "/followers",
|
follower_address: ap_id <> "/followers",
|
||||||
following_address: ap_id <> "/following",
|
following_address: ap_id <> "/following"
|
||||||
following: [ap_id]
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
%{
|
%{
|
||||||
ap_id: User.ap_id(user),
|
ap_id: User.ap_id(user),
|
||||||
follower_address: User.ap_followers(user),
|
follower_address: User.ap_followers(user),
|
||||||
following_address: User.ap_following(user),
|
following_address: User.ap_following(user)
|
||||||
following: [User.ap_id(user)]
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue