smolpy 1.15.1__tar.gz → 1.15.2.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/PKG-INFO +2 -2
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/README.md +1 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/__main__.py +25 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/pool.py +29 -23
- smolpy-1.15.2.dev2/benchmarks/results/2026-11-24-2122-simpy-rust-ns3-jaws-zbook-switch-drop-state.json +12238 -0
- smolpy-1.15.2.dev2/benchmarks/switch_drop.py +509 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0004-execution-backends.md +1 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0015-shared-pool-and-drain-resume.md +4 -1
- smolpy-1.15.2.dev2/docs/adr/0016-switch-wide-drop-state.md +416 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/backends.md +63 -2
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/benchmarks.md +4 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/dsl-reference.md +16 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/examples.md +4 -3
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/language-reference.md +8 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/model-semantics.md +14 -6
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/roadmap.md +19 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/scenario-model.md +2 -2
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_ingress_buffer.smol +20 -14
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/mkdocs.yml +1 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smol-engine/src/scenario.rs +21 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smol-engine/src/sim.rs +41 -3
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/backends.py +6 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/core/network.py +3 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/ethernet/switch.py +9 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/lang/ast.py +1 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/lang/interpreter.py +1 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/lang/transformer.py +1 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/model/scenario.py +7 -1
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/model/validate.py +9 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/ns3/__init__.py +4 -2
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/ns3/cpp/smol-ns3.cc +48 -9
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/sim/engine.py +44 -7
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/equivalence/scenarios.py +20 -9
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_benchmarks.py +66 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_ns3.py +2 -2
- smolpy-1.15.2.dev2/tests/test_switch_drop.py +480 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/ci.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/dev-build.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/docker-image.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/docs.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/github-release.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/ns3-base.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/publish.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/release.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.github/workflows/rust-wheels.yml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/.gitignore +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/LICENSE +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/cells.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/closed_loop.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/ingress.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/load.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/loss.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-13-0921-simpy-jaws-zbook-baseline.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-13-1527-simpy-jaws-zbook-optimised.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-13-2116-simpy-jaws-zbook-research-batch.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-13-2119-simpy-jaws-zbook-research-b4.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-15-1255-rust-jaws-zbook-stop-criterion.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-15-1333-rust-jaws-zbook-research-b4.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-15-1346-rust-jaws-zbook-research-batch.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-16-1839-simpy-ns3-jaws-zbook-tcp-under-load.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-23-1228-simpy-rust-ns3-jaws-zbook-bounded-buffers.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-23-2106-simpy-rust-ns3-jaws-zbook-one-request-in-flight.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-24-0836-simpy-rust-ns3-jaws-zbook-ingress-buffers.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-24-1006-simpy-rust-ns3-jaws-zbook-buffer-cells.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/results/2026-11-24-1538-simpy-rust-ns3-jaws-zbook-shared-pool.json +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/runner.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/scenarios.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/benchmarks/worker.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docker/Dockerfile +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docker/Dockerfile.dockerignore +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docker/Dockerfile.ns3 +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docker/Dockerfile.ns3.dockerignore +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docker/ns3-base/Dockerfile +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docker/ns3-base/smoke.cc +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docker/smoke.smol +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0001-protocol-package-structure.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0002-modbus-tcp-implementation.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0003-smol-external-dsl.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0005-profinet-rt.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0006-profiling-and-baseline-benchmark.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0007-execution-independent-scenario-model.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0008-rust-des-engine-mvp.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0009-batch-execution-and-cross-backend-validation.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0010-ethernet-frames-on-the-wire.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0011-bounded-switch-buffers.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0012-modbus-one-request-in-flight.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0013-ingress-buffer-accounting.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/adr/0014-buffer-cells-and-hysteresis.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/dashboard.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/index.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/modbus.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/mqtt.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/profinet.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/docs/simulation-engine.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/README.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example.smol +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_10_clients.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_12_clients.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_20_clients.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_bounded_buffer.smol +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_file_transfer.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_modbus.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_modbus_timeout.smol +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_mqtt.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_profinet.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_profinet.smol +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_staggered_transfer.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/examples/example_two_tier.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/pyproject.toml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/Cargo.lock +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/Cargo.toml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smol-engine/Cargo.toml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smol-engine/src/frames.rs +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smol-engine/src/lib.rs +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smol-engine/src/rng.rs +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smol-engine/src/timebase.rs +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smolpy-engine-rs/Cargo.toml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smolpy-engine-rs/README.md +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smolpy-engine-rs/pyproject.toml +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smolpy-engine-rs/smoke_test.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/rust/smolpy-engine-rs/src/lib.rs +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/_worker.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/batch.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/cli.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/core/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/core/adapter.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/core/batch.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/core/link.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/core/node.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/core/observation.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/ethernet/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/lang/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/lang/errors.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/lang/grammar.lark +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/modbus/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/modbus/slave.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/model/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/model/frames.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/model/streams.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/model/timebase.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/mqtt/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/mqtt/broker.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/profinet/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/profinet/device.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/sim/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/stats.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/viz/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/viz/dashboard.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/src/smolpy/viz/text_dashboard.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/equivalence/__init__.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/equivalence/harness.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/equivalence/test_equivalence.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/equivalence/test_rust_timebase.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_backends.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_batch.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_buffers.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_cli.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_dsl.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_engine_ir.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_hysteresis.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_ingress.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_lang.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_model.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_outstanding.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_pool.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_profinet.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_semantics.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_simulation.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_stats.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_sweep.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_timebase.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/tests/test_validate.py +0 -0
- {smolpy-1.15.1 → smolpy-1.15.2.dev2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: smolpy
|
|
3
|
-
Version: 1.15.
|
|
3
|
+
Version: 1.15.2.dev2
|
|
4
4
|
Summary: Network simulation DSL and discrete-event simulator
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -533,7 +533,7 @@ The model every engine implements:
|
|
|
533
533
|
- **MAC-learning switch** — each switch pre-seeds its forwarding table from the topology wiring, eliminating spurious flooding toward silent endpoints (e.g. a server that only receives). Dynamic learning still operates for traffic through intermediate switches.
|
|
534
534
|
- **Store-and-forward model** — transmission delay + propagation delay per hop.
|
|
535
535
|
- **Queuing** — each link direction has its own egress queue with 8 strict 802.1Q priority classes (FIFO within a class, non-preemptive); `qos="fifo"` on a switch ignores priorities. `queue_depth` reports buffered frames at the switch's outbound ports.
|
|
536
|
-
- **Bounded buffers** — a switch with `buffer` (per egress port) or `ingress_buffer` (per ingress port), in bytes, frames or cells, drops a frame that does not fit, with tail drop or with a resume threshold ([ADR-0014](https://jwszolek.github.io/SMOLPy/adr/0014-buffer-cells-and-hysteresis/)), and can share one pool among its ports, with a reserve each ([ADR-0015](https://jwszolek.github.io/SMOLPy/adr/0015-shared-pool-and-drain-resume/)): delay is capped and loss appears, as on real switches near saturation ([ADR-0011](https://jwszolek.github.io/SMOLPy/adr/0011-bounded-switch-buffers/), [ADR-0013](https://jwszolek.github.io/SMOLPy/adr/0013-ingress-buffer-accounting/)). Without them queues are unbounded.
|
|
536
|
+
- **Bounded buffers** — a switch with `buffer` (per egress port) or `ingress_buffer` (per ingress port), in bytes, frames or cells, drops a frame that does not fit, with tail drop or with a resume threshold ([ADR-0014](https://jwszolek.github.io/SMOLPy/adr/0014-buffer-cells-and-hysteresis/)), and can share one pool among its ports, with a reserve each ([ADR-0015](https://jwszolek.github.io/SMOLPy/adr/0015-shared-pool-and-drain-resume/)), and one drop state for the whole switch ([ADR-0016](https://jwszolek.github.io/SMOLPy/adr/0016-switch-wide-drop-state/)): delay is capped and loss appears, as on real switches near saturation ([ADR-0011](https://jwszolek.github.io/SMOLPy/adr/0011-bounded-switch-buffers/), [ADR-0013](https://jwszolek.github.io/SMOLPy/adr/0013-ingress-buffer-accounting/)). Without them queues are unbounded.
|
|
537
537
|
- **Traffic shaping** — constant, Poisson, Pareto-burst and batch patterns; IMIX frame-size distribution.
|
|
538
538
|
- **Live mode** (SimPy only) — simulation runs in 200 chunks (~8 s total wall time); the dashboard reads shared metric arrays between chunks via Python's GIL.
|
|
539
539
|
|
|
@@ -505,7 +505,7 @@ The model every engine implements:
|
|
|
505
505
|
- **MAC-learning switch** — each switch pre-seeds its forwarding table from the topology wiring, eliminating spurious flooding toward silent endpoints (e.g. a server that only receives). Dynamic learning still operates for traffic through intermediate switches.
|
|
506
506
|
- **Store-and-forward model** — transmission delay + propagation delay per hop.
|
|
507
507
|
- **Queuing** — each link direction has its own egress queue with 8 strict 802.1Q priority classes (FIFO within a class, non-preemptive); `qos="fifo"` on a switch ignores priorities. `queue_depth` reports buffered frames at the switch's outbound ports.
|
|
508
|
-
- **Bounded buffers** — a switch with `buffer` (per egress port) or `ingress_buffer` (per ingress port), in bytes, frames or cells, drops a frame that does not fit, with tail drop or with a resume threshold ([ADR-0014](https://jwszolek.github.io/SMOLPy/adr/0014-buffer-cells-and-hysteresis/)), and can share one pool among its ports, with a reserve each ([ADR-0015](https://jwszolek.github.io/SMOLPy/adr/0015-shared-pool-and-drain-resume/)): delay is capped and loss appears, as on real switches near saturation ([ADR-0011](https://jwszolek.github.io/SMOLPy/adr/0011-bounded-switch-buffers/), [ADR-0013](https://jwszolek.github.io/SMOLPy/adr/0013-ingress-buffer-accounting/)). Without them queues are unbounded.
|
|
508
|
+
- **Bounded buffers** — a switch with `buffer` (per egress port) or `ingress_buffer` (per ingress port), in bytes, frames or cells, drops a frame that does not fit, with tail drop or with a resume threshold ([ADR-0014](https://jwszolek.github.io/SMOLPy/adr/0014-buffer-cells-and-hysteresis/)), and can share one pool among its ports, with a reserve each ([ADR-0015](https://jwszolek.github.io/SMOLPy/adr/0015-shared-pool-and-drain-resume/)), and one drop state for the whole switch ([ADR-0016](https://jwszolek.github.io/SMOLPy/adr/0016-switch-wide-drop-state/)): delay is capped and loss appears, as on real switches near saturation ([ADR-0011](https://jwszolek.github.io/SMOLPy/adr/0011-bounded-switch-buffers/), [ADR-0013](https://jwszolek.github.io/SMOLPy/adr/0013-ingress-buffer-accounting/)). Without them queues are unbounded.
|
|
509
509
|
- **Traffic shaping** — constant, Poisson, Pareto-burst and batch patterns; IMIX frame-size distribution.
|
|
510
510
|
- **Live mode** (SimPy only) — simulation runs in 200 chunks (~8 s total wall time); the dashboard reads shared metric arrays between chunks via Python's GIL.
|
|
511
511
|
|
|
@@ -17,6 +17,8 @@ python -m benchmarks cells [--duration 30000] [--backend simpy rust ns3]
|
|
|
17
17
|
python -m benchmarks cells-summary benchmarks/results/<file>.json
|
|
18
18
|
python -m benchmarks pool [--duration 60000] [--backend simpy rust ns3]
|
|
19
19
|
python -m benchmarks pool-summary benchmarks/results/<file>.json
|
|
20
|
+
python -m benchmarks switch-drop [--duration 60000] [--backend simpy rust ns3]
|
|
21
|
+
python -m benchmarks switch-drop-summary benchmarks/results/<file>.json
|
|
20
22
|
"""
|
|
21
23
|
|
|
22
24
|
from __future__ import annotations
|
|
@@ -28,7 +30,7 @@ import subprocess
|
|
|
28
30
|
import sys
|
|
29
31
|
from pathlib import Path
|
|
30
32
|
|
|
31
|
-
from benchmarks import cells, closed_loop, ingress, loss, pool
|
|
33
|
+
from benchmarks import cells, closed_loop, ingress, loss, pool, switch_drop
|
|
32
34
|
from benchmarks.load import DURATION_MS, LOADS, run_load, summarize_load
|
|
33
35
|
from benchmarks.runner import parse_size, run_batch, run_suite, size_label, summarize
|
|
34
36
|
|
|
@@ -162,6 +164,20 @@ def main() -> None:
|
|
|
162
164
|
po_summ = sub.add_parser("pool-summary", help="markdown tables of a pool results file")
|
|
163
165
|
po_summ.add_argument("file", type=Path)
|
|
164
166
|
|
|
167
|
+
sd = sub.add_parser(
|
|
168
|
+
"switch-drop", help="ADR-0016: refit the reserve under a switch-wide drop state, validate"
|
|
169
|
+
)
|
|
170
|
+
sd.add_argument("--duration", type=float, default=60_000, help="simulated ms per run")
|
|
171
|
+
sd.add_argument("--backend", nargs="+", default=list(switch_drop.ENGINES))
|
|
172
|
+
sd.add_argument("--label", default="switch-drop-state")
|
|
173
|
+
sd.add_argument("--out", type=Path, default=None)
|
|
174
|
+
sd.add_argument(
|
|
175
|
+
"--calibration", type=Path, default=None, help="reuse an earlier file's calibration"
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
sd_summ = sub.add_parser("switch-drop-summary", help="markdown tables of a switch-drop file")
|
|
179
|
+
sd_summ.add_argument("file", type=Path)
|
|
180
|
+
|
|
165
181
|
a = p.parse_args()
|
|
166
182
|
if a.cmd == "run":
|
|
167
183
|
sizes = [parse_size(s) for s in a.frames]
|
|
@@ -210,6 +226,14 @@ def main() -> None:
|
|
|
210
226
|
print(pool.summarize_pool(out))
|
|
211
227
|
elif a.cmd == "pool-summary":
|
|
212
228
|
print(pool.summarize_pool(a.file))
|
|
229
|
+
elif a.cmd == "switch-drop":
|
|
230
|
+
out = switch_drop.run_switch_drop(
|
|
231
|
+
a.duration, a.backend, a.label, a.out, calibration=a.calibration
|
|
232
|
+
)
|
|
233
|
+
print(f"results written to {out}")
|
|
234
|
+
print(switch_drop.summarize(out))
|
|
235
|
+
elif a.cmd == "switch-drop-summary":
|
|
236
|
+
print(switch_drop.summarize(a.file))
|
|
213
237
|
elif a.cmd == "batch":
|
|
214
238
|
frames = parse_size(a.frames)
|
|
215
239
|
r = run_batch(a.scenario, frames, a.metrics, a.runs, a.jobs, a.timeout, a.seed, a.backend)
|
|
@@ -103,18 +103,18 @@ def seq_stats(name: str, data: Path = DATA) -> dict[str, float]:
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
def rtt_stats(name: str, data: Path = DATA) -> dict[str, float]:
|
|
107
|
-
"""Polls sent and retransmitted (a round trip
|
|
108
|
-
p99 and maximum of the others, in ms."""
|
|
106
|
+
def rtt_stats(name: str, data: Path = DATA, long_ms: float = LONG_MS) -> dict[str, float]:
|
|
107
|
+
"""Polls sent and retransmitted (a round trip of *long_ms* or more), and
|
|
108
|
+
the p99 and maximum of the others, in ms."""
|
|
109
109
|
with open(data / name, newline="") as f:
|
|
110
110
|
v = [float(r["rtt_us"]) / 1_000 for r in csv.DictReader(f)]
|
|
111
|
-
short = sorted(x for x in v if x <
|
|
111
|
+
short = sorted(x for x in v if x < long_ms)
|
|
112
112
|
q = statistics.quantiles(short, n=100)
|
|
113
|
-
long = sum(x >=
|
|
113
|
+
long = sum(x >= long_ms for x in v)
|
|
114
114
|
return {"sent": len(v), "affected": long / len(v), "p99": q[98], "max": short[-1]}
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
def hardware(data: Path = DATA) -> dict[str, dict]:
|
|
117
|
+
def hardware(data: Path = DATA, long_ms: float = LONG_MS) -> dict[str, dict]:
|
|
118
118
|
two = "2026-11-24_dwa_rpi/powtorka"
|
|
119
119
|
adr14 = "2026-11-24_prognoza_adr0014"
|
|
120
120
|
out = {
|
|
@@ -126,37 +126,41 @@ def hardware(data: Path = DATA) -> dict[str, dict]:
|
|
|
126
126
|
},
|
|
127
127
|
"two 4050": {
|
|
128
128
|
"udp": [seq_stats(f"{two}/r4050_{p}", data) for p in ("pi1", "pi2")],
|
|
129
|
-
"pi": [rtt_stats(f"{two}/r4050_{p}.csv", data) for p in ("pi1", "pi2")],
|
|
130
|
-
"waveshare": rtt_stats(f"{two}/r4050_ws.csv", data),
|
|
131
|
-
|
|
129
|
+
"pi": [rtt_stats(f"{two}/r4050_{p}.csv", data, long_ms) for p in ("pi1", "pi2")],
|
|
130
|
+
"waveshare": rtt_stats(f"{two}/r4050_ws.csv", data, long_ms),
|
|
131
|
+
# ADR-0015's "0 of 2 072" merged two Pis' unaligned clocks; with
|
|
132
|
+
# the clocks aligned from the losses the overlap is only bounded,
|
|
133
|
+
# about 18 % of runs at ±1 ms (ADR-0016)
|
|
134
|
+
"overlap": "not measurable: no receive times; about 18 % of runs with clocks"
|
|
135
|
+
" aligned to ±1 ms (ADR-0016)",
|
|
132
136
|
},
|
|
133
137
|
"two 3900": {
|
|
134
138
|
"udp": [seq_stats(f"{two}/r3900_{p}", data) for p in ("pi1", "pi2")],
|
|
135
|
-
"pi": [rtt_stats(f"{two}/r3900_{p}.csv", data) for p in ("pi1", "pi2")],
|
|
136
|
-
"waveshare": rtt_stats(f"{two}/r3900_ws.csv", data),
|
|
139
|
+
"pi": [rtt_stats(f"{two}/r3900_{p}.csv", data, long_ms) for p in ("pi1", "pi2")],
|
|
140
|
+
"waveshare": rtt_stats(f"{two}/r3900_ws.csv", data, long_ms),
|
|
137
141
|
},
|
|
138
142
|
"10Mb 808": {
|
|
139
143
|
"udp": [seq_stats("2026-11-24_10Mb/r809", data)],
|
|
140
|
-
"pi": [rtt_stats("2026-11-24_10Mb/r809_pi1.csv", data)],
|
|
144
|
+
"pi": [rtt_stats("2026-11-24_10Mb/r809_pi1.csv", data, long_ms)],
|
|
141
145
|
},
|
|
142
146
|
"10Mb 846": {
|
|
143
147
|
"udp": [seq_stats("2026-11-24_10Mb/r850", data)],
|
|
144
|
-
"pi": [rtt_stats("2026-11-24_10Mb/r850_pi1.csv", data)],
|
|
148
|
+
"pi": [rtt_stats("2026-11-24_10Mb/r850_pi1.csv", data, long_ms)],
|
|
145
149
|
},
|
|
146
150
|
"512 B": {
|
|
147
151
|
"udp": [seq_stats(f"{adr14}/s512", data)],
|
|
148
|
-
"pi": [rtt_stats(f"{adr14}/s512_rpi.csv", data)],
|
|
149
|
-
"waveshare": rtt_stats(f"{adr14}/s512_ws.csv", data),
|
|
152
|
+
"pi": [rtt_stats(f"{adr14}/s512_rpi.csv", data, long_ms)],
|
|
153
|
+
"waveshare": rtt_stats(f"{adr14}/s512_ws.csv", data, long_ms),
|
|
150
154
|
},
|
|
151
155
|
"mixed": {
|
|
152
156
|
"udp": [seq_stats(f"{adr14}/mix1518", data), seq_stats(f"{adr14}/mix512", data)],
|
|
153
|
-
"pi": [rtt_stats(f"{adr14}/mix_rpi.csv", data)],
|
|
154
|
-
"waveshare": rtt_stats(f"{adr14}/mix_ws.csv", data),
|
|
157
|
+
"pi": [rtt_stats(f"{adr14}/mix_rpi.csv", data, long_ms)],
|
|
158
|
+
"waveshare": rtt_stats(f"{adr14}/mix_ws.csv", data, long_ms),
|
|
155
159
|
},
|
|
156
160
|
"ingress 8100": {
|
|
157
161
|
"udp_loss": 16_630 / 2_510_616, # sink.txt
|
|
158
|
-
"pi": [rtt_stats("2026-11-24_ingress_test/rpi.csv", data)],
|
|
159
|
-
"waveshare": rtt_stats("2026-11-24_ingress_test/waveshare.csv", data),
|
|
162
|
+
"pi": [rtt_stats("2026-11-24_ingress_test/rpi.csv", data, long_ms)],
|
|
163
|
+
"waveshare": rtt_stats("2026-11-24_ingress_test/waveshare.csv", data, long_ms),
|
|
160
164
|
},
|
|
161
165
|
"batch": {"ratio": 0.55},
|
|
162
166
|
}
|
|
@@ -420,7 +424,7 @@ def testbed(
|
|
|
420
424
|
for node, rate, count in servers:
|
|
421
425
|
laptop.polls(node, register=0, count=count, rate=rate, outstanding=1, timeout_ms=1_000)
|
|
422
426
|
net.observe("modbus_latency", on=node, every=1)
|
|
423
|
-
for m in ("modbus_unanswered", "modbus_skipped"):
|
|
427
|
+
for m in ("modbus_unanswered", "modbus_skipped", "modbus_timeouts"):
|
|
424
428
|
net.observe(m, on=node, every=end)
|
|
425
429
|
for node in nodes:
|
|
426
430
|
net.observe("frames_sent", on=node, every=end)
|
|
@@ -429,12 +433,14 @@ def testbed(
|
|
|
429
433
|
return net.to_scenario(duration=duration_ms, seed=seed)
|
|
430
434
|
|
|
431
435
|
|
|
432
|
-
def _polls(metrics: dict, server: str, poll_rate: float) -> dict:
|
|
436
|
+
def _polls(metrics: dict, server: str, poll_rate: float, long_ms: float = LONG_MS) -> dict:
|
|
437
|
+
"""Polls sent and affected, a round trip of *long_ms* or more or none,
|
|
438
|
+
and the p99 and maximum of the others, in ms."""
|
|
433
439
|
rtt = [v / 1_000 for _, v in metrics[f"modbus_latency:{server}"]]
|
|
434
|
-
short = sorted(x for x in rtt if x <
|
|
440
|
+
short = sorted(x for x in rtt if x < long_ms)
|
|
435
441
|
at, skipped = metrics[f"modbus_skipped:{server}"][-1]
|
|
436
442
|
sent = cells._instants(at, poll_rate) - skipped
|
|
437
|
-
affected = sum(x >=
|
|
443
|
+
affected = sum(x >= long_ms for x in rtt) + metrics[f"modbus_unanswered:{server}"][-1][1]
|
|
438
444
|
q = statistics.quantiles(short, n=100) if len(short) > 1 else [math.nan] * 99
|
|
439
445
|
return {
|
|
440
446
|
"sent": sent,
|