Permalink
Browse files

Base pass rate on examples rather than expectations, don't weigh Iron…

…Ruby's pass-rate against MRI, remove files and expectations from the RubySpec output, and don't run throughput/startup tests as they aren't used.
  • Loading branch information...
unknown
unknown committed Jan 26, 2010
1 parent 3bcf15c commit eb029e3233044a66456ab09860aa6eda77a02b38
Showing with 59 additions and 50 deletions.
  1. +5 −10 app.rb
  2. +17 −0 init.bat
  3. +4 −9 stats.bat
  4. +33 −18 stats.rb
  5. BIN views/.index.haml.swp
  6. BIN views/.mspec.haml.swp
  7. +0 −13 views/mspec.haml
View
15 app.rb
@@ -1,5 +1,7 @@
File.open(File.dirname(__FILE__) + '/data/pid1', 'w'){ |f| f.print Process.pid }
+$: << File.expand_path(File.dirname(__FILE__))
+
require 'rubygems'
require 'sinatra'
require 'haml'
@@ -45,15 +47,15 @@ def green_or_red(data, append = "")
end
def total_pass_rate(comp, ref)
- ((comp[:expectations].to_i - comp[:failures].to_i - comp[:errors].to_i).to_f / ref[:expectations].to_i).round_to(4)
+ ((comp[:examples].to_i - comp[:failures].to_i - comp[:errors].to_i).to_f / comp[:examples].to_i).round_to(4)
end
def grand_total_pass_rate(stats, comp = :ironruby)
totals = {
comp => {},
:ruby => {}
}
- types = [:expectations, :failures, :errors]
+ types = [:expectations, :failures, :errors, :examples]
specs = [:library, :core, :language]
totals.each do |lang,_|
@@ -80,17 +82,10 @@ def mb(bytes)
get '/' do
stats = nil
- File.open(Dir['data/data-*.dat'].sort.last, "rb") do |f|
+ File.open(Dir[File.dirname(__FILE__) + '/data/data-*.dat'].sort.last, "rb") do |f|
@modification_time = f.mtime
stats = Marshal.load(f)
end
-
- # FIXME Offset the library ruby expection number by 2300, since
- # we're not taking into account ruby_bug guards in our numbers,
- # and that's how many expectations IronRuby runs more that MRI
- stats[:mspec_library][:ruby][:expectations] += 2300
- stats[:mspec_library][:delta][:expectations] += 2300
-
haml :index, :locals => {:stats => stats}
end
View
@@ -0,0 +1,17 @@
+set REPO=c:\dev\vsl1s_irstats
+call %REPO%\Merlin\Main\Scripts\Bat\Dev.bat
+pushd %MERLIN_ROOT%
+pushd ..
+echo Cleaning repo
+tf undo . /recursive /noprompt
+tfpt uu /recursive .
+tfpt treeclean . /noprompt /recursive
+msbuild %MERLIN_ROOT%\Languages\Ruby\Ruby.sln /t:Clean
+echo Getting latest sources
+tf get
+tf unshelve rubytags-2010-01-22;jimmysch /noprompt
+popd
+set GEM_HOME=%GEM_PATH%
+set PATH=%MERLIN_ROOT%\..\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p368\bin;%PATH%
+set RUBY=%MERLIN_ROOT%\..\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p368\bin\ruby.exe
+%RUBY% -S gem install sinatra --no-ri --no-rdoc
View
@@ -1,10 +1,5 @@
-set REPO=c:\dev\vsl1s_irstats
-call %REPO%\Merlin\Main\Scripts\Bat\Dev.bat
-pushd %MERLIN_ROOT%
-tf get
-tf unshelve rubytags-2010-01-22;jimmysch /noprompt
-set GEM_HOME=%GEM_PATH%
-set RUBY=%MERLIN_ROOT%\..\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p368\bin\ruby.exe
+call %~dp0init.bat
+echo Cleaning stats
%RUBY% %~dp0stats.rb --clean
-%RUBY% %~dp0stats.rb --all
-popd
+echo Running stats
+%RUBY% %~dp0stats.rb --all 1> %~dp0data\lastrun.log 2>&1
View
@@ -80,9 +80,9 @@ def mri(file, opts = nil)
end
def build
- print "Building IronRuby ... "
+ print "Building IronRuby (release mode) ... "
result = Benchmark.measure do
- FileUtils.cd(RB) { system "msbuild Ruby.sln /p:Configuration=Release /v:m /nologo > #{DATA.to_dos}\\compile.log 2>&1" }
+ FileUtils.cd(RB) { system "msbuild Ruby.sln /p:Configuration=Release /nologo > #{DATA.to_dos}\\compile.log 2>&1" }
end
puts "done"
result.real
@@ -99,9 +99,17 @@ def working_set
working_set = 0
begin
t = Thread.new{ system "#{IR.to_dos} #{to_dos "#{CD}/getpid.rb"}" }
- puts "Letting IronRuby run for 5 seconds..."
- sleep(5)
- puts "Getting working set"
+ print "Running for 5 seconds to get working set "
+ count, done = 0, 4
+ loop { sleep(1); print '.'; break if (count += 1) > done }
+ count, timeout = 0, 19
+ loop do
+ break if File.exist?("#{DATA}/pid")
+ raise "Timeout getting working set" if (count += 1) > timeout
+ sleep(1)
+ print '.'
+ end
+ puts ' found'
pid = File.open("#{DATA}/pid".to_dos, 'r'){|f| f.read }.to_i
processes = WIN32OLE.connect("winmgmts://").ExecQuery(
"select * from win32_process where ProcessId = #{pid}")
@@ -272,13 +280,13 @@ def report_repo
github_size
end
- def report_startup
- startup_time
- end
+ #def report_startup
+ # startup_time
+ #end
- def report_throughput
- throughput
- end
+ #def report_throughput
+ # throughput
+ #end
def report_working_set
working_set
@@ -360,13 +368,19 @@ def _kill(pidfile, t = nil)
end
def _upload_html(filename, indexfile)
- print "Uploading ironruby.info homepage ... "
+ print "Connecting to ironruby.info ... "
require 'net/ftp'
ftp = Net::FTP.new("ironruby.com")
ftp.login('ironruby', _get_pswd)
+ ftp.passive = true
ftp.chdir('info')
+ puts 'done'
+ print "Uploading #{filename} to http://ironruby.info/#{File.basename(filename)} ... "
ftp.puttextfile filename
+ puts 'done'
+ print "Uploading #{indexfile} to http://ironruby.info/#{File.basename(indexfile)} ... "
ftp.puttextfile indexfile
+ puts 'done'
end
def _get_pswd
@@ -416,13 +430,13 @@ def report_repo
"Github repo size: #{mb(data)} MB\n"
end
- def report_startup
- "Startup time: #{data.map{|k,v| "#{k}(#{v} s)"}.join(", ")}\n"
- end
+ #def report_startup
+ # "Startup time: #{data.map{|k,v| "#{k}(#{v} s)"}.join(", ")}\n"
+ #end
- def report_throughput
- "Throughput: (100000 iterations): #{data.map{|k,v| "#{k}(#{v} s)"}.join(", ")}\n"
- end
+ #def report_throughput
+ # "Throughput: (100000 iterations): #{data.map{|k,v| "#{k}(#{v} s)"}.join(", ")}\n"
+ #end
def report_working_set
"Working set: #{mb data} MB\n"
@@ -525,4 +539,5 @@ def usage
end
end
+ puts "SUCCESS!"
end
View
Binary file not shown.
View
Binary file not shown.
View
@@ -7,24 +7,11 @@
%td
No data
- else
- %tr
- %th files
- %td{:colspan => 2}= data mspec[:ironruby][:files]
- %td{:colspan => 1}= data mspec[:ruby][:files]
- %td= green_or_red -1 * mspec[:delta][:files]
%tr
%th examples
%td{:colspan => 2}= data mspec[:ironruby][:examples]
%td{:colspan => 1}= data mspec[:ruby][:examples]
%td= green_or_red -1 * mspec[:delta][:examples]
- %tr
- %th expectations
- %td{:colspan => 2}= data mspec[:ironruby][:expectations]
- %td{:colspan => 1}
- %span= data mspec[:ruby][:expectations]
- - if title == "Library"
- %a{:href => 'javascript:void(0)', :onclick => "alert('The Ruby exceptions number is inflated by 2300, because RubySpec does not run that number of tests on Ruby, but will run on IronRuby. This prevents the IronRuby pass-rate for libraries from looking inflated.')"} ?
- %td= green_or_red -1 * mspec[:delta][:expectations]
%tr
%th failures
%td{:colspan => 2}= mspec[:ironruby][:failures]

0 comments on commit eb029e3

Please sign in to comment.