This commit is contained in:
Mayel de Borniol 2023-01-17 16:59:38 +13:00
parent 489134598d
commit 063afd3982
5 changed files with 18 additions and 31 deletions

View file

@ -34,3 +34,12 @@ end
# end
import_if_enabled(Bonfire.Common.Test.Interactive.Helpers)
defmodule ObserverCLI do
def observer_cli_start, do: start()
defp start do
Logger.configure(level: :error)
:observer_cli.start
end
end
import ObserverCLI

View file

@ -1,26 +0,0 @@
# NOTE: make sure you populate your local with seeds first, and then copy paste this in iex
Logger.configure(level: :warn)
Benchee.run(
%{
"minimal join/preloads, with boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local, preloads: :with_object) end,
"minimal join/preloads, without boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true, preloads: :with_object) end,
"caching preloads, with boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local) |> Bonfire.Social.Feeds.LiveHandler.preloads(with_cache: true) end,
"caching preloads, without boundaries applied " => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true) |> Bonfire.Social.Feeds.LiveHandler.preloads(with_cache: true) end,
"full join/preloads, with boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local, preloads: :feed) end,
"full join/preloads, without boundaries applied" => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true, preloads: :feed) end,
# "AP:shared_outbox" => fn -> ActivityPubWeb.ObjectView.render("outbox.json", %{outbox: :shared_outbox}) end
},
parallel: 10,
warmup: 2,
time: 5,
memory_time: 2,
reduction_time: 2,
profile_after: true,
formatters: [
Benchee.Formatters.HTML,
Benchee.Formatters.Console
]
)
Logger.configure(level: :debug)

View file

@ -86,8 +86,12 @@ config :bonfire, Bonfire.Web.Endpoint,
config :bonfire, Bonfire.Web.Endpoint, phoenix_profiler: [server: Bonfire.Web.Profiler]
config :surface,
log_level: :debug
config :logger,
level: :debug,
# level: :debug,
level: :info,
truncate: :infinity
config :logger, :console,
@ -98,8 +102,6 @@ config :phoenix, :stacktrace_depth, 30
config :phoenix, :plug_init_mode, :runtime
config :surface, :compiler, warn_on_undefined_props: false
config :exsync,
src_monitor: true,
reload_timeout: 75,

View file

@ -18,3 +18,5 @@ config :bonfire, Bonfire.Web.Endpoint, server: true
config :bonfire, Bonfire.Common.Repo,
# in releases migrations are not in a flavour-specific directory
priv: "priv/repo"
# config :surface, :compiler, warn_on_undefined_props: false

View file

@ -59,8 +59,8 @@ defmodule Bonfire.Umbrella.MixProject do
# {:bypass, "~> 2.1", only: :test}, # used in furlex
# Benchmarking utilities
{:benchee, "~> 1.1", only: :dev},
{:benchee_html, "~> 1.0", only: :dev},
{:benchee, "~> 1.1", only: [:dev, :test]},
{:benchee_html, "~> 1.0", only: [:dev, :test]},
# for Telemetry store
{:circular_buffer, "~> 0.4", only: :dev},