mutter/tests/performance/makejobs.rb
Øyvind Kolås aa05b66a01 tests: Add performance tracking framework
This adds a performance tracking framework that can run a set of tests over
specified git revisions. The ruby script for generating the reports comes from
similar performance tracking in GEGL. The framework permits evaluating new
tests against older version of clutter.

The tests themselves go through a few hoops for disabling framerate limiting in
both mesa and clutter.

When running make check the tests will be run and lines of the form:

@ test-state: 40.51 fps

will be left in the output, a script can scrape these lines out of a build log
on a buildbot to in other ways track performance.
2011-07-04 17:27:48 +01:00

25 lines
592 B
Ruby
Executable File

#!/usr/bin/env ruby
# this ruby script generates a chronologically sorted
res = ""
input = File.read(ARGV[0])
input = input.gsub(/#.*/, "")
input.split("\n").each {|a|
if a =~ /([^ ]*)\.\.([^ ]*) %(.*)/
res += `git log #{$1}..#{$2} | grep '^commit' | sed 's/commit //' | sed -n '0~#{$3}p'`
elsif a =~ /([^ ]*)\.\.([^ ]*)/
res += `git log #{$1}..#{$2} | grep '^commit' | sed 's/commit //'`
else
res += `echo #{a}`
end
}
all = `git log | grep '^commit' | sed 's/commit//' `
all.split("\n").reverse.each {|a|
if res.match(a.strip) != nil
puts "#{a.strip}"
end
}