Files
git.stella-ops.org/docs/features/checked/gateway/stellarouter-performance-testing-pipeline.md

2.4 KiB

StellaRouter Performance Testing Pipeline (k6 + Prometheus + Correlation IDs)

Module

Gateway

Status

VERIFIED

Description

Performance testing pipeline with k6 load test scenarios (A-G), correlation ID instrumentation, Prometheus-compatible metrics, and Grafana dashboards for performance curve modeling.

Implementation Details

  • k6 load tests: src/Gateway/__Tests/load/gateway_performance.k6.js -- 7 scenarios A-G (511 lines)
  • Performance metrics: src/Gateway/StellaOps.Gateway.WebService/Services/GatewayPerformanceMetrics.cs -- Prometheus counters/histograms + scenario config models (318 lines)
  • Correlation ID middleware: src/Gateway/StellaOps.Gateway.WebService/Middleware/CorrelationIdMiddleware.cs -- correlation ID propagation with validation (64 lines)
  • Gateway metrics: src/Gateway/StellaOps.Gateway.WebService/Services/GatewayMetrics.cs -- base Prometheus metrics
  • Health monitoring: src/Gateway/StellaOps.Gateway.WebService/Services/GatewayHealthMonitorService.cs
  • Grafana dashboard: devops/telemetry/dashboards/stella-ops-gateway-performance.json
  • Source: Feature matrix scan

E2E Test Plan

  • Verify k6 scenarios A-G exist and cover the required traffic patterns
  • Test correlation ID propagation overhead measurement
  • Verify Prometheus metrics are exposed correctly
  • Verify Grafana dashboard exists

Verification

  • Run ID: run-002
  • Date: 2026-02-09
  • Method: Tier 1 code review + Tier 2d integration tests
  • Build: PASS (0 errors, 0 warnings)
  • Tests: PASS (202/202 gateway tests pass)
  • Code Review:
    • k6 script (511 lines): All 7 scenarios verified: A (health baseline), B (OpenAPI under load), C (routing throughput), D (correlation ID overhead), E (rate limit boundary), F (connection ramp/saturation), G (sustained soak).
    • GatewayPerformanceMetrics (318 lines): Prometheus counters (requests, errors, rate-limits), histograms (request/auth/transport/routing durations), scenario config models with PerformanceCurvePoint.
    • GatewayPerformanceMetricsTests (418 lines, 20+ tests): Verify scenario configs, curve point computed properties, threshold violations, observation recording.
    • CorrelationIdMiddlewareTests (71 lines, 4 tests): ID generation, echo, TraceIdentifier sync.
    • Note: Feature file's "What's Missing" section is STALE -- k6 scripts and Grafana dashboard DO exist.
  • Verdict: PASS