Skip to content

Commit

Permalink
Add optional logging to Worker#measure
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Kosmatov committed Nov 9, 2017
1 parent 9788c3d commit 2dec6bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/sidekiq-benchmark/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def measure(name)
self[name] ||= 0.0
self[name] += t1 - t0

Sidekiq.logger.info "Benchmark #{name}: #{t1 - t0} sec." if @options[:log]

ret
end
alias_method :bm, :measure
Expand Down

0 comments on commit 2dec6bd

Please sign in to comment.