From 70ff9c9b90e01fee332dc2b3c9376af2915494a7 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 5 Oct 2011 16:20:38 -0500 Subject: fixed code block spacing in Benchmark lib docs --- user_guide_src/source/libraries/benchmark.rst | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'user_guide_src/source/libraries/benchmark.rst') diff --git a/user_guide_src/source/libraries/benchmark.rst b/user_guide_src/source/libraries/benchmark.rst index 2588f72a2..5b86142dd 100644 --- a/user_guide_src/source/libraries/benchmark.rst +++ b/user_guide_src/source/libraries/benchmark.rst @@ -30,11 +30,11 @@ The process for usage is this: Here's an example using real code:: $this->benchmark->mark('code_start'); - + // Some code happens here - + $this->benchmark->mark('code_end'); - + echo $this->benchmark->elapsed_time('code_start', 'code_end'); .. note:: The words "code_start" and "code_end" are arbitrary. They @@ -42,15 +42,15 @@ Here's an example using real code:: want, and you can set multiple sets of markers. Consider this example:: $this->benchmark->mark('dog'); - + // Some code happens here - + $this->benchmark->mark('cat'); - + // More code happens here - + $this->benchmark->mark('bird'); - + echo $this->benchmark->elapsed_time('dog', 'cat'); echo $this->benchmark->elapsed_time('cat', 'bird'); echo $this->benchmark->elapsed_time('dog', 'bird'); @@ -64,16 +64,16 @@ If you want your benchmark data to be available to the be set up in pairs, and each mark point name must end with _start and _end. Each pair of points must otherwise be named identically. Example:: - $this->benchmark->mark('my_mark_start'); - + $this->benchmark->mark('my_mark_start'); + // Some code happens here... - - $this->benchmark->mark('my_mark_end'); - + + $this->benchmark->mark('my_mark_end'); + $this->benchmark->mark('another_mark_start'); - + // Some more code happens here... - + $this->benchmark->mark('another_mark_end'); Please read the :doc:`Profiler page ` for more -- cgit v1.2.3-24-g4f1b