moved example code around

--HG--
branch : trunk
rename : examples/cycle.py => examples/basic/cycle.py
rename : examples/debugger.py => examples/basic/debugger.py
rename : examples/inheritance.py => examples/basic/inheritance.py
rename : examples/templates/broken.html => examples/basic/templates/broken.html
rename : examples/test.py => examples/basic/test.py
rename : examples/test_filter_and_linestatements.py => examples/basic/test_filter_and_linestatements.py
rename : examples/test_loop_filter.py => examples/basic/test_loop_filter.py
rename : examples/translate.py => examples/basic/translate.py
diff --git a/examples/profile.py b/examples/profile.py
new file mode 100644
index 0000000..843efb1
--- /dev/null
+++ b/examples/profile.py
@@ -0,0 +1,56 @@
+try:
+    from cProfile import Profile
+except ImportError:
+    from profile import Profile
+from pstats import Stats
+from jinja2 import Environment as JinjaEnvironment
+
+context = {
+    'page_title': 'mitsuhiko\'s benchmark',
+    'table': [dict(a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8,i=9,j=10) for x in range(1000)]
+}
+
+jinja_template = JinjaEnvironment(
+    line_statement_prefix='%',
+    variable_start_string="${",
+    variable_end_string="}"
+).from_string("""\
+<!doctype html>
+<html>
+  <head>
+    <title>${page_title|e}</title>
+  </head>
+  <body>
+    <div class="header">
+      <h1>${page_title|e}</h1>
+    </div>
+    <ul class="navigation">
+    % for href, caption in [
+        ('index.html', 'Index'),
+        ('downloads.html', 'Downloads'),
+        ('products.html', 'Products')
+      ]
+      <li><a href="${href|e}">${caption|e}</a></li>
+    % endfor
+    </ul>
+    <div class="table">
+      <table>
+      % for row in table
+        <tr>
+        % for cell in row
+          <td>${cell}</td>
+        % endfor
+        </tr>
+      % endfor
+      </table>
+    </div>
+  </body>
+</html>\
+""")
+
+
+p = Profile()
+p.runcall(lambda: jinja_template.render(context))
+stats = Stats(p)
+stats.sort_stats('time', 'calls')
+stats.print_stats()