Permalink
Browse files

updated

  • Loading branch information...
authorNari committed Oct 13, 2012
0 parents commit 289fc8138d1f6a906d9b4686143cddf38f1e7363
Showing with 3,174 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +19 −0 README.md
  3. 0 Rakefile
  4. +29 −0 bm-make-graph.sh
  5. +41 −0 bm-merge.rb
  6. +41 −0 bm-run.sh
  7. +3 −0 config.rb.sample
  8. +33 −0 dest/app_answer.plot
  9. BIN dest/app_answer.png
  10. +33 −0 dest/app_erb.plot
  11. BIN dest/app_erb.png
  12. +33 −0 dest/app_factorial.plot
  13. BIN dest/app_factorial.png
  14. +33 −0 dest/app_fib.plot
  15. BIN dest/app_fib.png
  16. +33 −0 dest/app_mandelbrot.plot
  17. BIN dest/app_mandelbrot.png
  18. +33 −0 dest/app_pentomino.plot
  19. BIN dest/app_pentomino.png
  20. +33 −0 dest/app_raise.plot
  21. BIN dest/app_raise.png
  22. +33 −0 dest/app_strconcat.plot
  23. BIN dest/app_strconcat.png
  24. +33 −0 dest/app_tak.plot
  25. BIN dest/app_tak.png
  26. +33 −0 dest/app_tarai.plot
  27. BIN dest/app_tarai.png
  28. +33 −0 dest/app_uri.plot
  29. BIN dest/app_uri.png
  30. +33 −0 dest/io_file_create.plot
  31. BIN dest/io_file_create.png
  32. +33 −0 dest/io_file_read.plot
  33. BIN dest/io_file_read.png
  34. +33 −0 dest/io_file_write.plot
  35. BIN dest/io_file_write.png
  36. +33 −0 dest/io_select.plot
  37. BIN dest/io_select.png
  38. +33 −0 dest/io_select2.plot
  39. BIN dest/io_select2.png
  40. +33 −0 dest/io_select3.plot
  41. BIN dest/io_select3.png
  42. +33 −0 dest/loop_for.plot
  43. BIN dest/loop_for.png
  44. +33 −0 dest/loop_generator.plot
  45. BIN dest/loop_generator.png
  46. +33 −0 dest/loop_times.plot
  47. BIN dest/loop_times.png
  48. +33 −0 dest/loop_whileloop.plot
  49. BIN dest/loop_whileloop.png
  50. +33 −0 dest/loop_whileloop2.plot
  51. BIN dest/loop_whileloop2.png
  52. +33 −0 dest/so_ackermann.plot
  53. BIN dest/so_ackermann.png
  54. +33 −0 dest/so_array.plot
  55. BIN dest/so_array.png
  56. +33 −0 dest/so_binary_trees.plot
  57. BIN dest/so_binary_trees.png
  58. +33 −0 dest/so_concatenate.plot
  59. BIN dest/so_concatenate.png
  60. +33 −0 dest/so_count_words.plot
  61. BIN dest/so_count_words.png
  62. +33 −0 dest/so_exception.plot
  63. BIN dest/so_exception.png
  64. +33 −0 dest/so_fannkuch.plot
  65. BIN dest/so_fannkuch.png
  66. +33 −0 dest/so_fasta.plot
  67. BIN dest/so_fasta.png
  68. +33 −0 dest/so_k_nucleotide.plot
  69. BIN dest/so_k_nucleotide.png
  70. +33 −0 dest/so_lists.plot
  71. BIN dest/so_lists.png
  72. +33 −0 dest/so_mandelbrot.plot
  73. BIN dest/so_mandelbrot.png
  74. +33 −0 dest/so_matrix.plot
  75. BIN dest/so_matrix.png
  76. +33 −0 dest/so_meteor_contest.plot
  77. BIN dest/so_meteor_contest.png
  78. +33 −0 dest/so_nbody.plot
  79. BIN dest/so_nbody.png
  80. +33 −0 dest/so_nested_loop.plot
  81. BIN dest/so_nested_loop.png
  82. +33 −0 dest/so_nsieve.plot
  83. BIN dest/so_nsieve.png
  84. +33 −0 dest/so_nsieve_bits.plot
  85. BIN dest/so_nsieve_bits.png
  86. +33 −0 dest/so_object.plot
  87. BIN dest/so_object.png
  88. +33 −0 dest/so_partial_sums.plot
  89. BIN dest/so_partial_sums.png
  90. +33 −0 dest/so_pidigits.plot
  91. BIN dest/so_pidigits.png
  92. +33 −0 dest/so_random.plot
  93. BIN dest/so_random.png
  94. +33 −0 dest/so_reverse_complement.plot
  95. BIN dest/so_reverse_complement.png
  96. +33 −0 dest/so_sieve.plot
  97. BIN dest/so_sieve.png
  98. +33 −0 dest/so_spectralnorm.plot
  99. BIN dest/so_spectralnorm.png
  100. +5 −0 dest/src.dat
  101. +33 −0 dest/vm1_block*.plot
  102. BIN dest/vm1_block*.png
  103. +33 −0 dest/vm1_const*.plot
  104. BIN dest/vm1_const*.png
  105. +33 −0 dest/vm1_ensure*.plot
  106. BIN dest/vm1_ensure*.png
  107. +33 −0 dest/vm1_ivar*.plot
  108. BIN dest/vm1_ivar*.png
  109. +33 −0 dest/vm1_ivar_set*.plot
  110. BIN dest/vm1_ivar_set*.png
  111. +33 −0 dest/vm1_length*.plot
  112. BIN dest/vm1_length*.png
  113. +33 −0 dest/vm1_lvar_init*.plot
  114. BIN dest/vm1_lvar_init*.png
  115. +33 −0 dest/vm1_lvar_set*.plot
  116. BIN dest/vm1_lvar_set*.png
  117. +33 −0 dest/vm1_neq*.plot
  118. BIN dest/vm1_neq*.png
  119. +33 −0 dest/vm1_not*.plot
  120. BIN dest/vm1_not*.png
  121. +33 −0 dest/vm1_rescue*.plot
  122. BIN dest/vm1_rescue*.png
  123. +33 −0 dest/vm1_simplereturn*.plot
  124. BIN dest/vm1_simplereturn*.png
  125. +33 −0 dest/vm1_swap*.plot
  126. BIN dest/vm1_swap*.png
  127. +33 −0 dest/vm2_array*.plot
  128. BIN dest/vm2_array*.png
  129. +33 −0 dest/vm2_bigarray*.plot
  130. BIN dest/vm2_bigarray*.png
  131. +33 −0 dest/vm2_bighash*.plot
  132. BIN dest/vm2_bighash*.png
  133. +33 −0 dest/vm2_case*.plot
  134. BIN dest/vm2_case*.png
  135. +33 −0 dest/vm2_defined_method*.plot
  136. BIN dest/vm2_defined_method*.png
  137. +33 −0 dest/vm2_eval*.plot
  138. BIN dest/vm2_eval*.png
  139. +33 −0 dest/vm2_method*.plot
  140. BIN dest/vm2_method*.png
  141. +33 −0 dest/vm2_mutex*.plot
  142. BIN dest/vm2_mutex*.png
  143. +33 −0 dest/vm2_poly_method*.plot
  144. BIN dest/vm2_poly_method*.png
  145. +33 −0 dest/vm2_poly_method_ov*.plot
  146. BIN dest/vm2_poly_method_ov*.png
  147. +33 −0 dest/vm2_proc*.plot
  148. BIN dest/vm2_proc*.png
  149. +33 −0 dest/vm2_raise1*.plot
  150. BIN dest/vm2_raise1*.png
  151. +33 −0 dest/vm2_raise2*.plot
  152. BIN dest/vm2_raise2*.png
  153. +33 −0 dest/vm2_regexp*.plot
  154. BIN dest/vm2_regexp*.png
  155. +33 −0 dest/vm2_send*.plot
  156. BIN dest/vm2_send*.png
  157. +33 −0 dest/vm2_super*.plot
  158. BIN dest/vm2_super*.png
  159. +33 −0 dest/vm2_unif1*.plot
  160. BIN dest/vm2_unif1*.png
  161. +33 −0 dest/vm2_zsuper*.plot
  162. BIN dest/vm2_zsuper*.png
  163. +33 −0 dest/vm3_backtrace.plot
  164. BIN dest/vm3_backtrace.png
  165. +33 −0 dest/vm3_clearmethodcache.plot
  166. BIN dest/vm3_clearmethodcache.png
  167. +33 −0 dest/vm3_gc.plot
  168. BIN dest/vm3_gc.png
  169. +33 −0 dest/vm_thread_alive_check1.plot
  170. BIN dest/vm_thread_alive_check1.png
  171. +33 −0 dest/vm_thread_create_join.plot
  172. BIN dest/vm_thread_create_join.png
  173. +33 −0 dest/vm_thread_mutex1.plot
  174. BIN dest/vm_thread_mutex1.png
  175. +33 −0 dest/vm_thread_mutex2.plot
  176. BIN dest/vm_thread_mutex2.png
  177. +33 −0 dest/vm_thread_mutex3.plot
  178. BIN dest/vm_thread_mutex3.png
  179. +33 −0 dest/vm_thread_pass.plot
  180. BIN dest/vm_thread_pass.png
  181. +33 −0 dest/vm_thread_pass_flood.plot
  182. BIN dest/vm_thread_pass_flood.png
  183. +33 −0 dest/vm_thread_pipe.plot
  184. BIN dest/vm_thread_pipe.png
  185. +98 −0 index.html
  186. +31 −0 update-bm.sh
@@ -0,0 +1,3 @@
+config.rb
+ruby
+update-bm.log
@@ -0,0 +1,19 @@
+# CRuby Benchamrk CI
+
+Please see: http://crubybenci.github.com/
+
+Most codes are made by k-tsj (https://gist.github.com/3846866). Thanks!!
+
+# Usage
+
+ cd /tmp
+ git clone git://github.com/ruby/ruby.git
+ cd ruby
+ autoconf
+ ./configure --disable-install-rdoc
+ sh path/to/bm-run.sh
+ ^C
+ mkdir /tmp/dest
+ ruby path/to/bm-merge.rb /tmp/ruby/bmlog 10
+ cd /tmp/dest
+ sh path/to/bm-make-graph.sh
No changes.
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+cat <<END > index.html
+<html>
+<haed>
+<title>CRuby Benchmark CI</title>
+</head>
+<body>
+<pre>Benchmark options:
+-r 3 -v --executables="r\${rev}::./ruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext --;r\${rev}-nogems::./ruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems"</pre>
+END
+
+echo "<p>uname -a : $(uname -a)</p>" >> index.html
+echo "<p>Updated at : $(date --rfc-3339 seconds)</p>" >> index.html
+
+for i in *.plot
+do
+ ipng="${i%.plot}.png"
+ echo '<img src="dest/'$ipng'" /><br />' >> index.html
+ rm src.dat
+ echo 'set terminal png' >> src.dat
+ echo 'set output "'$ipng'"' >> src.dat
+ echo 'set title "'${i%.plot}'"' >> src.dat
+ echo 'set xtics rotate by 260' >> src.dat
+ echo 'plot "'$i'" using 1:2 title "--enable-gems" with lines, "'$i'" using 1:3 title "--disable-gems" with lines' >> src.dat
+ gnuplot src.dat
+done
+
+echo '</body></html>' >> index.html
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+
+require_relative 'config'
+
+dirname = ARGV.shift
+x_label_every = (ARGV.shift || 1).to_i
+
+def logfile_to_hash(filepath)
+ STDERR.puts filepath
+ Hash[*open(filepath, &:read).each_line.drop_while {|i| ! (/\Abenchmark results:/ =~ i) }[3..-3]\
+ .map {|i| bmname, *res, _ = i.chomp.split(/\t/); [bmname, res] }.flatten(1)]
+end
+
+# all
+# {'bm_app_answer' => {rev => [gemrev, nogemrev]}, ...}
+all = Dir.glob(File.join(dirname, 'bm-[0-9]*.log')).each.with_object(Hash.new{{}}) do |logfile, obj|
+ rev = logfile.slice(/\d+/).to_i
+ begin
+ h = logfile_to_hash(logfile)
+ bm_names = h.keys.sort
+ bm_names.each do |bmname|
+ o = obj[bmname]
+ gemrev, nogemrev = h[bmname].map(&:to_f)
+ o[rev] = [gemrev, nogemrev]
+ obj[bmname] = o
+ end
+ rescue
+ end
+end
+
+all.each do |bmname, res|
+ File.open(File.join(DESTDIR, bmname + ".plot"), "w") do |f|
+ f.puts '"Revision" "--enable-gems" "--disable-gems"'
+ res.sort_by {|(rev,_)| rev}.map do |*v|
+ v.join(' ')
+ end.each_slice(x_label_every) {|(h, *rest)|
+ f.puts h
+ f.puts rest.join("\n").gsub(/^[0-9]+/,'""') unless rest.empty?
+ }
+ end
+end
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+[ -r bmlog ] || mkdir bmlog
+
+start_rev=$(git log -1|grep -o 'trunk@[0-9]*'|cut -d@ -f 2)
+done=$(cat REVISION)
+
+[ $start_rev -le $done ] && exit 1
+
+while :
+do
+ rev=$(git log -1|grep -o 'trunk@[0-9]*'|cut -d@ -f 2)
+
+ if [ $rev -le $done ]
+ then
+ echo $start_rev > REVISION
+ break
+ fi
+
+ make -j 2
+ if [ $? -ne 0 ]
+ then
+ git reset --hard 'HEAD~'
+ continue
+ fi
+
+ if [ ! -r "bmlog/bm-${rev}.log" ]
+ then
+ ruby benchmark/driver.rb -r 3 -v -o "bmlog/bm-${rev}.log" --executables="r${rev}::./ruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext --;r${rev}-nogems::./ruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" --pattern='bm_' --directory=./benchmark
+ make clean
+ git reset --hard 'HEAD~5'
+ else
+ git reset --hard 'HEAD~'
+ fi
+
+ while :
+ do
+ [ "$(git log -1 --format="%an")" = "svn" ] || break
+ git reset --hard 'HEAD~'
+ done
+done
@@ -0,0 +1,3 @@
+ROOT='/tmp'
+DESTDIR='/tmp/dest'
+RUBYDIR='/tmp/ruby'
@@ -0,0 +1,33 @@
+"Revision" "--enable-gems" "--disable-gems"
+36877 0.16 0.151
+36882 0.16 0.155
+36888 0.162 0.154
+36893 0.16 0.151
+36898 0.161 0.152
+36903 0.161 0.151
+36908 0.164 0.151
+36913 0.163 0.151
+36918 0.158 0.149
+36923 0.159 0.15
+36931 0.166 0.156
+36936 0.168 0.157
+36942 0.164 0.154
+36947 0.161 0.151
+36952 0.162 0.151
+36957 0.161 0.153
+36962 0.161 0.152
+36968 0.162 0.157
+36973 0.165 0.151
+36978 0.16 0.149
+36984 0.159 0.149
+36989 0.172 0.163
+36994 0.172 0.163
+36999 0.172 0.162
+37008 0.159 0.151
+37013 0.159 0.149
+37018 0.16 0.149
+37027 0.16 0.15
+37033 0.16 0.15
+37039 0.168 0.151
+37044 0.18 0.17
+37049 0.166 0.154
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,33 @@
+"Revision" "--enable-gems" "--disable-gems"
+36877 2.667 2.651
+36882 2.665 2.632
+36888 2.659 2.633
+36893 2.696 2.633
+36898 2.687 2.628
+36903 2.664 2.654
+36908 2.661 2.662
+36913 2.659 2.634
+36918 2.67 2.647
+36923 2.664 2.613
+36931 2.67 2.648
+36936 2.671 2.634
+36942 2.673 2.639
+36947 2.678 2.642
+36952 2.675 2.685
+36957 2.691 2.636
+36962 2.675 2.649
+36968 2.684 2.648
+36973 2.65 2.631
+36978 2.639 2.602
+36984 2.621 2.595
+36989 2.648 2.643
+36994 2.68 2.621
+36999 2.645 2.64
+37008 2.657 2.615
+37013 2.67 2.624
+37018 2.647 2.614
+37027 2.643 2.647
+37033 2.639 2.643
+37039 2.628 2.602
+37044 2.709 2.666
+37049 2.68 2.648
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,33 @@
+"Revision" "--enable-gems" "--disable-gems"
+36877 4.397 4.235
+36882 4.403 4.237
+36888 4.391 4.23
+36893 4.396 4.23
+36898 4.39 4.237
+36903 4.399 4.24
+36908 4.398 4.239
+36913 4.407 4.234
+36918 4.397 4.241
+36923 4.393 4.251
+36931 4.385 4.227
+36936 4.388 4.239
+36942 4.385 4.231
+36947 4.384 4.231
+36952 4.408 4.243
+36957 4.405 4.247
+36962 4.404 4.249
+36968 4.401 4.247
+36973 4.409 4.246
+36978 4.398 4.248
+36984 4.408 4.254
+36989 4.399 4.234
+36994 4.392 4.232
+36999 4.392 4.231
+37008 4.392 4.232
+37013 4.39 4.236
+37018 4.389 4.228
+37027 4.391 4.238
+37033 4.388 4.234
+37039 4.397 4.237
+37044 4.408 4.252
+37049 4.391 4.229
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,33 @@
+"Revision" "--enable-gems" "--disable-gems"
+36877 1.713 1.705
+36882 1.739 1.607
+36888 1.61 1.6
+36893 1.717 1.601
+36898 1.671 1.663
+36903 1.736 1.705
+36908 1.618 1.706
+36913 1.713 1.597
+36918 1.603 1.598
+36923 1.602 1.605
+36931 1.574 1.589
+36936 1.837 1.816
+36942 1.697 1.619
+36947 1.741 1.653
+36952 1.577 1.566
+36957 1.581 1.566
+36962 1.582 1.568
+36968 1.571 1.728
+36973 1.699 1.636
+36978 1.625 1.714
+36984 1.595 1.588
+36989 1.77 1.761
+36994 1.78 1.761
+36999 1.88 1.864
+37008 1.575 1.561
+37013 1.572 1.56
+37018 1.569 1.564
+37027 1.624 1.762
+37033 1.6 1.744
+37039 1.573 1.54
+37044 1.838 1.747
+37049 1.569 1.614
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,33 @@
+"Revision" "--enable-gems" "--disable-gems"
+36877 4.539 3.929
+36882 4.515 3.907
+36888 4.518 3.889
+36893 4.575 3.912
+36898 4.527 3.946
+36903 4.532 3.949
+36908 4.525 3.917
+36913 4.553 3.949
+36918 4.645 3.974
+36923 4.591 3.93
+36931 4.573 3.953
+36936 4.63 4.004
+36942 4.503 3.95
+36947 4.53 3.938
+36952 4.545 3.93
+36957 4.528 3.959
+36962 4.556 3.954
+36968 4.526 3.927
+36973 4.516 3.962
+36978 4.64 3.938
+36984 4.592 4.021
+36989 4.628 4.025
+36994 4.615 4.117
+36999 4.632 4.024
+37008 4.55 4.025
+37013 4.583 4.039
+37018 4.618 4.0
+37027 4.57 4.018
+37033 4.572 3.973
+37039 4.684 4.081
+37044 4.618 3.957
+37049 4.559 3.946
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,33 @@
+"Revision" "--enable-gems" "--disable-gems"
+36877 37.683 36.692
+36882 36.698 36.621
+36888 36.64 36.493
+36893 36.581 36.583
+36898 37.144 37.626
+36903 36.831 36.627
+36908 37.006 36.558
+36913 36.664 37.101
+36918 36.13 36.518
+36923 36.46 36.051
+36931 36.662 36.434
+36936 36.132 35.914
+36942 36.255 36.938
+36947 37.027 36.297
+36952 37.814 37.217
+36957 36.271 36.861
+36962 36.243 34.97
+36968 36.798 36.885
+36973 36.373 35.925
+36978 36.372 36.17
+36984 36.618 37.071
+36989 36.76 37.402
+36994 37.403 36.604
+36999 36.823 37.403
+37008 35.932 35.748
+37013 36.085 35.901
+37018 36.87 35.816
+37027 35.606 35.69
+37033 35.899 35.853
+37039 38.011 37.207
+37044 37.289 37.2
+37049 36.084 36.111
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,33 @@
+"Revision" "--enable-gems" "--disable-gems"
+36877 0.71 0.694
+36882 0.692 0.67
+36888 0.705 0.665
+36893 0.693 0.678
+36898 0.694 0.664
+36903 0.674 0.682
+36908 0.712 0.675
+36913 0.704 0.678
+36918 0.694 0.675
+36923 0.689 0.684
+36931 0.666 0.635
+36936 0.685 0.682
+36942 0.68 0.656
+36947 0.688 0.666
+36952 0.673 0.65
+36957 0.664 0.645
+36962 0.678 0.655
+36968 0.659 0.639
+36973 0.639 0.653
+36978 0.672 0.669
+36984 0.693 0.668
+36989 0.691 0.666
+36994 0.688 0.656
+36999 0.702 0.663
+37008 0.683 0.678
+37013 0.686 0.666
+37018 0.688 0.676
+37027 0.681 0.678
+37033 0.678 0.656
+37039 0.697 0.667
+37044 0.692 0.678
+37049 0.691 0.676
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit 289fc81

Please sign in to comment.