From 4297c1b2d07fec7f50b70e26e3adb4d062b19e15 Mon Sep 17 00:00:00 2001 From: gnn Date: Sat, 12 May 2012 20:38:18 +0000 Subject: Add the remaining scripts from the DTraceToolkit, version 0.99, to the vendor tree. http://www.brendangregg.com/dtrace.html#DTraceToolkit --- Code/Ruby/func_slow.rb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 Code/Ruby/func_slow.rb (limited to 'Code/Ruby/func_slow.rb') 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 -- cgit v1.1