These are chat archives for opal/opal

7th
Jun 2015
Vais Salikhov
@vais
Jun 07 2015 04:08
@eregon $ bundle exec rake mspec_phantom should do it, no need to open the browser. Please let me know if that works for you...
Benoit Daloze
@eregon
Jun 07 2015 15:09
@vais Apparently not:
Starting MSpec Runner...
[filters] Adding 42 spec files...
[shared] Adding 162 spec files...
[lexer] Adding 1 spec files...
[parser] Adding 30 spec files...
[rubyspecs] Adding 230 spec files...
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on localhost:9999, CTRL+C to stop
TypeError: undefined is not an object (evaluating 'args[0]')

  /home/eregon/code/opal/lib/mspec/opal/sprockets.js:34 in global code
Maybe my phantomjs 2.0.0 (compiled it on Linux following their website instructions) is wrong somehow
Elia Schito
@elia
Jun 07 2015 15:30
@eregon we're stuck on 1.9
Benoit Daloze
@eregon
Jun 07 2015 15:34
@elia ah, I see. Anyway running with phantom is just another way to run the specs?
@elia Do you plan to change to ruby/rubyspec for the submodule in opal?
Elia Schito
@elia
Jun 07 2015 15:43
Sure
you can also rake mspec_node
Benoit Daloze
@eregon
Jun 07 2015 15:45
yeah that's what I do
DevotionGeo
@DevotionGeo
Jun 07 2015 16:05
Hi everyone
This message was deleted
Vais Salikhov
@vais
Jun 07 2015 17:28

Benchmarking workflow preview (opal/opal#915):

$ bundle exec rake -T | grep bench
(in /Users/vais/GitHub/opal)
rake bench:clear            # Delete all benchmark results
rake bench:opal             # Benchmark Opal
rake bench:report           # Combined report of all benchmark results
rake bench:ruby             # Benchmark Ruby
$ bundle exec rake bench:clear
(in /Users/vais/GitHub/opal)
rm tmp/bench/*
$ bundle exec rake bench:opal[test/cruby/benchmark/bm_app_answer.rb,test/cruby/benchmark/bm_app_factorial.rb]
(in /Users/vais/GitHub/opal)
bundle exec opal benchmark/run.rb test/cruby/benchmark/bm_app_answer.rb test/cruby/benchmark/bm_app_factorial.rb | tee tmp/bench/Opal1
test/cruby/benchmark/bm_app_answer.rb    0.7710001468658447
test/cruby/benchmark/bm_app_factorial.rb 0.0820000171661377
===============================================
Executed 2 benchmarks in 0.8530001640319824 sec
$ bundle exec rake bench:ruby[test/cruby/benchmark/bm_app_answer.rb,test/cruby/benchmark/bm_app_factorial.rb]
(in /Users/vais/GitHub/opal)
bundle exec ruby benchmark/run.rb test/cruby/benchmark/bm_app_answer.rb test/cruby/benchmark/bm_app_factorial.rb | tee tmp/bench/Ruby1
test/cruby/benchmark/bm_app_answer.rb    0.04913724200014258
test/cruby/benchmark/bm_app_factorial.rb 1.3288652799965348
===============================================
Executed 2 benchmarks in 1.3780025219966774 sec
$ bundle exec rake bench:report
(in /Users/vais/GitHub/opal)
Benchmark                                 Opal1  Ruby1
test/cruby/benchmark/bm_app_answer.rb     0.771  0.049
test/cruby/benchmark/bm_app_factorial.rb  0.082  1.329

I think I will stop here. The report could be further post-processed using something like awk to provide other views of the data, e.g. show only those rows where a specified column is the winner, etc. Or uploaded to an online service for further analysis and longitudinal tracking of results. I think this is outside of the scope of this tool. Keep it Unix.

Benoit Daloze
@eregon
Jun 07 2015 19:54
@vais Looks good! Ahah of course app_factorial is good for opal :smile: