From 6ef1619d2ba8fce74e6b8d0076e3f7fb3e84b804 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 2 Mar 2018 15:22:01 -0800 Subject: [PATCH] Updated benchmark [skip ci] --- benchmark/benchmark.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/benchmark/benchmark.rb b/benchmark/benchmark.rb index 2732677..389690a 100644 --- a/benchmark/benchmark.rb +++ b/benchmark/benchmark.rb @@ -49,18 +49,20 @@ result = nil report = nil stats = nil -# p GetProcessMem.new.mb - Product.searchkick_index.delete rescue nil +GC.start +GC.disable +start_mem = GetProcessMem.new.mb + time = Benchmark.realtime do # result = RubyProf.profile do - report = MemoryProfiler.report do + # report = MemoryProfiler.report do # stats = AllocationStats.trace do reindex = Product.reindex #(async: true) - p reindex - end + # p reindex + # end # 60.times do |i| # if reindex.is_a?(Hash) @@ -78,7 +80,7 @@ time = # end end -# p GetProcessMem.new.mb +p GetProcessMem.new.mb - start_mem puts time.round(1) -- libgit2 0.21.0