{"id":22242429,"url":"https://github.com/manzanit0/aedis","last_synced_at":"2025-10-14T22:14:19.345Z","repository":{"id":127186222,"uuid":"233293894","full_name":"manzanit0/aedis","owner":"manzanit0","description":"📊 API usage visibility for Phoenix applications","archived":false,"fork":false,"pushed_at":"2020-08-09T16:24:18.000Z","size":28,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T09:41:52.582Z","etag":null,"topics":["elixir","observability","phoenix-framework"],"latest_commit_sha":null,"homepage":null,"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/manzanit0.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-11T20:37:29.000Z","updated_at":"2020-08-09T16:24:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"605a767b-9324-4f37-92cb-1d2c58057490","html_url":"https://github.com/manzanit0/aedis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manzanit0%2Faedis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manzanit0%2Faedis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manzanit0%2Faedis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manzanit0%2Faedis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manzanit0","download_url":"https://codeload.github.com/manzanit0/aedis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245449502,"owners_count":20617185,"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":["elixir","observability","phoenix-framework"],"created_at":"2024-12-03T04:16:12.623Z","updated_at":"2025-10-14T22:14:14.290Z","avatar_url":"https://github.com/manzanit0.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aedis\n\nDark Keeper Aedis is a keeper located at the World Soul in Antorus, the Burning Throne.\n\n\u003e Your presence is an infestation. Infestations must be purged!\n\n## Purpose\n\nAedis is a lightweight commandline application which finds unused endpoints in\nPhoenix applications by requesting usage data to third-party services like\nGraylog or AppSignal.\n\nThe results look like below:\n\n```\n+-----------------------------+--------------------------------------------------------------------------------+------------------+--------------------+\n| :method                     | :endpoint                                                                      | :graylog_count   | :appsignal_count   |\n+-----------------------------+--------------------------------------------------------------------------------+------------------+--------------------+\n| \"GET\"                       | \"/api/chats\"                                                                   | 38029            | 345345             |\n| \"PUT\"                       | \"/api/chats\"                                                                   | 31892            | 310098             |\n| \"POST\"                      | \"/api/chats/:id\"                                                               | 23987            | 21828              |\n| \"GET\"                       | \"/api/chats/:id\"                                                               | 15606            | 19808              |\n| \"POST\"                      | \"/api/chats/:id/orders\"                                                        | 11878            | 11878              |\n| \"POST\"                      | \"/api/channel_actions/:channel\"                                                | 421              | 432                |\n| \"POST\"                      | \"/api/channel_actions/:channel/:id\"                                            | 219              | 289                |\n| ...                         | ...                                                                            | ...              | ...                |\n+-----------------------------+--------------------------------------------------------------------------------+------------------+--------------------+\n\n```\n\n## Usage\n\nClone and compile the application:\n\n```\ngit clone https://github.com/Manzanit0/aedis\ncd aedis\nmix deps.get\nmix escript.build\n```\n\nInit necessary configuration (this will save all sensitive data under `~/.aedis`):\n\n```shell script\n./aedis --init\n```\n\nInspect your Phoenix project:\n\n```shell script\n./aedis --path=/home/javiergarciamanzano/Work/rekki-backend/ --router=Chat.Web.Router --graylog --appsignal\n```\n\nWhere `path` expects the path of a Phoenix project and `router` the name of the\nPhoenix router.\n\nNote: In order to obtain data from any of the configured third-party services they\nmust be explicitly added to the command as an option, such as `--graylog`.\n\n## TODO\n\n- Implement something similar for channel topics\n\n## Benchmarks for fun\n\nWhile the development of the application I benchmarked some things, to get a rough idea of performance\ndifferences and I found the following to be quite interesting. Below for those of you interested :-)\n\n```elixir\n  def sync(path, router) do\n    for {endpoint, method, _module, _func} \u003c- Phoenix.routes(path, router) do\n      Graylog.hit_count(endpoint, method)\n    end\n  end\n\n  def async(path, router) do\n    Phoenix.routes(path, router)\n    |\u003e Enum.map(fn {endpoint, method, _module, _func} -\u003e Task.async(fn -\u003e Graylog.hit_count(endpoint, method) end) end)\n    |\u003e Enum.map(\u0026(Task.await \u00261, 50_000))\n  end\n```\n\nBenchmarks with Benchee:\n\n```\nName            ips        average  deviation         median         99th %\nasync        0.0403        24.82 s     ±0.00%        24.82 s        24.82 s\nsync         0.0177        56.53 s     ±0.00%        56.53 s        56.53 s\n\nComparison:\nasync        0.0403\nsync         0.0177 - 2.28x slower +31.71 s\n\nMemory usage statistics:\n\nName     Memory usage\nasync         0.82 MB\nsync        335.94 MB - 407.52x memory usage +335.11 MB\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanzanit0%2Faedis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanzanit0%2Faedis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanzanit0%2Faedis/lists"}