forked from AkkomaGang/akkoma
fix
This commit is contained in:
parent
1f29ecdcd7
commit
56503c385e
2 changed files with 6 additions and 6 deletions
|
@ -19,7 +19,7 @@ defmodule Pleroma.LoadTesting.Activities do
|
|||
non_friends_used: 20
|
||||
]
|
||||
|
||||
@max_concurrency 30
|
||||
@max_concurrency 10
|
||||
|
||||
@visibility ~w(public private direct unlisted)
|
||||
@types ~w(simple emoji mentions hell_thread attachment tag like reblog simple_thread remote)
|
||||
|
@ -81,7 +81,7 @@ def generate(user, opts \\ []) do
|
|||
)
|
||||
end)
|
||||
|
||||
IO.puts("Generating iterations activities take #{to_sec(time)} sec.\n")
|
||||
IO.puts("Generating iterations of activities take #{to_sec(time)} sec.\n")
|
||||
:ok
|
||||
end
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ defmodule Pleroma.LoadTesting.Users do
|
|||
friends: 100
|
||||
]
|
||||
|
||||
@max_concurrency 30
|
||||
@max_concurrency 10
|
||||
|
||||
@spec generate(keyword()) :: User.t()
|
||||
def generate(opts \\ []) do
|
||||
|
@ -31,7 +31,7 @@ def generate(opts \\ []) do
|
|||
end
|
||||
|
||||
def generate_users(max) do
|
||||
IO.puts("Starting generating #{opts[:users]} users...")
|
||||
IO.puts("Starting generating #{max} users...")
|
||||
|
||||
{time, _} =
|
||||
:timer.tc(fn ->
|
||||
|
@ -87,7 +87,7 @@ defp user_urls(%{local: false} = user) do
|
|||
end
|
||||
|
||||
def make_friends(main_user, max) when is_integer(max) do
|
||||
IO.puts("Starting making friends for #{opts[:friends]} users...")
|
||||
IO.puts("Starting making friends for #{max} users...")
|
||||
|
||||
{time, _} =
|
||||
:timer.tc(fn ->
|
||||
|
@ -107,7 +107,7 @@ def make_friends(main_user, max) when is_integer(max) do
|
|||
IO.puts("Making friends take #{to_sec(time)} sec.\n")
|
||||
end
|
||||
|
||||
defp make_friends(%User{} = main_user, %User{} = user) do
|
||||
def make_friends(%User{} = main_user, %User{} = user) do
|
||||
{:ok, _} = User.follow(main_user, user)
|
||||
{:ok, _} = User.follow(user, main_user)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue