Diagnostics tasks #348

Merged
floatingghost merged 4 commits from diagnostics into develop 2022-12-07 11:12:35 +00:00
Showing only changes of commit 3a875fc952 - Show all commits

View file

@ -6,7 +6,7 @@ defmodule Mix.Tasks.Pleroma.Diagnostics do
require Pleroma.Constants require Pleroma.Constants
import Mix.Pleroma import Mix.Pleroma
import Ecto.Query
use Mix.Task use Mix.Task
def run(["home_timeline", nickname]) do def run(["home_timeline", nickname]) do
@ -38,6 +38,7 @@ def run(["home_timeline", nickname]) do
recipients ++ list_memberships, recipients ++ list_memberships,
params params
) )
|> limit(20)
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity) Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|> IO.puts() |> IO.puts()
@ -65,6 +66,7 @@ def run(["user_timeline", nickname, reading_nickname]) do
} }
|> Pleroma.Web.ActivityPub.ActivityPub.user_activities_recipients() |> Pleroma.Web.ActivityPub.ActivityPub.user_activities_recipients()
|> Pleroma.Web.ActivityPub.ActivityPub.fetch_activities_query(params) |> Pleroma.Web.ActivityPub.ActivityPub.fetch_activities_query(params)
|> limit(20)
Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity) Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity)
|> IO.puts() |> IO.puts()