Commit 160ae11feb1b29397f7ad36348bd3dd9e1c71bfe

Authored by Andrew Kane
1 parent ffaf8284

Better benchmark [skip ci]

Showing 1 changed file with 6 additions and 4 deletions   Show diff stats
benchmark/benchmark.rb
... ... @@ -23,7 +23,7 @@ puts "Imported"
23 23  
24 24 result = nil
25 25  
26   -p GetProcessMem.new.mb
  26 +# p GetProcessMem.new.mb
27 27  
28 28 time =
29 29 Benchmark.realtime do
... ... @@ -33,14 +33,16 @@ time =
33 33 # end
34 34 end
35 35  
36   -p GetProcessMem.new.mb
  36 +# p GetProcessMem.new.mb
37 37  
38 38 puts time.round(1)
39 39 puts Product.searchkick_index.total_docs
40 40  
41 41 # puts result.allocations(alias_paths: true).group_by(:sourcefile, :class).to_text
42 42  
43   -# printer = RubyProf::GraphPrinter.new(result)
44   -# printer.print(STDOUT, min_percent: 2)
  43 +if result
  44 + printer = RubyProf::GraphPrinter.new(result)
  45 + printer.print(STDOUT, min_percent: 2)
  46 +end
45 47  
46 48 # puts Product.count
... ...