Nick Vanderbilt
Nick Vanderbilt

Reputation: 1777

How to find how long my rake task is taking

I am using Rails 3.0.10 . I am using mac.

I tried this

time  rake spec/models/user_spec.rb

Then I tried

time (rake spec/models/user_spec.rb)

This one took longer but I did not see my test output.

What is the right way to figure out how long my rake is taking.

Upvotes: 1

Views: 2922

Answers (1)

Winfield
Winfield

Reputation: 19145

You should be able to time any command using 'time' and run your single test directly using the ruby interpreter:

time ruby spec/models/user_spec.rb

Upvotes: 7

Related Questions