Module: MiniTest::Perf::Statistics

Defined in:
lib/minitest/perf/statistics.rb

Class Method Summary collapse

Class Method Details

.slowest_suitesObject



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/minitest/perf/statistics.rb', line 15

def slowest_suites
  MiniTest::Perf.persistence.sql("    SELECT suite, AVG(test_count), AVG(avg_total_per_test_run) as avg_total\n    FROM (\n      SELECT run, suite, COUNT(name) AS test_count, AVG(total) as avg_total_per_test_run\n      FROM tests\n      GROUP BY run, suite\n    ) as temp\n    GROUP BY suite\n    ORDER BY avg_total desc\n    LIMIT 10\n  SQL\nend\n")

.slowest_testsObject



5
6
7
8
9
10
11
12
13
# File 'lib/minitest/perf/statistics.rb', line 5

def slowest_tests
  MiniTest::Perf.persistence.sql("    SELECT suite, name, avg(total) as avg_total\n    FROM tests\n    GROUP BY suite, name\n    ORDER BY avg_total DESC\n    LIMIT 10\n  SQL\nend\n")