Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
b82a57ba
Commit
b82a57ba
authored
Jul 28, 2017
by
Peter W. Draper
Browse files
Use shading correctly when expanding threads
parent
145b4377
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/plot_threadpool.py
View file @
b82a57ba
...
...
@@ -214,13 +214,13 @@ ax.set_ylim(0, nthread)
tictocs
=
[]
colours
=
[]
j
=
0
for
task
in
tasks
[
nthread
-
1
]:
for
task
in
tasks
[
nthread
-
expand
]:
tictocs
.
append
((
task
[
"tic"
],
task
[
"toc"
]
-
task
[
"tic"
]))
colours
.
append
(
task
[
"colour"
])
ax
.
broken_barh
(
tictocs
,
[
0
,(
nthread
-
1
)],
facecolors
=
colours
,
linewidth
=
0
,
alpha
=
0.15
)
# And we don't plot the fake thread.
nthread
=
nthread
-
1
nthread
=
nthread
-
expand
for
i
in
range
(
nthread
):
# Collect ranges and colours into arrays.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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