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)
)
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
friends: 100
]
- @max_concurrency 30
+ @max_concurrency 10
@spec generate(keyword()) :: User.t()
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 ->
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 ->
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