Sha256: b49da03fdf3b094ee827bcbc8f97af9c993bfd4e95b8a493d1ada27efdcd80a9

Contents?: true

Size: 715 Bytes

Versions: 15

Compression:

Stored size: 715 Bytes

Contents

#!/usr/bin/env ruby -s
# -*- coding: utf-8 -*-

# Usage:
# > ruby test/profile.rb
# > pprof.rb --gif /tmp/axlsx_noautowidth > /tmp/axlsx_noautowidth.gif
# > open /tmp/axlsx_noautowidth.gif

$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'axlsx'
require 'csv'

# require 'benchmark'
require 'perftools'
row = []
input = (32..126).to_a.pack('U*').chars.to_a
20.times { row << input.shuffle.join}
times = 3000

PerfTools::CpuProfiler.start("/tmp/axlsx_noautowidth") do
  p = Axlsx::Package.new
  p.use_autowidth = false
  p.use_shared_strings = true
  wb = p.workbook
  
  #A Simple Workbook
  
  wb.add_worksheet do |sheet|
    times.times do
      sheet << row
    end
  end
  p.serialize("example.xlsx")
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
axlsx-1.3.3 test/profile.rb
axlsx-1.3.2 test/profile.rb
axlsx-1.3.1 test/profile.rb
axlsx-1.2.3 test/profile.rb
axlsx-1.2.2 test/profile.rb
axlsx-1.2.1 test/profile.rb
axlsx-1.2.0 test/profile.rb
axlsx-1.1.8 test/profile.rb
axlsx-1.1.7 test/profile.rb
axlsx-1.1.6 test/profile.rb
axlsx-1.1.5 test/profile.rb
axlsx-1.1.4 test/profile.rb
axlsx-1.1.3 test/profile.rb
axlsx-1.1.2 test/profile.rb
axlsx-1.1.1 test/profile.rb