prawnpdf/prawn

View on GitHub
bench/png_type_6.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

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

N = 100

Benchmark.bmbm do |x|
  x.report('PNG Type 6') do
    N.times do
      Prawn::Document.new do
        image("#{Prawn::DATADIR}/images/dice.png")
      end.render_file('dice.pdf')
    end
  end
end