49 lines
2.4 KiB
Markdown
49 lines
2.4 KiB
Markdown
|
|
# rotatingMachine — End-to-End Benchmarks
|
|||
|
|
|
|||
|
|
These are live-deploy benchmarks, not unit tests. They require a running Docker-hosted Node-RED with the EVOLV package mounted, and they drive the node through its real runtime: admin-API deploy, debug websocket capture, inject-triggered commands, 1-second tick loop.
|
|||
|
|
|
|||
|
|
Unit tests live in `../basic/`, `../integration/`, `../edge/`. Run those with `npm test`.
|
|||
|
|
|
|||
|
|
## Prerequisites
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
cd /mnt/d/gitea/EVOLV
|
|||
|
|
docker compose up -d nodered influxdb
|
|||
|
|
# wait for http://localhost:1880/nodes to return 200
|
|||
|
|
pip install --user --break-system-packages websocket-client requests
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Benchmarks
|
|||
|
|
|
|||
|
|
### `curve-prediction-benchmark.py`
|
|||
|
|
|
|||
|
|
Deploys one rotatingMachine per shipped pump curve (`hidrostal-H05K-S03R`, `hidrostal-C5-D03R-SHN1`) and runs a per-pump (pressure × ctrl) sweep. For each pump the sweep covers its own low / mid / high pressure slices with controller setpoints of 20 / 40 / 60 / 80 %.
|
|||
|
|
|
|||
|
|
Reports:
|
|||
|
|
|
|||
|
|
- Count of samples inside the curve envelope ("good") vs out-of-range ("bad").
|
|||
|
|
- Monotonicity of flow across the ctrl sweep at fixed pressure.
|
|||
|
|
- Full sample table with state, ctrl, flow, power, NCog, cog.
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
python3 nodes/rotatingMachine/test/e2e/curve-prediction-benchmark.py
|
|||
|
|
cat /tmp/rm_curve_bench.json
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
#### Expected output (green run, 2026-04-13)
|
|||
|
|
|
|||
|
|
| Pump | Samples | Flow range | Power range | Pressures | Envelope OK | Monotonic |
|
|||
|
|
|-------|---------|-----------:|------------:|----------:|:-----------:|:---------:|
|
|||
|
|
| H05K | 12 | 10.3–208.3 m³/h | 12.3–50.3 kW | 700–3900 mbar | ✅ | ✅ |
|
|||
|
|
| C5 | 12 | 8.7–45.6 m³/h | 0.69–13.0 kW | 400–2900 mbar | ✅ | ✅ |
|
|||
|
|
|
|||
|
|
#### Known limitation — out-of-envelope pressure extrapolation
|
|||
|
|
|
|||
|
|
Feeding a pressure **below** the curve's lowest slice produces extrapolated flow values that can exceed the envelope by orders of magnitude. Example: H05K at 400 mbar (curve min 700 mbar), ctrl=20% → flow ≈ 30 000 m³/h (envelope max 227 m³/h).
|
|||
|
|
|
|||
|
|
The node does not clamp pressure to the curve envelope; in production this is defended by upstream `measurement` nodes with realistic ranges. Operators deploying a machine should confirm the sensor range matches the curve.
|
|||
|
|
|
|||
|
|
### `../../../../memory/` companion benchmarks
|
|||
|
|
|
|||
|
|
The earlier shutdown, interruptibility, and clean-path benchmarks (`rm_e2e_benchmark.py`, `rm_clean.py`, `rm_e2e_verify.py`) live in `/tmp/` during a review session. Promote them into this directory when they need to become permanent smoke tests.
|