Sha256: c48b992f1ea0c6e98d02be6cf574750e1d101dbaf638d9bd96c946bab041bcd1

Contents?: true

Size: 581 Bytes

Versions: 5

Compression:

Stored size: 581 Bytes

Contents

require_relative '../lib/fast_excel'
require 'ruby-prof'

DATA = []
1000.times do |n|
  DATA << [n, "String string #{n}", (n * rand * 10).round, Time.at(n * 1000 + 1492922688)]
end

RubyProf.start

100.times do
  workbook = FastExcel.open(constant_memory: true)
  worksheet = workbook.add_worksheet("benchmark")
  worksheet.auto_width = true

  DATA.each_with_index do |row, i|
    worksheet.write_row(i + 1, row)
  end
  workbook.read_string

  print '.'
end
result = RubyProf.stop

# print a flat profile to text
printer = RubyProf::FlatPrinter.new(result)
printer.print(STDOUT)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fast_excel-0.5.0 benchmarks/profiler.rb
fast_excel-0.4.1 benchmarks/profiler.rb
fast_excel-0.4.0 benchmarks/profiler.rb
fast_excel-0.3.0 benchmarks/profiler.rb
fast_excel-0.2.6 benchmarks/profiler.rb