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/Python/func_slow.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 Code/Python/func_slow.py (limited to 'Code/Python/func_slow.py') diff --git a/Code/Python/func_slow.py b/Code/Python/func_slow.py new file mode 100755 index 0000000..9cba9c5 --- /dev/null +++ b/Code/Python/func_slow.py @@ -0,0 +1,26 @@ +#!/usr/bin/python + +def func_c(): + print "Function C" + i = 0 + while (i < 3000000): + i = i + 1 + j = i + 1 + +def func_b(): + print "Function B" + i = 0 + while (i < 2000000): + i = i + 1 + j = i + 1 + func_c() + +def func_a(): + print "Function A" + i = 0 + while (i < 1000000): + i = i + 1 + j = i + 1 + func_b() + +func_a() -- cgit v1.1