Fix benchmarks
authorEgor Kislitsyn <egor@kislitsyn.com>
Mon, 21 Oct 2019 08:55:28 +0000 (15:55 +0700)
committerEgor Kislitsyn <egor@kislitsyn.com>
Mon, 21 Oct 2019 08:55:28 +0000 (15:55 +0700)
benchmarks/load_testing/fetcher.ex
benchmarks/load_testing/generator.ex

index e378c51e7f55db8bcd64f4b28e27f8c098cf34a6..cdc073b2ebea0f64f704c44a620f0f3e67c4398a 100644 (file)
@@ -39,10 +39,12 @@ defmodule Pleroma.LoadTesting.Fetcher do
       "muting_user" => user
     }
 
+    following = User.following(user)
+
     Benchee.run(%{
       "User home timeline" => fn ->
         Pleroma.Web.ActivityPub.ActivityPub.fetch_activities(
-          [user.ap_id | user.following],
+          following,
           home_timeline_params
         )
       end,
@@ -60,7 +62,7 @@ defmodule Pleroma.LoadTesting.Fetcher do
 
     home_activities =
       Pleroma.Web.ActivityPub.ActivityPub.fetch_activities(
-        [user.ap_id | user.following],
+        following,
         home_timeline_params
       )
 
index 5c5a5c122948b0aae2b5f2cae6b883511eab8a64..b4432bdb7313621dc92c5d97583cdc00082864c7 100644 (file)
@@ -45,15 +45,13 @@ defmodule Pleroma.LoadTesting.Generator do
         %{
           ap_id: ap_id,
           follower_address: ap_id <> "/followers",
-          following_address: ap_id <> "/following",
-          following: [ap_id]
+          following_address: ap_id <> "/following"
         }
       else
         %{
           ap_id: User.ap_id(user),
           follower_address: User.ap_followers(user),
-          following_address: User.ap_following(user),
-          following: [User.ap_id(user)]
+          following_address: User.ap_following(user)
         }
       end