diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-05-14 19:00:07 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-05-14 19:00:07 +0700 |
commit | e82e73478e577782407bc8452d17925675d99d10 (patch) | |
tree | 0784beff0a57cbeb239215314e0436b7f0a5253f /lib/mix/tasks/benchmark.ex | |
parent | 23276e8d6848fa8eae390c16b6e0619c12546e4a (diff) | |
parent | cdcdbd88da76f18c21da7f6f15a29883044902c8 (diff) | |
download | pleroma-e82e73478e577782407bc8452d17925675d99d10.tar.gz |
Merge remote-tracking branch 'pleroma/develop' into feature/addressable-lists
Diffstat (limited to 'lib/mix/tasks/benchmark.ex')
-rw-r--r-- | lib/mix/tasks/benchmark.ex | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/mix/tasks/benchmark.ex b/lib/mix/tasks/benchmark.ex new file mode 100644 index 000000000..0fbb4dbb1 --- /dev/null +++ b/lib/mix/tasks/benchmark.ex @@ -0,0 +1,25 @@ +defmodule Mix.Tasks.Pleroma.Benchmark do + use Mix.Task + alias Mix.Tasks.Pleroma.Common + + def run(["search"]) do + Common.start_pleroma() + + Benchee.run(%{ + "search" => fn -> + Pleroma.Web.MastodonAPI.MastodonAPIController.status_search(nil, "cofe") + end + }) + end + + def run(["tag"]) do + Common.start_pleroma() + + Benchee.run(%{ + "tag" => fn -> + %{"type" => "Create", "tag" => "cofe"} + |> Pleroma.Web.ActivityPub.ActivityPub.fetch_public_activities() + end + }) + end +end |