Class: Hashira::Report::MetricsTable

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

Constant Summary collapse

TOP =
25
HEADERS =
%w[package TC Ca Ce I Cyc].freeze

Instance Method Summary collapse

Constructor Details

#initialize(graph, top: TOP, io: $stdout) ⇒ MetricsTable

Returns a new instance of MetricsTable.



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

def initialize(graph, top: TOP, io: $stdout)
  @graph = graph
  @top = top
  @io = io
end

Instance Method Details



14
15
16
17
18
19
# File 'lib/hashira/report/metrics_table.rb', line 14

def print
  Hashira::Report::Columns.new(HEADERS, kept.map { |package, metric| row(package, metric) }, io: @io).print
  note unless spared.empty?
  more unless over.zero?
  legend
end