Skip to content

Commit 7cb2dc6

Browse files
committed
Add future benchmarks from rubyconf 2015
1 parent e17e6d1 commit 7cb2dc6

36 files changed

+620
-3
lines changed

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ group :testing do
2525
gem 'simplecov', '~> 0.10.0', :require => false
2626
gem 'coveralls', '~> 0.8.2', :require => false
2727
end
28+
29+
group :benchmarks do
30+
gem 'bench9000'
31+
end

benchmarks/default.config.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
rbenv '2.2.3'
2+
3+
rbenv 'jruby-9.0.4.0-indy',
4+
'jruby-9.0.4.0',
5+
'-Xcompile.invokedynamic=true'
6+
7+
rbenv 'rbx-2.5.8'
8+
9+
rbenv 'jruby-dev-truffle-graal',
10+
'jruby-master+graal-dev',
11+
'-J-Xmx2G -X+T'
12+
13+
binary 'baseline', 'false'
14+
15+
16+
rubies = ['baseline', '2.2.3', 'jruby-9.0.4.0-indy', 'rbx-2.5.8']
17+
rubies = ['2.2.3', 'jruby-9.0.4.0-indy', 'rbx-2.5.8']
18+
implementation_group 'rubies', *rubies
19+
implementation_group 'rubies+truffle', *rubies, 'jruby-dev-truffle-graal'
20+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
future_benchmarks = [
2+
'mutex-complete',
3+
'mutex-value',
4+
'mutex-fulfill',
5+
'special-complete',
6+
'special-value',
7+
'special-fulfill',
8+
'cr-complete',
9+
'cr-value',
10+
'cr-fulfill',
11+
'cr-cas-complete',
12+
'cr-cas-value',
13+
'cr-cas-fulfill',
14+
]
15+
16+
future_new_benchmarks = [
17+
'cr-cas-new',
18+
'cr-new',
19+
'special-new'
20+
]
21+
22+
all_bechmarks = future_benchmarks + future_new_benchmarks
23+
24+
all_bechmarks.each do |name|
25+
benchmark "future-#{name}",
26+
"#{default_benchmarks_dir}/futures-rubyconf2015/benchmarks/#{name}.rb",
27+
"-I #{default_benchmarks_dir}/futures-rubyconf2015/lib"
28+
end
29+
30+
benchmark_group 'future', *(future_benchmarks.map { |v| "future-#{v}" })
31+
benchmark_group 'future-new', *(all_bechmarks.map { |v| "future-#{v}" })
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'cr_cas_future'
2+
FutureImplementation = CRCasFuture
3+
require 'bench_complete'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'cr_cas_future'
2+
FutureImplementation = CRCasFuture
3+
require 'bench_fulfill'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'cr_cas_future'
2+
FutureImplementation = CRCasFuture
3+
require 'bench_new'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'cr_cas_future'
2+
FutureImplementation = CRCasFuture
3+
require 'bench_value'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'cr_future'
2+
FutureImplementation = CRFuture
3+
require 'bench_complete'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'cr_future'
2+
FutureImplementation = CRFuture
3+
require 'bench_fulfill'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require 'cr_future'
2+
FutureImplementation = CRFuture
3+
require 'bench_new'

0 commit comments

Comments
 (0)