Skip to content

Instantly share code, notes, and snippets.

@akiray03
akiray03 / Compare
Last active December 15, 2015 15:38
unixbench
Ubuntu32 Ubuntu64
System Benchmarks Index Values BASELINE RESULT INDEX INDEX
Dhrystone 2 using register variables 116700.0 44150107.9 3783.2 5830.2
Double-Precision Whetstone 55.0 7631.2 1387.5 1560.4
Execl Throughput 43.0 9947.1 2313.3 1958.8
File Copy 1024 bufsize 2000 maxblocks 3960.0 1328409.7 3354.6 3251.8
File Copy 256 bufsize 500 maxblocks 1655.0 401849.5 2428.1 2410.1
File Copy 4096 bufsize 8000 maxblocks 5800.0 3181525.4 5485.4 5156.2
Pipe Throughput 12440.0 3691365.0 2967.3 4136.6
Pipe-based Context Switching 4000.0 557235.3 1393.1 1697.5
@akiray03
akiray03 / result
Last active December 12, 2015 09:49
$ rspec t.rb
F
Failures:
1) #foo raises NameError
Failure/Error: expect { Object.new.foo }.to raise_error { |error|
expected: 2
got: 1 (using ==)
# ./t.rb:3:in `block (2 levels) in <top (required)>'
@akiray03
akiray03 / gist:4600134
Created January 22, 2013 23:59
http://iij.github.com/mruby/report/iij-mruby.html で、 6b91d43 以降のテストが落ちる問題 (mrbtestのverboseモードは、グローバル変数 $verbose に値をセットしている)
Program terminated with signal 11, Segmentation fault.
#0 mrb_obj_alloc (mrb=0xbb805400, ttype=MRB_TT_STRING, cls=0xbb812220) at src/gc.c:359
359 mrb->free_heaps->freelist = ((struct free_obj*)p)->next;
(gdb) bt
#0 mrb_obj_alloc (mrb=0xbb805400, ttype=MRB_TT_STRING, cls=0xbb812220) at src/gc.c:359
#1 0x0808b5c0 in mrb_str_new (mrb=0xbb805400, p=0x8104b08 "$LOAD_PATH=$:", len=10)
at src/string.c:115
#2 0x08090200 in mrb_gv_alias_name_check (mrb=0xbb805400, sym=<value optimized out>)
at src/variable.c:929
#3 0x080913af in mrb_gv_set (mrb=0xbb805400, sym=1036, v=
$ rm MRUBY_ROOT/test/t/*.rb
$ curl https://gist.github.com/raw/4552600/3f952b1169ee31e8e71c6bbd3f29d6a79d523b08/test.rb > test/t/test.rb
$ ./minirake clean all test
diff --git a/test/mrbtest.rake b/test/mrbtest.rake
index 33f283f..64e5658 100644
--- a/test/mrbtest.rake
+++ b/test/mrbtest.rake
@@ -4,7 +4,7 @@ MRuby.each_target do
exec = exefile("#{build_dir}/#{dir}/mrbtest")
clib = "#{build_dir}/#{dir}/mrbtest.c"
mlib = clib.ext('o')
- mrbs = Dir.glob("#{dir}/t/*.rb")
+ mrbs = Dir.glob("#{dir}/t/*.rb").sort
mruby@mruby-ubuntu64bit:~/work/mruby-matz$ git pull
mruby@mruby-ubuntu64bit:~/work/mruby-matz$ git log -n 1
commit 4728070ec5104faf45d2a06a5b3e412c69f8a734
Merge: db1d81d f0766e3
Author: Yukihiro "Matz" Matsumoto <matz@ruby-lang.org>
Date: Wed Jan 16 01:42:33 2013 -0800
Merge pull request #743 from iij/pr-fix-masgn
Fix disappearance of command_call in case of statement without parentheses
......................................................................................
Program received signal SIGBUS, Bus error.
mrb_obj_alloc (mrb=0x125000, ttype=MRB_TT_STRING, cls=0x12b1f0) at src/gc.c:359
359 mrb->free_heaps->freelist = ((struct free_obj*)p)->next;
(gdb) bt
#0 mrb_obj_alloc (mrb=0x125000, ttype=MRB_TT_STRING, cls=0x12b1f0)
at src/gc.c:359
#1 0x0002bda4 in mrb_str_new (mrb=0x125000, p=0xeae60 "$CHILD_STATUS=$?",
len=13) at src/string.c:115
#2 0x00036658 in mrb_gv_set (mrb=0x125000, sym=-20920, v=
@akiray03
akiray03 / gist:4537157
Created January 15, 2013 08:16
mruby test crash on ubuntu64bit (mruby/mruby - 315ecb6)
mruby@mruby-ubuntu64bit:~/work/mruby-matz$ git log -n 1
commit 315ecb60cda1b26cc67114e3afb116f6f39ecfab
Merge: a3c3f00 4bf76a6
Author: Yukihiro "Matz" Matsumoto <matz@ruby-lang.org>
Date: Sun Jan 13 18:11:19 2013 -0800
Merge pull request #730 from masamitsu-murase/modify_range_initialize
Modify `Range#initialize`
% git show
commit 384633dd5aef0c324a1716aa7496073b4301f41e
Author: Yukihiro Matz Matsumoto <matz@ruby-lang.org>
Date: Tue Dec 18 03:14:05 2012 +0900
Rakefile to honor CFLAGS env by default
% git diff
diff --git a/include/mrbconf.h b/include/mrbconf.h
@akiray03
akiray03 / gist:4202725
Created December 4, 2012 11:05
mruby-test-gen
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
files = (0..99).to_a.map{|i| "%02d.rb" % i }
chars = (('a'..'z').to_a + ('A'..'Z').to_a).join
files.each_index do |idx|
cur_file = files[idx]
nxt_file = files[idx+1]