lib/heap_profiler/results.rb in heap-profiler-0.6.0 vs lib/heap_profiler/results.rb in heap-profiler-0.7.0

- old
+ new

@@ -82,11 +82,13 @@ @colorize = color_output ? Polychrome : Monochrome analyzer = Analyzer.new(heap, index) dimensions = analyzer.run(@metrics, @groupings) - io.puts "Total: #{scale_bytes(dimensions['total'].memory)} " \ - "(#{dimensions['total'].objects} objects)" + if dimensions['total'] + io.puts "Total: #{scale_bytes(dimensions['total'].memory)} " \ + "(#{dimensions['total'].objects} objects)" + end @metrics.each do |metric| next unless GROUPED_METRICS.include?(metric) @groupings.each do |grouping| dump_data(io, dimensions, metric, grouping, options)