Class: Devtools::Flay::Scale

Inherits:
Object
  • Object
show all
Includes:
Adamantium
Defined in:
lib/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)


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

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>)


14
15
16
17
18
# File 'lib/devtools/flay.rb', line 14

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