blob: 7b6718315b5e57c60e1913007d32f6aaf9984b4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/env ruby -s
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
require 'axlsx'
require 'ruby-prof'
# RubyProf.measure_mode = RubyProf::MEMORY
#
row = []
# Taking worst case scenario of all string data
input = (32..126).to_a.pack('U*').chars.to_a
20.times { row << input.shuffle.join }
profile = RubyProf.profile do
p = Axlsx::Package.new
p.workbook.add_worksheet do |sheet|
10_000.times do
sheet << row
end
end
p.to_stream
end
printer = RubyProf::FlatPrinter.new(profile)
printer.print($stdout, {})
|