Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
use Metriks.timer(...).time(&block) as suggested by @eric
Browse files Browse the repository at this point in the history
  • Loading branch information
svenfuchs committed Dec 10, 2012
1 parent 225172d commit 4916e63
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/travis/model/artifact/log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ def filter(chars)

# TODO should be done by Travis::LogSubscriber::ActiveRecordMetrics but i can't get it
# to be picked up outside of rails
def meter
started = Time.now
yield
duration = Time.now - started
Metriks.timer('active_record.log_updates').update(Time.now - started)
def meter(&block)
Metriks.timer('active_record.log_updates').time(&block)
end
end

Expand Down

0 comments on commit 4916e63

Please sign in to comment.