diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-01 16:18:16 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-01 16:18:16 +0300 |
commit | 88f7cf51d43181b27db5ff1807d3e706fa336bac (patch) | |
tree | 3c3f8ba3b7685290e26c3582eeba7ba55ca1d10b /benchmarks/load_testing/fetcher.ex | |
parent | 708fd234bdff5423ca6d8003232eca0df231bbc2 (diff) | |
parent | 0d24ab04c5ea779432b4ea174a1d470dac87315d (diff) | |
download | pleroma-88f7cf51d43181b27db5ff1807d3e706fa336bac.tar.gz pleroma-88f7cf51d43181b27db5ff1807d3e706fa336bac.zip |
Merge branch 'develop' into issue/1411
Diffstat (limited to 'benchmarks/load_testing/fetcher.ex')
-rw-r--r-- | benchmarks/load_testing/fetcher.ex | 31 |
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 |