File: rubyprof

package info (click to toggle)
jekyll 3.1.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,820 kB
  • ctags: 997
  • sloc: ruby: 10,045; sh: 145; xml: 59; makefile: 28
file content (19 lines) | stat: -rwxr-xr-x 456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

export BENCHMARK=1

TEST_SCRIPT="Jekyll::Commands::Build.process({'source' => 'site'})"

RUBY=$(cat <<RUBY
  require 'ruby-prof'
  result = RubyProf.profile{ ${TEST_SCRIPT} }
  printer = RubyProf::CallTreePrinter.new(result)
  filename = "tmp/ruby_prof_#{rand 10000}"
  puts "Writing profile to #{filename}"
  file = File.open(filename, "w")
  printer.print(file, {})
  file.close
RUBY
)

bundle exec ruby -r ./lib/jekyll -e "${RUBY}"