aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/dtracetoolkit/Code/Python/func_slow.py
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/contrib/dtracetoolkit/Code/Python/func_slow.py')
-rwxr-xr-xcddl/contrib/dtracetoolkit/Code/Python/func_slow.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/cddl/contrib/dtracetoolkit/Code/Python/func_slow.py b/cddl/contrib/dtracetoolkit/Code/Python/func_slow.py
new file mode 100755
index 000000000000..9cba9c5b1204
--- /dev/null
+++ b/cddl/contrib/dtracetoolkit/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()