mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-16 16:12:41 +00:00
Add benchmarks
This commit is contained in:
parent
665bc6e61e
commit
a3eccb231d
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -74,7 +74,7 @@ priv/localisation/*
|
|||
.local/state/
|
||||
docs/exdoc
|
||||
bonfire.code-workspace
|
||||
benchmarks/
|
||||
benchmarks/output
|
||||
|
||||
# we use pnpm, so ignore others
|
||||
assets/package-lock.json
|
||||
|
|
19
benchmarks/feeds.ex
Normal file
19
benchmarks/feeds.ex
Normal file
|
@ -0,0 +1,19 @@
|
|||
Benchee.run(
|
||||
%{
|
||||
"feed with boundaries" => fn -> Bonfire.Social.FeedActivities.feed(:local) end,
|
||||
"feed without boundaries" => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true) end,
|
||||
"feed with minimal join/preloads with boundaries" => fn -> Bonfire.Social.FeedActivities.feed(:local, preloads: :minimum) end,
|
||||
"feed with minimal join/preloads without boundaries" => fn -> Bonfire.Social.FeedActivities.feed(:local, skip_boundary_check: true, preloads: :minimum) end,
|
||||
# "AP:shared_outbox" => fn -> ActivityPubWeb.ObjectView.render("outbox.json", %{outbox: :shared_outbox}) end
|
||||
},
|
||||
parallel: 1,
|
||||
warmup: 2,
|
||||
time: 5,
|
||||
memory_time: 2,
|
||||
reduction_time: 2,
|
||||
profile_after: true,
|
||||
formatters: [
|
||||
Benchee.Formatters.HTML,
|
||||
Benchee.Formatters.Console
|
||||
]
|
||||
)
|
Loading…
Reference in a new issue