Class: Hashira::Report::HotspotTable

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/report/hotspot_table.rb

Constant Summary collapse

TOP =
10
ROW =
"%-46s %5s %5s %6s %7s"

Instance Method Summary collapse

Constructor Details

#initialize(hotspots, io: $stdout) ⇒ HotspotTable

Returns a new instance of HotspotTable.



7
8
9
10
# File 'lib/hashira/report/hotspot_table.rb', line 7

def initialize(hotspots, io: $stdout)
  @hotspots = hotspots
  @io = io
end

Instance Method Details



12
13
14
15
16
17
# File 'lib/hashira/report/hotspot_table.rb', line 12

def print
  return if ranked.empty?
  heading
  rows
  legend
end