application.ex 819 B

12345678910111213141516171819202122232425262728293031
  1. defmodule FrameworkBenchmarks.Application do
  2. # See https://hexdocs.pm/elixir/Application.html
  3. # for more information on OTP Applications
  4. @moduledoc false
  5. use Application
  6. def start(_type, _args) do
  7. children = [
  8. {Registry, keys: :unique, name: FrameworkBenchmarks.Registry},
  9. FrameworkBenchmarks.Repo,
  10. FrameworkBenchmarks.CachedWorld,
  11. {Plug.Cowboy,
  12. scheme: :http,
  13. plug: FrameworkBenchmarks.Endpoints,
  14. options: [
  15. port: 8080,
  16. protocol_options: [
  17. max_keepalive: 32768
  18. ],
  19. transport_options: [
  20. max_connections: :infinity,
  21. num_acceptors: 32768
  22. ]
  23. ]}
  24. ]
  25. opts = [strategy: :one_for_one, name: FrameworkBenchmarks.Supervisor]
  26. Supervisor.start_link(children, opts)
  27. end
  28. end