File tree 3 files changed +16
-1
lines changed
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 35
35
from benchmark_schema import TestRun
36
36
from plugins import Durations
37
37
38
- logger = logging .getLogger ("coiled-runtime" )
38
+ try :
39
+ from distributed .spans import span as span_ctx
40
+ except ImportError : # dask <2023.6.0
41
+ from contextlib import nullcontext as span_ctx
42
+
43
+
44
+ logger = logging .getLogger ("benchmarks" )
39
45
logger .setLevel (logging .INFO )
40
46
41
47
coiled_logger = logging .getLogger ("coiled" )
@@ -401,13 +407,20 @@ def _get_cluster_info(cluster):
401
407
yield _get_cluster_info
402
408
403
409
410
+ @pytest .fixture (scope = "function" )
411
+ def span (request ):
412
+ with span_ctx (request .node .name ):
413
+ yield
414
+
415
+
404
416
@pytest .fixture (scope = "function" )
405
417
def benchmark_all (
406
418
benchmark_memory ,
407
419
benchmark_task_durations ,
408
420
benchmark_coiled_prometheus ,
409
421
get_cluster_info ,
410
422
benchmark_time ,
423
+ span ,
411
424
):
412
425
"""Benchmark all available metrics and extracts cluster information
413
426
Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ def client(
206
206
testrun_uid ,
207
207
cluster_kwargs ,
208
208
benchmark_time ,
209
+ span ,
209
210
restart ,
210
211
scale ,
211
212
local ,
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ def client(
70
70
testrun_uid ,
71
71
cluster_kwargs ,
72
72
benchmark_time ,
73
+ span ,
73
74
restart ,
74
75
local ,
75
76
query ,
You can’t perform that action at this time.
0 commit comments