All Projects → DmitryKK → ecto_profiler

DmitryKK / ecto_profiler

Licence: other
Project for Ecto DB profiling

Programming Languages

elixir
2628 projects
HTML
75241 projects

Projects that are alternatives of or similar to ecto profiler

ecto commons
Ecto common validators for Date, Time, URLs, Emails, PostalCodes, Phone Numbers, Luhn checks, etc.
Stars: ✭ 33 (+106.25%)
Mutual labels:  hex, ecto
querie
Compose Ecto query from the client side
Stars: ✭ 20 (+25%)
Mutual labels:  phoenix, ecto
gleam compile
Tiny hex package to make the development experience of using gleam in elixir (and especially phoenix projects) better.
Stars: ✭ 29 (+81.25%)
Mutual labels:  hex, phoenix
Formex
A better form library for Phoenix
Stars: ✭ 206 (+1187.5%)
Mutual labels:  phoenix, ecto
Phoenix gon
🔥 Phoenix variables in your JavaScript without headache.
Stars: ✭ 84 (+425%)
Mutual labels:  hex, phoenix
Params
Easy parameters validation/casting with Ecto.Schema, akin to Rails' strong parameters.
Stars: ✭ 239 (+1393.75%)
Mutual labels:  phoenix, ecto
algoliax
Algolia integration to elixir application
Stars: ✭ 38 (+137.5%)
Mutual labels:  phoenix, ecto
Filterable
Filtering from incoming params in Elixir/Ecto/Phoenix with easy to use DSL.
Stars: ✭ 83 (+418.75%)
Mutual labels:  phoenix, ecto
phoenix pagination
Simple pagination for Ecto and Phoenix that uses plain EEx templates.
Stars: ✭ 20 (+25%)
Mutual labels:  phoenix, ecto
Alpine Phoenix Builder
Up to date Alpine image with the latest language versions for staged Elixir and Phoenix builds.
Stars: ✭ 71 (+343.75%)
Mutual labels:  hex, phoenix
Phoenix Ecto Encryption Example
🔐 A detailed example for how to encrypt data in a Phoenix (Elixir) App before inserting into a database using Ecto Types
Stars: ✭ 166 (+937.5%)
Mutual labels:  phoenix, ecto
Xprof
A visual tracer and profiler for Erlang and Elixir.
Stars: ✭ 246 (+1437.5%)
Mutual labels:  hex, profiling
Mipha
Proj Elixir Forum build with phoenix 1.5.
Stars: ✭ 153 (+856.25%)
Mutual labels:  phoenix, ecto
ecto trail
EctoTrail allows to store Ecto changeset changes in a separate audit_log table.
Stars: ✭ 51 (+218.75%)
Mutual labels:  hex, ecto
Phoenix live dashboard
Realtime dashboard with metrics, request logging, plus storage, OS and VM insights
Stars: ✭ 1,657 (+10256.25%)
Mutual labels:  phoenix, ecto
Cloak
Elixir encryption library designed for Ecto
Stars: ✭ 413 (+2481.25%)
Mutual labels:  hex, ecto
Ecto morph
morph your Ecto capabilities into the s t r a t o s p h e r e !
Stars: ✭ 72 (+350%)
Mutual labels:  phoenix, ecto
Polymorphic embed
Polymorphic embeds in Ecto
Stars: ✭ 80 (+400%)
Mutual labels:  phoenix, ecto
Mssqlex
Microsoft SQL Server Adapter for Elixir
Stars: ✭ 38 (+137.5%)
Mutual labels:  hex, ecto
Ecto mnesia
Ecto adapter for Mnesia Erlang term database.
Stars: ✭ 223 (+1293.75%)
Mutual labels:  hex, ecto

EctoProfiler

Hex Version

Project for Ecto DB profiling

Installation

  1. Add ecto_profiler to your list of dependencies in mix.exs:
def deps do
  [{:ecto_profiler, github: "DmitryKK/ecto_profiler", only: [:dev]}]
end

Fetch and compile the dependency

mix do deps.get, deps.compile

  1. Ensure ecto_profiler is started before your application:
def application(:dev) do
  [applications: [:ecto_profiler]]
end
  1. Add some ecto_profiler configuration to the config file config/dev.exs
config :ecto_profiler, EctoProfiler,
  # name of yours app
  app_name: :my_great_app,
  # title of profiling page (optional)
  page_title: "Profiling for my great APP"
  1. Add EctoProfiler logger for ecto to the config file config/dev.exs, for example:
config :my_greap_app, MyGreatApp.Repo,
  adapter: Ecto.Adapters.Postgres,
  username: "postgres",
  password: "postgres",
  database: "my_great_app_dev",
  hostname: "localhost",
  pool_size: 10,
  timeout: 15_000,
  pool_timeout: 15_000,
  ownership_timeout: 15_000,
  loggers: [{EctoProfiler, :log, []}]
  1. 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:
config, :phoenix, :stacktrace_depth, 50
  1. Add the profiling route to the router file web/router.ex:
defmodule MyGreatApp.Router do

  get "/profiling", EctoProfiler.MainController, :show
  1. 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:
  mnesia.start()

Start the application with iex -S mix phoenix.server

Visit http://localhost:4000/profiling

You should see page with current profiling.

Documentation

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ecto_profiler.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].