Skip to content

Commit 497001a

Browse files
committed
profiling exercise is now easier to follow
1 parent 2588bc5 commit 497001a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

content/profiling.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,11 @@ Please try to go through the exercise in the following steps:
153153
<https://www.gutenberg.org/cache/epub/2600/pg2600.txt>
154154
(right-click and "save as" to download the file and **save it as "book.txt"**).
155155
1. **Before** you run the profiler, try to predict in which function the code
156+
(the example code is below)
156157
will spend most of the time and in which function it will use most of the
157158
memory.
158-
1. Run the `scalene` profiler on the following code example and browse the
159+
1. Save the example code as `example.py` and
160+
run the `scalene` profiler on the following code example and browse the
159161
generated HTML report to find out where most of the time is spent and where
160162
most of the memory is used:
161163
```console
@@ -168,6 +170,7 @@ Please try to go through the exercise in the following steps:
168170
You can find an example of the generated HTML report in the solution below.
169171
1. Does the result match your prediction? Can you explain the results?
170172

173+
Example code (`example.py`):
171174
:::{literalinclude} profiling/exercise.py
172175
:::
173176

0 commit comments

Comments
 (0)