File: build_data.rb

package info (click to toggle)
ruby-haml 7.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,996 kB
  • sloc: ruby: 9,939; sh: 23; makefile: 11
file content (14 lines) | stat: -rwxr-xr-x 337 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env ruby

require 'bundler/setup'
require 'haml'
require 'benchmark/ips'
require_relative '../utils/benchmark_ips_extension'

h = { 'user' => { id: 1234, name: 'k0kubun' }, book_id: 5432 }

Benchmark.ips do |x|
  quote = "'"
  x.report("Haml.build_data") { Haml::AttributeBuilder.build_data(true, quote, h) }
  x.compare!
end