diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | benchmark/driver.rb | 10 |
2 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Wed Oct 3 17:56:22 2007 Koichi Sasada <ko1@atdot.net> + + * benchmark/driver.rb: enable specify label to executable. + (-e "ruby1::/path/to/ruby1; ruby2::/path/to/ruby2; ...") + Wed Oct 3 16:58:48 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (parser_str_new, parser_yylex, rb_intern3): set code-range diff --git a/benchmark/driver.rb b/benchmark/driver.rb index 2de699cb1d..dd6e1bf597 100644 --- a/benchmark/driver.rb +++ b/benchmark/driver.rb @@ -45,8 +45,14 @@ class BenchmarkDriver e.strip!
next if e.empty?
- v = `#{e} -v`.chomp
- v.sub!(/ patchlevel \d+/, '')
+ if /(.+)::(.+)/ =~ e
+ # ex) ruby-a::/path/to/ruby-a
+ v = $1.strip
+ e = $2
+ else
+ v = `#{e} -v`.chomp
+ v.sub!(/ patchlevel \d+/, '')
+ end
[e, v]
}.compact
|