Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
562b8384
Commit
562b8384
authored
Mar 08, 2017
by
Mikhail Terekhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TODO: how to display this not as code but verbatim?
parent
b4509b11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
docs/src/tutorial/profiling_tutorial.rst
docs/src/tutorial/profiling_tutorial.rst
+11
-5
No files found.
docs/src/tutorial/profiling_tutorial.rst
View file @
562b8384
...
@@ -162,9 +162,9 @@ write a short script to profile our code::
...
@@ -162,9 +162,9 @@ write a short script to profile our code::
s = pstats.Stats("Profile.prof")
s = pstats.Stats("Profile.prof")
s.strip_dirs().sort_stats("time").print_stats()
s.strip_dirs().sort_stats("time").print_stats()
Running this on my box gives the following output:
:
Running this on my box gives the following output:
TODO: how to display this not as code but verbatim?
.. code-block:: none
Sat Nov 7 17:40:54 2009 Profile.prof
Sat Nov 7 17:40:54 2009 Profile.prof
...
@@ -236,7 +236,9 @@ Here is the complete version adding the import of the pyximport module::
...
@@ -236,7 +236,9 @@ Here is the complete version adding the import of the pyximport module::
We only added two lines, the rest stays completely the same. Alternatively, we could also
We only added two lines, the rest stays completely the same. Alternatively, we could also
manually compile our code into an extension; we wouldn't need to change the
manually compile our code into an extension; we wouldn't need to change the
profile script then at all. The script now outputs the following::
profile script then at all. The script now outputs the following:
.. code-block:: none
Sat Nov 7 18:02:33 2009 Profile.prof
Sat Nov 7 18:02:33 2009 Profile.prof
...
@@ -275,7 +277,9 @@ necessary changes for these ideas::
...
@@ -275,7 +277,9 @@ necessary changes for these ideas::
val += recip_square(k)
val += recip_square(k)
return (6 * val)**.5
return (6 * val)**.5
Now running the profile script yields::
Now running the profile script yields:
.. code-block:: none
Sat Nov 7 18:10:11 2009 Profile.prof
Sat Nov 7 18:10:11 2009 Profile.prof
...
@@ -313,7 +317,9 @@ profile recip_square any more; we couldn't get the function to be much faster an
...
@@ -313,7 +317,9 @@ profile recip_square any more; we couldn't get the function to be much faster an
val += recip_square(k)
val += recip_square(k)
return (6 * val)**.5
return (6 * val)**.5
Running this shows an interesting result::
Running this shows an interesting result:
.. code-block:: none
Sat Nov 7 18:15:02 2009 Profile.prof
Sat Nov 7 18:15:02 2009 Profile.prof
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment