diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-06-02 08:50:24 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-06-02 09:00:10 +0300 |
commit | 19f468c5bc230d6790b00aa87e509a07e709aaa7 (patch) | |
tree | 26a4c7e3b3ea0a5e6da1bc6a2fbd3e257b1d9a9d /benchmarks/load_testing/fetcher.ex | |
parent | 7e6ec778d965419ed4083428d4d39b2a689f7619 (diff) | |
download | pleroma-19f468c5bc230d6790b00aa87e509a07e709aaa7.tar.gz pleroma-19f468c5bc230d6790b00aa87e509a07e709aaa7.zip |
replies filtering for blocked domains
Diffstat (limited to 'benchmarks/load_testing/fetcher.ex')
-rw-r--r-- | benchmarks/load_testing/fetcher.ex | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/benchmarks/load_testing/fetcher.ex b/benchmarks/load_testing/fetcher.ex index b278faf9f..22a06e472 100644 --- a/benchmarks/load_testing/fetcher.ex +++ b/benchmarks/load_testing/fetcher.ex @@ -228,24 +228,16 @@ defmodule Pleroma.LoadTesting.Fetcher do fetch_public_timeline(opts, "public timeline only media") end - # TODO: remove using `:method` after benchmarks defp fetch_public_timeline(user, :with_blocks) do opts = opts_for_public_timeline(user) remote_non_friends = Agent.get(:non_friends_remote, & &1) - Benchee.run( - %{ - "public timeline without blocks" => fn opts -> - ActivityPub.fetch_public_activities(opts) - end - }, - inputs: %{ - "old filtering" => Map.delete(opts, :method), - "with psql fun" => Map.put(opts, :method, :fun), - "with unnest" => Map.put(opts, :method, :unnest) - } - ) + Benchee.run(%{ + "public timeline without blocks" => fn -> + ActivityPub.fetch_public_activities(opts) + end + }) Enum.each(remote_non_friends, fn non_friend -> {:ok, _} = User.block(user, non_friend) @@ -257,15 +249,10 @@ defmodule Pleroma.LoadTesting.Fetcher do Benchee.run( %{ - "public timeline with user block" => fn opts -> + "public timeline with user block" => fn -> ActivityPub.fetch_public_activities(opts) end }, - inputs: %{ - "old filtering" => Map.delete(opts, :method), - "with psql fun" => Map.put(opts, :method, :fun), - "with unnest" => Map.put(opts, :method, :unnest) - } ) domains = @@ -289,11 +276,6 @@ defmodule Pleroma.LoadTesting.Fetcher do "public timeline with domain block" => fn opts -> ActivityPub.fetch_public_activities(opts) end - }, - inputs: %{ - "old filtering" => Map.delete(opts, :method), - "with psql fun" => Map.put(opts, :method, :fun), - "with unnest" => Map.put(opts, :method, :unnest) } ) end |