Commit 662a6f42fd09ed2cf4114a5bee0cb14fcb0edd51
1 parent
ac2e00c2
Exists in
master
and in
18 other branches
Updated benchmark [skip ci]
Showing
1 changed file
with
8 additions
and
6 deletions
Show diff stats
benchmark/benchmark.rb
... | ... | @@ -49,18 +49,20 @@ result = nil |
49 | 49 | report = nil |
50 | 50 | stats = nil |
51 | 51 | |
52 | -# p GetProcessMem.new.mb | |
53 | - | |
54 | 52 | Product.searchkick_index.delete rescue nil |
55 | 53 | |
54 | +GC.start | |
55 | +GC.disable | |
56 | +start_mem = GetProcessMem.new.mb | |
57 | + | |
56 | 58 | time = |
57 | 59 | Benchmark.realtime do |
58 | 60 | # result = RubyProf.profile do |
59 | - report = MemoryProfiler.report do | |
61 | + # report = MemoryProfiler.report do | |
60 | 62 | # stats = AllocationStats.trace do |
61 | 63 | reindex = Product.reindex #(async: true) |
62 | - p reindex | |
63 | - end | |
64 | + # p reindex | |
65 | + # end | |
64 | 66 | |
65 | 67 | # 60.times do |i| |
66 | 68 | # if reindex.is_a?(Hash) |
... | ... | @@ -78,7 +80,7 @@ time = |
78 | 80 | # end |
79 | 81 | end |
80 | 82 | |
81 | -# p GetProcessMem.new.mb | |
83 | +p GetProcessMem.new.mb - start_mem | |
82 | 84 | |
83 | 85 | puts time.round(1) |
84 | 86 | ... | ... |