Sha256: 18e63eff2114d54c0c4d6e9cc27adf28934d661c3d2ec5196efecf463edc824c

Contents?: true

Size: 506 Bytes

Versions: 2

Compression:

Stored size: 506 Bytes

Contents

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

N=2000
  
Benchmark.bmbm do |x|         
  x.report("TTF text") do
    Prawn::Document.new {  
       font "#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"     
       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/ttf_text_bench.rb
prawn-layout-0.3.1 vendor/prawn-core/bench/ttf_text_bench.rb