diff --git a/examples/leak.rb b/examples/leak.rb deleted file mode 100644 index 21ba3721..00000000 --- a/examples/leak.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Making sure we do not leak memory - -require 'sidekiq' - -$c = 0 -$max = 10_000 - -# Start up sidekiq via -# ./bin/sidekiq -r ./examples/leak.rb > /dev/null -class MyWorker - include Sidekiq::Worker - - def perform - $c += 1 - if $c % 100 == 0 - GC.start - memory = `ps -o rss -p #{Process.pid}`.chomp.split("\n").last.to_i - $stderr.puts "Using memory #{memory}" - end - if $c >= $max - exit - end - end -end - -# schedule some jobs to work on -$max.times { MyWorker.perform_async }