diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-04 09:34:44 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-04 09:34:44 +0300 |
commit | 29a98b86b7056540ed4102a83dfe6a7e809c2519 (patch) | |
tree | 559c763669b1f647f96ff9fa67e36343da87565f /benchmarks/load_testing/fetcher.ex | |
parent | 652cc6ba4b7a0494cc96ef4a9bfcaa3b5e5be60e (diff) | |
parent | 7722e5a67a46304f3ae0e37f674a44ca9268be5e (diff) | |
download | pleroma-29a98b86b7056540ed4102a83dfe6a7e809c2519.tar.gz pleroma-29a98b86b7056540ed4102a83dfe6a7e809c2519.zip |
Merge branch 'develop' into issue/1383
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 |