Skip to content

Commit 2a2a7de

Browse files
committed
wip: add debug print
1 parent 5dc6f3b commit 2a2a7de

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

src/pytest_codspeed/instruments/hooks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def __init__(self) -> None:
2626
try:
2727
from .dist_instrument_hooks import lib # type: ignore
2828
except ImportError as e:
29+
print(e)
2930
raise RuntimeError("Failed to load instrument hooks library") from e
3031

3132
instance = lib.instrument_hooks_init()

src/pytest_codspeed/instruments/valgrind.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def __init__(self, config: CodSpeedConfig) -> None:
2727
try:
2828
self.instrument_hooks = InstrumentHooks()
2929
self.instrument_hooks.set_integration("pytest-codspeed", __semver_version__)
30-
except RuntimeError:
30+
except RuntimeError as e:
31+
print(e)
3132
self.instrument_hooks = None
3233

3334
self.should_measure = self.instrument_hooks is not None

src/pytest_codspeed/instruments/walltime.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,17 @@ class BenchmarkConfig:
4242
@classmethod
4343
def from_codspeed_config(cls, config: CodSpeedConfig) -> BenchmarkConfig:
4444
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+
),
4850
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+
),
5256
max_rounds=config.max_rounds,
5357
)
5458

@@ -214,7 +218,8 @@ def __init__(self, config: CodSpeedConfig) -> None:
214218
try:
215219
self.instrument_hooks = InstrumentHooks()
216220
self.instrument_hooks.set_integration("pytest-codspeed", __semver_version__)
217-
except RuntimeError:
221+
except RuntimeError as e:
222+
print(e)
218223
self.instrument_hooks = None
219224

220225
self.config = config

0 commit comments

Comments
 (0)