6 $first_date = ENV['DATE'] || "2007-11-01"
9 require 'rakelib/git_task'
11 desc "Collect statistics for the project"
12 task :collect => [$git_dir]
16 task $git_dir => $stats_dir do
17 unless test ?d, $git_dir then
19 Dir.chdir $stats_dir do
20 sh "git clone -q #{parent} proj"
25 git_task "size" do |f, date|
27 Find.find '.' do |file|
28 next unless test ?f, file
29 stats[File.extname(file)] += 1
34 git_task "flog" do |f, date|
35 f.puts `flog -c kernel 2>&1`
38 git_task "spec" do |f, date|
39 # all these extra convolutions are to try to protect us from
40 # stupid specs that kill the parent process.
43 # HACK: this will allow us to get clean runs w/o much hassle... replace later
44 rm_rf "spec/ruby/1.8/core/process"
46 IO.popen "(time ./bin/ci -f s) 2>&1" do |p|
54 git_task "zbuild" do |f, date| # keep this alphabetically last
57 IO.popen "(rake clean && time rake) 2>&1" do |p|
65 # This allows the dates to interleave, causing less churn
66 Rake::Task["collect"].prerequisites.sort!
67 Rake::Task["collect"].prerequisites.reverse!