Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f43d14017ffd
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7bbbb0718e78
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Mar 26, 2016

  1. Copy the full SHA
    8e71795 View commit details

Commits on Mar 27, 2016

  1. Copy the full SHA
    7bbbb07 View commit details
Showing with 9 additions and 10 deletions.
  1. +9 −10 tool/truffle/bisect.rb
19 changes: 9 additions & 10 deletions tool/truffle/bisect.rb
Original file line number Diff line number Diff line change
@@ -13,10 +13,11 @@
Then choose a THRESHOLD (between the number from the compare and 100%) and
$ git bisect start BADCOMMIT GOODCOMMIT
$ git bisect run ruby tool/truffle-bisect.rb BENCH THRESHOLD
$ git bisect run ruby tool/truffle/bisect.rb BENCH THRESHOLD
=end

def jt(cmd)
puts "jt #{cmd}"
cmd = "ruby tool/jt.rb #{cmd}"
output = `#{cmd}`
raise "#{cmd} failed: #{$?}" unless $?.success?
@@ -31,26 +32,24 @@ def jt(cmd)
bench = String(ARGV[0])
threshold = Integer(ARGV[1])

jt 'build' rescue nil
unless $?.success?
puts "Normal build failed, doing a rebuild"
begin
jt 'rebuild'
rescue
puts "rebuild failed, skipping revision"
exit 125
end

output = (jt("bench compare #{bench}") rescue nil)
unless $?.success?
puts "Benchmark failed, trying a rebuild"
jt 'rebuild'
output = jt("bench compare #{bench}")
end
output = jt("bench compare #{bench}")

/^#{Regexp.escape bench} (\d+)\./ =~ output
raise "Unexpected output:\n#{output}" unless $1
percents = Integer($1)
puts percents

if percents < threshold
puts "bad"
exit 1
else
puts "good"
exit 0
end