benchmarks/ added favourites timeline
This commit is contained in:
parent
bf89e0bf38
commit
1fcd579b6d
3 changed files with 34 additions and 1 deletions
|
|
@ -57,6 +57,9 @@ defmodule Pleroma.LoadTesting.Fetcher do
|
|||
Pleroma.Web.ActivityPub.ActivityPub.fetch_public_activities(
|
||||
mastodon_federated_timeline_params
|
||||
)
|
||||
end,
|
||||
"User favourites timeline" => fn ->
|
||||
Pleroma.Web.ActivityPub.ActivityPub.fetch_favourites(user)
|
||||
end
|
||||
})
|
||||
|
||||
|
|
@ -74,6 +77,8 @@ defmodule Pleroma.LoadTesting.Fetcher do
|
|||
mastodon_federated_timeline_params
|
||||
)
|
||||
|
||||
user_favourites = Pleroma.Web.ActivityPub.ActivityPub.fetch_favourites(user)
|
||||
|
||||
Benchee.run(%{
|
||||
"Rendering home timeline" => fn ->
|
||||
Pleroma.Web.MastodonAPI.StatusView.render("index.json", %{
|
||||
|
|
@ -95,7 +100,13 @@ defmodule Pleroma.LoadTesting.Fetcher do
|
|||
for: user,
|
||||
as: :activity
|
||||
})
|
||||
end
|
||||
end,
|
||||
"Rendering favorites timeline" => fn ->
|
||||
Pleroma.Web.MastodonAPI.StatusView.render("index.json", %{
|
||||
activities: user_favourites,
|
||||
for: user,
|
||||
as: :activity})
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue