Skip to content

Commit

Permalink
Use "publish" instead of "notification"
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jan 8, 2014
1 parent 699fdf4 commit e6721fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions benchmark/watch/benchmark-notify.rb
Expand Up @@ -54,11 +54,11 @@ def run
do_feed("#{WATCHING_KEYWORD} #{index}")
end

notifications = []
while notifications.size != @n_times
notifications << @receiver.new_message
published_messages = []
while published_messages.size != @n_times
published_messages << @receiver.new_message
end
notifications
published_messages
end

def add_subscribers(n_subscribers)
Expand Down Expand Up @@ -118,8 +118,8 @@ def do_feed(target)
percentage = nil
result = Benchmark.bm do |benchmark|
benchmark.report(label) do
sent_notifications = notify_benchmark.run
percentage = sent_notifications.size.to_f / options[:n_times] * 100
published_messages = notify_benchmark.run
percentage = published_messages.size.to_f / options[:n_times] * 100
end
end
puts "=> #{percentage} % feeds are notified"
Expand Down

0 comments on commit e6721fe

Please sign in to comment.