Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.01 KB

File metadata and controls

40 lines (29 loc) · 1.01 KB

QueryStats

CI Pipeline Hex.pm Documentation

QueryStats is a library that provides a way to track the number of queries executed by Ecto during test suite runs.

After a run, it will output the total number of queries and the number of queries per type.

Output example

Total queries: 10
Query types:
  INSERT: 5
  SELECT: 5

Installation

If available in Hex, the package can be installed by adding query_stats to your list of dependencies in mix.exs:

def deps do
  [
    {:query_stats, "~> 0.1.0", only: [:test]}
  ]
end

Then, in your test_helper.exs file, add the following line:

QueryStats.start(:my_app)

Replace :my_app with the name of your application.