[Collab-qa-commits] r290 - archive-rebuilds debcluster
lucas at alioth.debian.org
lucas at alioth.debian.org
Wed Jul 4 14:21:14 UTC 2007
Author: lucas
Date: 2007-07-04 14:21:14 +0000 (Wed, 04 Jul 2007)
New Revision: 290
Added:
archive-rebuilds/compare-results.rb
Modified:
debcluster/Notes
Log:
added archive-rebuilds/compare-results.rb ; minor changes to debcluster/Notes
Added: archive-rebuilds/compare-results.rb
===================================================================
--- archive-rebuilds/compare-results.rb (rev 0)
+++ archive-rebuilds/compare-results.rb 2007-07-04 14:21:14 UTC (rev 290)
@@ -0,0 +1,74 @@
+#!/usr/bin/ruby -w
+# Script to compare two result files (res.* files)
+
+lists = []
+pkgs = {}
+ARGV.each do |f|
+ lists << f
+ pkgs[f] = {}
+ IO::read(f).each_line do |l|
+ s = l.split(' ', 5)
+ if s[4].nil? or s[4] == ''
+ err = '-'
+ else
+ err = s[4].chomp
+ end
+ pkgs[f][s[0]] = [ s[1], s[2], s[3].to_i, err ]
+ end
+end
+f1 = lists[0]
+f2 = lists[1]
+
+def difftime(a, b)
+ m = [a, b].min
+ m = 0.1 if m == 0
+ m = m.to_f
+ ratio = (a - b).abs
+ if m < 30
+ p = 0.4
+ elsif m < 100
+ p = 0.3
+ elsif m < 300
+ p = 0.2
+ else
+ p = 0.1
+ end
+ if (ratio/m) >= p
+ return true
+ else
+ return false
+ end
+end
+
+(pkgs[f1].keys + pkgs[f2].keys).sort.uniq.each do |pkg|
+ pkgs[f1][pkg] = ['-', '-', 0, '-'] if pkgs[f1][pkg].nil?
+ pkgs[f2][pkg] = ['-', '-', 0, '-'] if pkgs[f2][pkg].nil?
+
+ s = "#{pkg} #{pkgs[f1][pkg][0]} #{pkgs[f2][pkg][0]} "
+ if pkgs[f1][pkg][0] == pkgs[f2][pkg][0]
+ s += "SAMEVER "
+ else
+ s += "DIFFVER "
+ end
+ s += "#{pkgs[f1][pkg][1]} #{pkgs[f2][pkg][1]} "
+ if pkgs[f1][pkg][1] == pkgs[f2][pkg][1]
+ s += "SAMERES "
+ else
+ s += "DIFFRES "
+ end
+ s += "#{pkgs[f1][pkg][2]} #{pkgs[f2][pkg][2]} "
+ if not difftime(pkgs[f1][pkg][2],pkgs[f2][pkg][2])
+ s += "SAMETIME "
+ else
+ t1 = pkgs[f1][pkg][2]
+ t2 = pkgs[f2][pkg][2]
+ s += "DIFFTIME(#{(t1.to_f/t2.to_f)})"
+ end
+ s += "#{pkgs[f1][pkg][3]} #{pkgs[f2][pkg][3]} "
+ if pkgs[f1][pkg][3] == pkgs[f2][pkg][3]
+ s += "SAMEEXP "
+ else
+ s += "DIFFEXP "
+ end
+ puts s
+end
Property changes on: archive-rebuilds/compare-results.rb
___________________________________________________________________
Name: svn:executable
+ *
Modified: debcluster/Notes
===================================================================
--- debcluster/Notes 2007-07-04 12:31:05 UTC (rev 289)
+++ debcluster/Notes 2007-07-04 14:21:14 UTC (rev 290)
@@ -25,6 +25,10 @@
rebuild-archive/gentasklist.rb $CHROOT $ID < /tmp/wb_$ID.3 | bogosort -n > /tmp/tasklisttext_$ID
echo "Tasklist (in text) is /tmp/tasklisttext_$ID"
+# vorlon build-arch
+sed -i "s/buildpackage.rb -p/buildpackage.rb --ba -p/" /tmp/tasklisttext_$ID
+sed -i "s/-c sid32 /-c sid32-ba /" /tmp/tasklisttext_$ID
+#
# buxy
sed -i "s/$/ --backup \/debcluster-data\/results\/$ID/" /tmp/tasklisttext_$ID
sed -i 's/-c sid32 /-c sid32-sym /' /tmp/tasklisttext_$ID
More information about the Collab-qa-commits
mailing list