Sha256: 8082e9d9033a866f5b63a9ac7f05096379bb9b88f29c3ad817981b17e4c5419c
Contents?: true
Size: 886 Bytes
Versions: 1
Compression:
Stored size: 886 Bytes
Contents
require 'ruby-prof' require 'osheet' class OsheetProfilerRunner attr_reader :result def initialize(n) RubyProf.measure_mode = RubyProf::MEMORY @result = RubyProf.profile do Osheet::Workbook.new { title "basic" worksheet { name "one dollar" 5.times { column } 1000.times do row { [1, "text", 123.45, "0001267", "$45.23"].each do |data_value| cell { data data_value } end } end } }.to_file('./bench/profiler_1000.xls', :pp => 2) end end def print_flat(outstream, opts={}) RubyProf::FlatPrinter.new(@result).print(outstream, opts) #RubyProf::GraphPrinter.new(@result).print(outstream, opts) end def print_graph(outstream, opts={}) RubyProf::GraphPrinter.new(@result).print(outstream, opts) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
osheet-1.0.0.rc.1 | bench/profiler_runner.rb |