aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/load_testing/fetcher.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-12-04 18:56:31 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-12-04 18:56:31 +0300
commit30caf3e51e32830153e693727b3765e8817171a3 (patch)
treeb752dd12604afa8be2bc7c753a64a5725bc2ebbc /benchmarks/load_testing/fetcher.ex
parent52cc7de82cf3aa637d599edc357909be8c9366eb (diff)
parent228bf4d214abe3bb62c52128d3bc145e396b174d (diff)
downloadpleroma-30caf3e51e32830153e693727b3765e8817171a3.tar.gz
Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields-relations
# Conflicts: # lib/pleroma/user.ex
Diffstat (limited to 'benchmarks/load_testing/fetcher.ex')
-rw-r--r--benchmarks/load_testing/fetcher.ex31
1 files changed, 30 insertions, 1 deletions
diff --git a/benchmarks/load_testing/fetcher.ex b/benchmarks/load_testing/fetcher.ex
index cdc073b2e..a45a71d4a 100644
--- a/benchmarks/load_testing/fetcher.ex
+++ b/benchmarks/load_testing/fetcher.ex
@@ -95,7 +95,36 @@ defmodule Pleroma.LoadTesting.Fetcher do
for: user,
as: :activity
})
- end
+ end,
+ "Rendering favorites timeline" => fn ->
+ conn = Phoenix.ConnTest.build_conn(:get, "http://localhost:4001/api/v1/favourites", nil)
+ Pleroma.Web.MastodonAPI.StatusController.favourites(
+ %Plug.Conn{conn |
+ assigns: %{user: user},
+ query_params: %{"limit" => "0"},
+ body_params: %{},
+ cookies: %{},
+ params: %{},
+ path_params: %{},
+ private: %{
+ Pleroma.Web.Router => {[], %{}},
+ phoenix_router: Pleroma.Web.Router,
+ phoenix_action: :favourites,
+ phoenix_controller: Pleroma.Web.MastodonAPI.StatusController,
+ phoenix_endpoint: Pleroma.Web.Endpoint,
+ phoenix_format: "json",
+ phoenix_layout: {Pleroma.Web.LayoutView, "app.html"},
+ phoenix_recycled: true,
+
+ phoenix_view: Pleroma.Web.MastodonAPI.StatusView,
+ plug_session: %{"user_id" => user.id},
+ plug_session_fetch: :done,
+ plug_session_info: :write,
+ plug_skip_csrf_protection: true
+ }
+ },
+ %{})
+ end,
})
end