Class: Bixby::Bench::Report
- Inherits:
-
Object
- Object
- Bixby::Bench::Report
- Defined in:
- lib/bixby/bench/report.rb
Instance Attribute Summary collapse
-
#allocation_stats ⇒ Object
Returns the value of attribute allocation_stats.
-
#tms ⇒ Object
Returns the value of attribute tms.
Instance Method Summary collapse
Instance Attribute Details
#allocation_stats ⇒ Object
Returns the value of attribute allocation_stats.
5 6 7 |
# File 'lib/bixby/bench/report.rb', line 5 def allocation_stats @allocation_stats end |
#tms ⇒ Object
Returns the value of attribute tms.
5 6 7 |
# File 'lib/bixby/bench/report.rb', line 5 def tms @tms end |
Instance Method Details
#print ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/bixby/bench/report.rb', line 7 def print if @allocation_stats then format = Benchmark::FORMAT.gsub(/\n$/, '') + " %16d %12d\n" allocations = allocation_stats.allocations.all.size memsize = allocation_stats.allocations.bytes.to_a.inject(&:+) puts @tms.format(format, allocations, memsize) else puts @tms end end |