node stats and benchmark, dynamic realocation working

This commit is contained in:
Dobromir Popov
2026-07-01 10:02:17 +03:00
parent b6272db93d
commit 278be49539
6 changed files with 279 additions and 14 deletions

19
tests/conftest.py Normal file
View 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