@startuml
title Dual-Server Latency Benchmark Flow (After)
skinparam backgroundColor #FFFFFF
skinparam defaultFontColor #000000
skinparam componentStyle rectangle
skinparam shadowing false

actor "Engineer" as Engineer
rectangle "Benchmark Test Runner\n(dual_server_benchmark_tests)" as Bench
rectangle "Rust Axum Server\n(ephemeral 127.0.0.1:0)" as RustSrv
rectangle "Reference Node Server\n(localhost:3100)" as RefNode
rectangle "Endpoint Scenario Engine\n(auth setup + feasibility gating)" as Scenario
rectangle "Latency Aggregator\n(avg/p50/p95/min/max + status counts)" as Aggregator
rectangle "Markdown Report Writer\ncompat-tests/reports/dual-server-latency-report.md" as Report
rectangle "Mermaid Charts\n(overall + per endpoint)" as Mermaid

Engineer --> Bench : cargo test --test dual_server_benchmark_tests
Bench --> RustSrv : Start + route requests
Bench --> RefNode : Ensure running + route requests
Bench --> Scenario : Run benchmark iterations per endpoint
Scenario --> RustSrv : Timed HTTP call (ms)
Scenario --> RefNode : Timed HTTP call (ms)
Scenario --> Aggregator : Push samples + statuses
Aggregator --> Report : Emit detailed markdown tables
Aggregator --> Mermaid : Emit Mermaid xychart blocks
Mermaid --> Report : Embed chart blocks

note right of Report
Feasible endpoint benchmark with
generated report artifact and charts.
end note

@enduml
