File tree 3 files changed +15
-8
lines changed
src/pytest_codspeed/instruments
3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ def __init__(self) -> None:
26
26
try :
27
27
from .dist_instrument_hooks import lib # type: ignore
28
28
except ImportError as e :
29
+ print (e )
29
30
raise RuntimeError ("Failed to load instrument hooks library" ) from e
30
31
31
32
instance = lib .instrument_hooks_init ()
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ def __init__(self, config: CodSpeedConfig) -> None:
27
27
try :
28
28
self .instrument_hooks = InstrumentHooks ()
29
29
self .instrument_hooks .set_integration ("pytest-codspeed" , __semver_version__ )
30
- except RuntimeError :
30
+ except RuntimeError as e :
31
+ print (e )
31
32
self .instrument_hooks = None
32
33
33
34
self .should_measure = self .instrument_hooks is not None
Original file line number Diff line number Diff line change @@ -42,13 +42,17 @@ class BenchmarkConfig:
42
42
@classmethod
43
43
def from_codspeed_config (cls , config : CodSpeedConfig ) -> BenchmarkConfig :
44
44
return cls (
45
- warmup_time_ns = config .warmup_time_ns
46
- if config .warmup_time_ns is not None
47
- else DEFAULT_WARMUP_TIME_NS ,
45
+ warmup_time_ns = (
46
+ config .warmup_time_ns
47
+ if config .warmup_time_ns is not None
48
+ else DEFAULT_WARMUP_TIME_NS
49
+ ),
48
50
min_round_time_ns = DEFAULT_MIN_ROUND_TIME_NS ,
49
- max_time_ns = config .max_time_ns
50
- if config .max_time_ns is not None
51
- else DEFAULT_MAX_TIME_NS ,
51
+ max_time_ns = (
52
+ config .max_time_ns
53
+ if config .max_time_ns is not None
54
+ else DEFAULT_MAX_TIME_NS
55
+ ),
52
56
max_rounds = config .max_rounds ,
53
57
)
54
58
@@ -214,7 +218,8 @@ def __init__(self, config: CodSpeedConfig) -> None:
214
218
try :
215
219
self .instrument_hooks = InstrumentHooks ()
216
220
self .instrument_hooks .set_integration ("pytest-codspeed" , __semver_version__ )
217
- except RuntimeError :
221
+ except RuntimeError as e :
222
+ print (e )
218
223
self .instrument_hooks = None
219
224
220
225
self .config = config
You can’t perform that action at this time.
0 commit comments