Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
419B

  1. defmodule Pleroma.LoadTesting.Helper do
  2. alias Ecto.Adapters.SQL
  3. alias Pleroma.Repo
  4. def to_sec(microseconds), do: microseconds / 1_000_000
  5. def clean_tables do
  6. IO.puts("Deleting old data...\n")
  7. SQL.query!(Repo, "TRUNCATE users CASCADE;")
  8. SQL.query!(Repo, "TRUNCATE activities CASCADE;")
  9. SQL.query!(Repo, "TRUNCATE objects CASCADE;")
  10. SQL.query!(Repo, "TRUNCATE oban_jobs CASCADE;")
  11. end
  12. end