Class: Central::Devtools::Flay::Scale

Inherits:
Object
  • Object
show all
Includes:
Adamantium
Defined in:
lib/central/devtools/flay.rb

Overview

Measure flay mass relative to size of duplicated sexps

Instance Method Summary collapse

Instance Method Details

#flay_reportundefined

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Report flay output

Returns:

  • (undefined)


26
27
28
# File 'lib/central/devtools/flay.rb', line 26

def flay_report
  flay.report
end

#measureArray<Rational>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Measure duplication mass

Returns:

  • (Array<Rational>)


16
17
18
19
20
# File 'lib/central/devtools/flay.rb', line 16

def measure
  flay.masses.map do |hash, mass|
    Rational(mass, flay.hashes.fetch(hash).size)
  end
end