Skip to content

Commit 4aed96b

Browse files
authored
Update api.md
1 parent a4acdb8 commit 4aed96b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ filter parameter can be either following: name, module, lineno, ncall, nactualca
3232

3333
One of the interesting features of this filter function is that you can get per-thread function call statistics only by providing the ctx_id of the thread you want to get results. Under the hood, yappi already holds the function stats by per-thread and upon request, it aggregates this data, when you provide a filter, it simply returns only that per-thread stats.
3434

35-
`threads = yappi.get_thread_stats()`
36-
`for thread in threads:`
37-
` fstats = yappi.get_func_stats(filter={"ctx_id":thread.id})`
38-
35+
```
36+
threads = yappi.get_thread_stats()
37+
for thread in threads:
38+
fstats = yappi.get_func_stats(filter={"ctx_id":thread.id})
39+
```
3940

4041
#### `get_thread_stats()`
4142

0 commit comments

Comments
 (0)