diff options
author | gnn <gnn@FreeBSD.org> | 2012-05-12 20:38:18 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2012-05-12 20:38:18 +0000 |
commit | 4297c1b2d07fec7f50b70e26e3adb4d062b19e15 (patch) | |
tree | aec2772e8855e6dbaea6d8136ed0c47bcb825dee /Code/Ruby/func_slow.rb | |
parent | 111c75a23278cd9317f0a13867c22ee0f6c95b26 (diff) | |
download | FreeBSD-src-4297c1b2d07fec7f50b70e26e3adb4d062b19e15.zip FreeBSD-src-4297c1b2d07fec7f50b70e26e3adb4d062b19e15.tar.gz |
Add the remaining scripts from the DTraceToolkit, version 0.99, to the
vendor tree.
http://www.brendangregg.com/dtrace.html#DTraceToolkit
Diffstat (limited to 'Code/Ruby/func_slow.rb')
-rwxr-xr-x | Code/Ruby/func_slow.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Code/Ruby/func_slow.rb b/Code/Ruby/func_slow.rb new file mode 100755 index 0000000..87a498c --- /dev/null +++ b/Code/Ruby/func_slow.rb @@ -0,0 +1,32 @@ +#!./ruby -w + +def func_c + print "Function C\n" + i = 0 + while i < 300000 + i = i + 1 + j = i + 1 + end +end + +def func_b + print "Function B\n" + i = 0 + while i < 200000 + i = i + 1 + j = i + 1 + end + func_c +end + +def func_a + print "Function A\n" + i = 0 + while i < 100000 + i = i + 1 + j = i + 1 + end + func_b +end + +func_a |