Skip to content

Commit 884262d

Browse files
committed
Add FinePerformanceMetrics dashboard test
1 parent cf8bc8b commit 884262d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

distributed/comm/tests/test_ucx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_registered(ucx_loop):
4141

4242

4343
async def get_comm_pair(
44-
listen_addr="ucx://" + HOST, listen_args=None, connect_args=None, **kwargs
44+
listen_addr=f"ucx://{HOST}", listen_args=None, connect_args=None, **kwargs
4545
):
4646
listen_args = listen_args or {}
4747
connect_args = connect_args or {}

distributed/dashboard/tests/test_scheduler_bokeh.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
Contention,
2929
CurrentLoad,
3030
Events,
31+
FinePerformanceMetrics,
3132
Hardware,
3233
MemoryByKey,
3334
MemoryColor,
@@ -328,6 +329,21 @@ async def test_WorkersMemory(c, s, a, b):
328329
assert all(d["width"])
329330

330331

332+
@gen_cluster(client=True)
333+
async def test_FinePerformanceMetrics(c, s, a, b):
334+
cl = FinePerformanceMetrics(s)
335+
336+
futures = c.map(slowinc, range(10), delay=0.001)
337+
await wait(futures)
338+
await asyncio.sleep(0.5) # wait for metrics to arrive
339+
340+
cl.update()
341+
d = dict(cl.metrics_by_prefix_and_activity.data)
342+
ops = cl.metrics_by_prefix_and_activity.operations.copy()
343+
assert ops # Have some activities, 'deserialize', 'execution', etc
344+
assert d # Have metrics
345+
346+
331347
@gen_cluster(client=True)
332348
async def test_ClusterMemory(c, s, a, b):
333349
cl = ClusterMemory(s)

0 commit comments

Comments
 (0)