Merge branch 'fix-search-speed' into 'develop'

Search: Add fts index on objects table.

See merge request pleroma/pleroma!1120
This commit is contained in:
rinpatch 2019-05-03 18:35:02 +00:00
commit 9907e974ca
5 changed files with 38 additions and 1 deletions

View file

@ -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