Project

General

Profile

Actions

Bug #4341

closed

baserubyに1.8.xを指定すると make benchmark がエラー

Added by kosaki (Motohiro KOSAKI) almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-01-28 trunk 30708) [x86_64-linux]
Backport:
[ruby-dev:43143]

Description

=begin
trunkをビルドするとき、baserubyを指定する必要があるのですが、多くの人はruby-1.8.xを
指定していると思います(それが推奨と以前聞きました)。

しかしながら、make benchmarkがbaseruby指定時にbaserubyとビルドしたrubyとの性能比較モードで
動作するため以下のエラーが出ます。


benchmark results:
name ruby 1.8.6 (2010-02-05) [x86_64-linux] ruby 1.9.3dev (2011-01-29 trunk 30718) [x86_64-linux]
app_answer 1.176 0.227
app_erb 1.881 0.972
./benchmark/driver.rb:208:in measure': Benchmark process exited with abnormal status (256) (RuntimeError) from ./benchmark/driver.rb:192:in measure_file'
from ./benchmark/driver.rb:20:in map' from ./benchmark/driver.rb:188:in each'
from ./benchmark/driver.rb:188:in map' from ./benchmark/driver.rb:188:in measure_file'
from ./benchmark/driver.rb:187:in map' from ./benchmark/driver.rb:187:in measure_file'
from ./benchmark/driver.rb:162:in run' from ./benchmark/driver.rb:20:in each_with_index'
from ./benchmark/driver.rb:160:in each' from ./benchmark/driver.rb:160:in each_with_index'
from ./benchmark/driver.rb:160:in run' from ./benchmark/driver.rb:26:in benchmark'
from ./benchmark/driver.rb:249
make: *** [benchmark] Error 1

「Benchmark process exited」と言われてもまったく分からんのですが、
エスパー能力により以下のスクリプトが stack level too deep で異常終了
するのが原因と分かりました。

benchmark/bm_app_factorial.rb

def fact(n)
if(n > 1)
n * fact(n-1)
else
1
end
end

8.times{
fact(5000)
}

  1. benchmarkディレクトリに1.8.xで動作するスクリプトしか置かない
  2. make benchmark のデフォルト動作を変え、baserubyは無視する

の二案あるのですが (2) が現実的だと思います。
=end

Actions #1

Updated by naruse (Yui NARUSE) almost 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r30747.
Motohiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/benchmark.rb: fix benchmarck to work with current ruby.
    patched by Benoit Daloze [ruby-core:33846] [ruby-dev:43143]
    merged from https://github.com/eregon/ruby/commits/benchmark

  • lib/benchmark (Report#width): update documentation

  • lib/benchmark: document the return value of #benchmark and the
    :list attribute in Report

  • lib/benchmark (Tms#format): rename variables, use String#%
    instead of Kernel.format

  • lib/benchmark: remove undocumented Benchmark::times (an alias
    of Process::times used twice)

  • lib/benchmark (#benchmark): use label_width for the caption

  • lib/benchmark (Tms#initialize): rename variables

  • lib/benchmark: allow title to not be a String and call #to_s

  • lib/benchmark (Benchmark#bm): return an Array of the times with
    the labels

  • lib/benchmark: correct output for Benchmark#bmbm
    (remove the extra space)

  • lib/benchmark: add a few tests for Benchmark::Tms output

  • lib/benchmark: improve style (enumerators, ljust, unused vars)

  • lib/benchmark: add spec about output and return value

  • lib/benchmark: improve basic style and consistency
    no parenthesis for print and use interpolation instead of printf

  • lib/benchmark: remove unnecessary conversions and variables

  • lib/benchmark: correct indentation

  • lib/benchmark: rename the FMTSTR constant and variable to FORMAT

  • lib/benchmark: remove useless exception

  • test/benchmark: remove unused variable warnings
    =end

Actions #2

Updated by naruse (Yui NARUSE) almost 14 years ago

  • Status changed from Closed to Open

=begin

=end

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)
  • Target version deleted (2.0.0)

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Assigned to Closed

This seems resolved.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0