{"id":17244306,"url":"https://github.com/dmitrykk/ecto_profiler","last_synced_at":"2025-06-12T05:06:58.670Z","repository":{"id":57493558,"uuid":"117283619","full_name":"DmitryKK/ecto_profiler","owner":"DmitryKK","description":"Project for Ecto DB profiling","archived":false,"fork":false,"pushed_at":"2018-04-09T16:50:43.000Z","size":15,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-12T05:05:37.148Z","etag":null,"topics":["ecto","elixir","hex","phoenix","profiling"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DmitryKK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-12T20:12:26.000Z","updated_at":"2024-07-15T19:46:58.000Z","dependencies_parsed_at":"2022-08-28T13:31:29.640Z","dependency_job_id":null,"html_url":"https://github.com/DmitryKK/ecto_profiler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/DmitryKK/ecto_profiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryKK%2Fecto_profiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryKK%2Fecto_profiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryKK%2Fecto_profiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryKK%2Fecto_profiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DmitryKK","download_url":"https://codeload.github.com/DmitryKK/ecto_profiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DmitryKK%2Fecto_profiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259402066,"owners_count":22851872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecto","elixir","hex","phoenix","profiling"],"created_at":"2024-10-15T06:18:24.511Z","updated_at":"2025-06-12T05:06:58.652Z","avatar_url":"https://github.com/DmitryKK.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EctoProfiler\n\n[![Hex Version][hex-img]][hex]\n\n[hex-img]: https://img.shields.io/hexpm/v/ecto_profiler.svg\n[hex]: https://hex.pm/packages/ecto_profiler\n\nProject for Ecto DB profiling\n\n## Installation\n\n  1. Add `ecto_profiler` to your list of dependencies in `mix.exs`:\n\n  ```elixir\n  def deps do\n    [{:ecto_profiler, github: \"DmitryKK/ecto_profiler\", only: [:dev]}]\n  end\n  ```\n\n  Fetch and compile the dependency\n\n  `mix do deps.get, deps.compile`\n\n  2. Ensure `ecto_profiler` is started before your application:\n\n  ```elixir\n  def application(:dev) do\n    [applications: [:ecto_profiler]]\n  end\n  ```\n\n  3. Add some ecto_profiler configuration to the config file `config/dev.exs`\n\n  ```elixir\n  config :ecto_profiler, EctoProfiler,\n    # name of yours app\n    app_name: :my_great_app,\n    # title of profiling page (optional)\n    page_title: \"Profiling for my great APP\"\n  ```\n\n  4. Add EctoProfiler logger for ecto to the config file `config/dev.exs`, for example:\n\n  ```elixir\n  config :my_greap_app, MyGreatApp.Repo,\n    adapter: Ecto.Adapters.Postgres,\n    username: \"postgres\",\n    password: \"postgres\",\n    database: \"my_great_app_dev\",\n    hostname: \"localhost\",\n    pool_size: 10,\n    timeout: 15_000,\n    pool_timeout: 15_000,\n    ownership_timeout: 15_000,\n    loggers: [{EctoProfiler, :log, []}]\n  ```\n\n  5. Maximize stacktrace depth for phoenix in your configuration file. Default value for dev is 20, for prod is 8. But it is litle depth and you should increase this, for example:\n\n  ```elixir\n  config, :phoenix, :stacktrace_depth, 50\n  ```\n\n  6. Add the profiling route to the router file `web/router.ex`:\n\n  ```elixir\n  defmodule MyGreatApp.Router do\n\n    get \"/profiling\", EctoProfiler.MainController, :show\n  ```\n\n  7. EctoProfiler uses Mnesia for storing data, therefore you need to run mnesia in your application. For example, you could run separate proccess where would it:\n\n  ```elixir\n    mnesia.start()\n  ```\n\nStart the application with iex -S mix phoenix.server\n\nVisit http://localhost:4000/profiling\n\nYou should see page with current profiling.\n\n## Documentation\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/ecto_profiler](https://hexdocs.pm/ecto_profiler).\n\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitrykk%2Fecto_profiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitrykk%2Fecto_profiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitrykk%2Fecto_profiler/lists"}