Sha256: 42e0090d535952267d4aa3694579dc77fe6a2ad5022018afd5b6d4e8a6f5664a

Contents?: true

Size: 540 Bytes

Versions: 1

Compression:

Stored size: 540 Bytes

Contents

require 'memprof2'

##############
Memprof2.start
12.times{ "abc" }
Memprof2.report
Memprof2.stop


##############
Memprof2.start
10.times{ $last_str = "abc" }

puts '=== Before GC'
Memprof2.report

puts '=== After GC'
GC.start
Memprof2.report

Memprof2.stop

#############
Memprof2.run do
  100.times{ "abc" }
  100.times{ 1.23 + 1 }
  100.times{ Module.new }
  Memprof2.report(out: "example.out")
end

############
Memprof2.run_with_report(out: "example.out") do
  100.times{ "abc" }
  100.times{ 1.23 + 1 }
  100.times{ Module.new }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
memprof2-0.1.2 example.rb