title: SQL execution time in Rake tasks
body: <p>I've various rake tasks inside my rails app. One simple example is shown below.</p>
  
  <pre><code>desc "Simple rake task"
  task :test_rake do |task|
      first_sql_query = FirstModel.find(10)
      SecondModel.create(:name =&gt; 'Test 101', :email =&gt; 'abc@def.co')
      final_query = SecondModel.find(900)
  end
  </code></pre>
  
  <p>Now in the above rake task, we're making three database calls with each of them taking <code>x</code>, <code>y</code>, <code>z</code> seconds supposedly.</p>
  
  <p>Is there any way to find out the total time spent on db operations(<code>x+y+z</code> secs) for a given rake task..??</p>