Skip to content

Commit

Permalink
Add dask/distributed versions to performance_report (#4249)
Browse files Browse the repository at this point in the history
Co-authored-by: James Bourbeau <[email protected]>
  • Loading branch information
mrocklin and jrbourbeau authored Nov 17, 2020
1 parent 98e17cc commit dfbe171
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5231,6 +5231,7 @@ def profile_to_figure(state):
bandwidth_types.update()

from bokeh.models import Panel, Tabs, Div
import distributed

# HTML
html = """
Expand All @@ -5251,6 +5252,8 @@ def profile_to_figure(state):
<li> Workers: {nworkers} </li>
<li> Threads: {threads} </li>
<li> Memory: {memory} </li>
<li> Dask Version: {dask_version} </li>
<li> Dask.Distributed Version: {distributed_version} </li>
</ul>
<h2> Calling Code </h2>
Expand All @@ -5266,6 +5269,8 @@ def profile_to_figure(state):
threads=sum(w.nthreads for w in self.workers.values()),
memory=format_bytes(sum(w.memory_limit for w in self.workers.values())),
code=code,
dask_version=dask.__version__,
distributed_version=distributed.__version__,
)
html = Div(text=html)

Expand Down
1 change: 1 addition & 0 deletions distributed/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6154,6 +6154,7 @@ async def f():
assert "Dask Performance Report" in data
assert "x = da.random" in data
assert "Threads: 4" in data
assert dask.__version__ in data


@pytest.mark.asyncio
Expand Down

0 comments on commit dfbe171

Please sign in to comment.