« Return to Thread: Reducing frequency of autotest file checks

Reducing frequency of autotest file checks

by 21croissants :: Rate this Message:

Reply to Author | View in Thread

I am using RSpec 1.1.3 with ZenTest-3.9.1 and I wanted to share my set up.

If your cpu is at 100% when autotest is running and the fan noise is getting too much, don't worry there's something you can do.

You can reduce the frequency at which autotest checks for changes on your file system by adding an initialize hook in your ~/.autotest configuration:

    gedit ~/.autotest


Autotest.add_hook :initialize do |at|
 # Reducing frequency of autotest file checks too 30 seconds. Default is 1s which makes my laptop very hoooot
 at.sleep = 30

 # Ignore files with suffix
 %w{.svn
    .hg
    .git
    .rhtml
    .png
    .txt
    .sh
    .project
    .rjs
    .rake
    .jpg
    .xml
    .xlst}.each { |exception| at.add_exception(exception) }
end

More information about autotest hooks in David Chelimsky blog.

I also posted this trick to my blog (with some links) at
http://21croissants.blogspot.com/2008/02/reducing-frequency-of-autotest-file.html

 « Return to Thread: Reducing frequency of autotest file checks