Skip to content

Conversation

@GioeleB00
Copy link
Collaborator

Description
This PR upgrades AsyncFlow’s queue-theory analysis and runtime metrics so users can compare Theory vs Observed in a transparent, model-faithful way across M/M/1 and M/M/c scenarios.

Highlights

  • MMc support (two flavors)

    • Random split (M/M/c → c parallel M/M/1): closed forms with per-server arrival λᵢ = λ/c.
    • Pooled FCFS (Erlang-C): classic formulas (P₀, Pᵥ, Wq, etc.) surfaced as the “FCFS/Erlang-C” mode.
  • Observed KPIs computed independently

    • λ̂ from throughput series (mean RPS), μ̂ from per-request service_time.
    • from client latencies; Wq̂ from LB waiting times (FCFS) or server waiting_time (split).
    • from L_SYSTEM series (fallback to λ̂·Ŵ only if missing).
    • Lq̂ from LQ_LB (FCFS) or the sum of per-server LQ_SERVER means (split); fallback to λ̂·Wq̂ only if missing.
    • ρ̂ from SERVER_UTILIZATION series (fallback to λ̂/(c·μ̂) only if needed).
    • No circular derivations: each KPI stands on its own measurement.
  • New/expanded sampled metrics (exposed by the analyzer)

    • L_SYSTEM (system population at the generator scope).
    • LQ_SERVER and LQ_IO (per-server queues).
    • SERVER_UTILIZATION (busy indicator per server).
    • Existing maps are accessible uniformly via get_metric_map(...) (enum or string key).
  • ResultsAnalyzer quality-of-life

    • get_server_event_arrays() now exposes per-request arrays:
      latencies, service_time, io_time, waiting_time, finish_times.
    • list_server_ids() helper for stable server enumeration.
    • Per-server throughput series via get_server_throughput_series(...).
  • Comparison tables

    • Pretty Theory vs Observed tables for MMc (split and FCFS/Erlang-C) and MM1.
    • Clear headings, deltas, and ∞ handling when ρ ≥ 1.
  • Notebooks & docs

    • Updated guided notebook for MMc split with end-to-end build-run-compare flow.
    • Added FCFS/Erlang-C comparison path and a quick introspection snippet to verify that
      time-series are present and used (no silent fallbacks).

@GioeleB00 GioeleB00 merged commit 3cad1c2 into develop Sep 20, 2025
2 checks passed
@GioeleB00 GioeleB00 deleted the feature/metric-collection-rho-L-Lq branch September 20, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants