0.0
No commit activity in last 3 years
No release in over 3 years
Summarizes minitest tests, printing out tests that take too much memory.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 5.5
 Project Readme

Minitest Hog

Prints a list of tests that take too long.

Installation

gem install minitest-hog

Usage

Minitest Hog can be enabled from the command line using the max-memory parameter:

ruby test/example_test.rb --max-memory 16

This would print out a list of any tests that use more than 16k of memory:

# Running:

....

Finished in 1.001143s

4 runs, 7 assertions, 0 failures, 0 errors, 0 skips

2 slow tests.
  0) ExampleTest#test_alpha: 31 kb
  1) ExampleTest#test_beta: 18 kb

Usage with Rake

If you run your tests with Rake, set the TESTOPTS environment variable:

rake TESTOPTS="--max-memory 16"

Warning!

There are many ways to measure memory usage in Ruby. The results from Minitest Hog may not be exact, but should help you track down the most egregious memory hogs.

Authors

Adam Sanderson (http://monkeyandcrow.com)