bdd181425b
Docker Compose project with automated Playwright benchmarks comparing django-liveview 2.2.0 against Phoenix LiveView 1.0 across 6 scenarios.
16 lines
391 B
Elixir
16 lines
391 B
Elixir
defmodule BenchmarkWeb.BenchController do
|
|
use BenchmarkWeb, :controller
|
|
alias Benchmark.Alerts
|
|
|
|
def clear(conn, _params) do
|
|
Alerts.clear_all()
|
|
json(conn, %{status: "ok", deleted: true})
|
|
end
|
|
|
|
def populate(conn, params) do
|
|
count = String.to_integer(Map.get(params, "count", "10"))
|
|
Alerts.create_alerts(count)
|
|
json(conn, %{status: "ok", created: count})
|
|
end
|
|
end
|