File: profile.rb

package info (click to toggle)
ruby-jsonify 0.4.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: ruby: 748; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 301 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'bundler'
require 'bundler/setup'
require 'jsonify'
require 'ruby-prof'

result = RubyProf.profile do
  1.times do
    json=Jsonify::Builder.new
    json.hello 'world'
    json.compile!
  end
end

# Print a flat profile to text
printer = RubyProf::FlatPrinter.new(result)
printer.print(STDOUT)