node stats and benchmark, dynamic realocation working
This commit is contained in:
19
tests/conftest.py
Normal file
19
tests/conftest.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Shared pytest fixtures for the meshnet test suite."""
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _stub_benchmark_throughput(monkeypatch):
|
||||
"""Replace the GEMM benchmark with a fixed value in all tests.
|
||||
|
||||
The benchmark runs 60 matmuls (warmup + measure) which adds ~100ms per test
|
||||
on CPU. Tests verify registration flow, not hardware speed — stub it out.
|
||||
Tests that specifically exercise benchmark_throughput import it directly from
|
||||
meshnet_node.hardware and are not affected by this patch.
|
||||
"""
|
||||
try:
|
||||
import meshnet_node.startup as startup_mod
|
||||
monkeypatch.setattr(startup_mod, "benchmark_throughput", lambda _device: 999.0)
|
||||
except ImportError:
|
||||
pass
|
||||
Reference in New Issue
Block a user