Sha256: 7b8c71983f7921cc148cab8fd690f1dafdab156471e6247300ce9a1cc7a4e137

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require "prawn"        
require "benchmark"    

N=2000
  
Benchmark.bmbm do |x|         
  x.report("AFM text") do
    Prawn::Document.new {  
      N.times do                                     
        (1..5).each do |i|
          text "Hello Prawn", :at => [200, i * 100]
        end 
        start_new_page     
      end  
    }.render             
  end   
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prawn-layout-0.3.2 vendor/prawn-core/bench/afm_text_bench.rb
prawn-layout-0.3.1 vendor/prawn-core/bench/afm_text_bench.rb