diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..5193cd5 --- /dev/null +++ b/.env.example @@ -0,0 +1,27 @@ +# StreamMart Environment Variables Template +# Copy this file to .env and configure values before starting services + +# Application Environment +NODE_ENV=development +PORT=8085 +GATEWAY_URL=http://localhost:8085 + +# Database Configuration (PostgreSQL) +# For local Docker Compose Postgres: +DATABASE_URL=postgresql://postgres:postgres@postgres:5432/streammart +# For local host access: +# DATABASE_URL=postgresql://postgres:postgres@localhost:5432/streammart +# For remote PostgreSQL with TLS: +# DATABASE_URL=postgresql://:@:5432/?sslmode=require + +# Apache Kafka Configuration (KRaft Single-Node Broker) +# Within Docker Compose network: +KAFKA_BROKERS=kafka:9092 +# From host machine: +# KAFKA_BROKERS=localhost:9094 + +# Authentication (API Gateway JWT Secret - minimum 32 characters) +JWT_SECRET=replace-with-output-of-openssl-rand-hex-32 + +# Internal Service Routing (Used by API Gateway) +PAYMENT_SERVICE_URL=http://payment-service:8000 diff --git a/.env.template b/.env.template index c725e0e..e88be9d 100644 --- a/.env.template +++ b/.env.template @@ -1,3 +1,2 @@ - - -DATABASE_URL=postgresql://postgres.xxxxx:password@aws-0-eu-central-1.pooler.supabase.com:6543/postgres +# Copy to .env and fill in your local or remote PostgreSQL connection string +DATABASE_URL=postgresql://:@:5432/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e6bc7b..f2c625d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,37 +2,103 @@ name: Microservices CI on: push: - branches: [ "main" ] + branches: [ "master", "main", "fix/*" ] pull_request: - branches: [ "main" ] + branches: [ "master", "main", "fix/*" ] jobs: - build-and-test: + unit-and-integration-tests: runs-on: ubuntu-latest strategy: matrix: node-version: [20.x] steps: - - uses: actions/checkout@v4 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - cache-dependency-path: '**/package-lock.json' - - - name: Install dependencies and test Payment Service - run: | - cd payment-service - npm install - npm test - env: - NODE_ENV: test - - # Later you can add steps here to build the docker images and push them to a registry (Docker Hub/ECR) - - name: Build Docker Image for Payment Service - run: | - cd payment-service - docker build -t my-payment-service:test . + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Generate ephemeral JWT_SECRET + run: | + SECRET=$(openssl rand -hex 32) + echo "::add-mask::$SECRET" + echo "JWT_SECRET=$SECRET" >> "$GITHUB_ENV" + + - name: Install dependencies & test API Gateway + run: | + cd api-gateway + npm install + npm test + + - name: Install dependencies & test Payment Service + run: | + cd payment-service + npm install + npm test + env: + NODE_ENV: test + + - name: Install dependencies & test Order Service + run: | + cd order-service + npm install + npm test + + - name: Install dependencies & test Email Service + run: | + cd email-service + npm install + npm test + + - name: Install dependencies & test Analytic Service + run: | + cd analytic-service + npm install + npm test + + docker-resilience-tests: + needs: unit-and-integration-tests + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Generate ephemeral JWT_SECRET + run: | + SECRET=$(openssl rand -hex 32) + echo "::add-mask::$SECRET" + echo "JWT_SECRET=$SECRET" >> "$GITHUB_ENV" + + - name: Start full stack with Docker Compose + run: docker compose up -d --build --wait + + - name: Poison message fallback test (eachBatch) + run: node scripts/test-poison-batch.js + + - name: Mid-batch crash recovery test (SIGKILL before offset commit) + run: node scripts/test-mid-batch-crash.js + + - name: Order-service crash recovery test (kill between DB commit and publish) + run: node scripts/test-order-crash-recovery.js + + - name: Kafka outage & concurrent SKIP LOCKED relay test (500 checkouts) + run: node scripts/test-outbox-outage.js + + - name: Collect container status on failure + if: failure() + run: | + docker compose ps + docker compose logs --tail=80 + + - name: Tear down stack + if: always() + run: docker compose down -v diff --git a/.gitignore b/.gitignore index 510e57a..ed973e1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ microservices-kafka/ # Interview Prep interview.md append-interview +project_flow_for_interviews.md +project_flow_for_interviews.tex diff --git a/BENCHMARKS.md b/BENCHMARKS.md new file mode 100644 index 0000000..8a72054 --- /dev/null +++ b/BENCHMARKS.md @@ -0,0 +1,353 @@ +# StreamMart Performance & Resilience Benchmarks + +Comprehensive empirical performance benchmarks, resilience metrics, and failure recovery verifications for the StreamMart event-driven microservices architecture. + +--- + +## ๐Ÿ–ฅ๏ธ Benchmark Environment & Test Rig + +All benchmarks were measured directly on the local Docker orchestration environment under native host operating conditions: + +| Specification | Hardware / Environment Value | +| :--- | :--- | +| **CPU Model** | AMD Ryzen 7 6800H with Radeon Graphics (8 physical cores, 16 logical threads @ 3.20 GHz base) | +| **Total Visible RAM** | 16.0 GB (16,004,012 KB visible memory) | +| **Host Operating System** | Microsoft Windows 11 Home Single Language (64-bit) | +| **Container Engine** | Docker version 29.9.3, build 5457199 (Docker Desktop with WSL2 Linux backend) | +| **Database Engine** | PostgreSQL 16 Alpine (`postgres:16-alpine`, containerized instance with persistent volume) | +| **Message Broker** | Apache Kafka 3.7.0 in KRaft Mode (`apache/kafka:3.7.0`, single-node KRaft, no ZooKeeper) | +| **Node.js Runtime** | Node.js v20.x (Docker base `node:20-alpine`) / Host Node.js v24.15.0 | +| **Load Testing Tool** | k6 v2.4.0 (commit/dd9395906d, go1.26.11, windows/amd64) | + +--- + +## โšก 1. Cold Start Benchmark + +Measures total wall-clock time required to orchestrate, create, boot, and verify health checks across all 7 microservices and infrastructure containers from a clean state (`docker compose down` followed by `docker compose up -d --wait`). + +- **Command**: + ```powershell + Measure-Command { docker compose up -d --wait } + ``` + *(Reproducible script: `benchmarks/cold-start.ps1`)* + +- **Raw Execution Output**: + ```text + Network micro-services_default Created + Container streammart-kafka Created + Container streammart-postgres Created + Container streammart-kafka-init Created + Container streammart-payment Created + Container streammart-analytic Created + Container streammart-order Created + Container streammart-email Created + Container streammart-gateway Created + Container streammart-postgres Healthy + Container streammart-kafka Healthy + Container streammart-kafka-init Exited (0) + Container streammart-payment Healthy + Container streammart-order Healthy + Container streammart-email Healthy + Container streammart-analytic Healthy + Container streammart-gateway Healthy + + Days : 0 + Hours : 0 + Minutes : 1 + Seconds : 1 + Milliseconds : 36 + TotalSeconds : 61.0367579 + TotalMilliseconds : 61036.7579 + ``` + +- **Cold-Start Summary**: + - **Total Elapsed Cold-Start Time**: **61.04 seconds** (all 7 containers created, started, topics provisioned, and passed healthcheck probes). + +--- + +## ๐Ÿšฆ 2. API Gateway Load Test (k6) + +Measures the throughput, request latency distribution, and error rate of the API Gateway under steady concurrent load over 30 seconds with JWT authorization enforcement. + +- **Command**: + ```powershell + k6 run benchmarks/gateway-load.js + ``` +- **Configuration**: + - **Virtual Users (VUs)**: 20 concurrent VUs + - **Duration**: 30 seconds steady state + - **Endpoint**: `POST http://localhost:8085/api/payment` + - **Auth**: Pre-authenticated Bearer JWT token in Authorization header + - **Threshold**: Error rate < 1.0% + +- **Raw k6 Output**: + ```text + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + execution: local + script: benchmarks/gateway-load.js + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + โ–ˆ THRESHOLDS + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + โ–ˆ TOTAL RESULTS + checks_total.......: 2534 83.48115/s + checks_succeeded...: 100.00% 2534 out of 2534 + checks_failed......: 0.00% 0 out of 2534 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=180.34ms min=31.71ms med=153.62ms max=732.95ms p(90)=306.89ms p(95)=378.21ms + { expected_response:true }...: avg=180.34ms min=31.71ms med=153.62ms max=732.95ms p(90)=306.89ms p(95)=378.21ms + http_req_failed................: 0.00% 0 out of 2535 + http_reqs......................: 2535 83.514094/s + + EXECUTION + iteration_duration.............: avg=237.37ms min=83.52ms med=209.06ms max=800.1ms p(90)=367.8ms p(95)=447.34ms + iterations.....................: 2534 83.48115/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 720 kB 24 kB/s + data_sent......................: 1.2 MB 39 kB/s + + running (0m30.4s), 00/20 VUs, 2534 complete and 0 interrupted iterations + default โœ“ [ 100% ] 20 VUs 30s + ``` + +- **Load Test Summary**: + - **Throughput**: **83.51 requests/sec** + - **Total Requests**: **2,535 requests** + - **Error Rate**: **0.00%** (0 errors out of 2,535 requests) + - **Minimum Latency**: 31.71 ms + - **Median Latency (p50)**: **153.62 ms** + - **Mean Latency**: 180.34 ms + - **90th Percentile (p90)**: 306.89 ms + - **95th Percentile (p95)**: **378.21 ms** + - **Maximum Latency**: 732.95 ms + +--- + +## โฑ๏ธ 3. Latency Metrics: Synchronous Gateway & Asynchronous Event + +Measures both the synchronous HTTP request overhead at the Gateway and the end-to-end distributed asynchronous event propagation latency across the entire microservices pipeline. + +- **Command**: + ```powershell + node benchmarks/measure-latency.js + ``` + +- **Raw Execution Output**: + ```text + ====================================================================== + ๐Ÿ“Š StreamMart Latency Benchmark: Synchronous Gateway & Asynchronous Event + ====================================================================== + + --- 1. Measuring Synchronous HTTP Gateway Latency --- + First Request (Cold Path): 27.16 ms + Steady-State Min: 19.07 ms + Steady-State Max: 55.74 ms + Steady-State Avg (Mean): 26.77 ms + Steady-State p50 (Median): 25.64 ms + Steady-State p95: 38.72 ms + Steady-State p99: 55.74 ms + + --- 2. Measuring End-to-End Asynchronous Event Latency --- + Definition: Time from order-service database commit (orders.created_at) + to downstream email-service processing (processed_events.processed_at). + + Total Events Sampled: 4450 + End-to-End Event Latency Avg: 471.98 ms + End-to-End Event Latency p50: 481.06 ms + End-to-End Event Latency p95: 718.29 ms + End-to-End Event Latency p99: 1292.58 ms + ====================================================================== + ``` + +- **Summary**: + - **Gateway Ingress Overhead (p50)**: **25.64 ms** + - **Gateway Ingress Overhead (p95)**: **38.72 ms** + - **End-to-End Event Propagation (p50)**: **481.06 ms** + - **End-to-End Event Propagation (p95)**: **718.29 ms** + - **End-to-End Event Propagation (p99)**: **1,292.58 ms** + - **Dataset Verified**: 4,450 production transactions committed to PostgreSQL + +--- + +## ๐Ÿ›ก๏ธ 4. Outbox Reliability & Broker Outage Benchmark + +Measures system availability, zero data loss, and consumer idempotency when Apache Kafka suffers a total outage during peak checkout traffic, followed by dual concurrent outbox relay draining. + +- **Command**: + ```powershell + node benchmarks/outbox-reliability.js + ``` + +- **Test Steps**: + 1. Mint authenticated user JWTs via API Gateway. + 2. Stop Kafka container (`docker stop streammart-kafka`). + 3. Dispatch **500 concurrent checkout requests** to API Gateway (`POST /api/payment`). + 4. Assert 100% HTTP 200 acceptance and verify all 500 records are safely buffered in the transactional `outbox_events` table while Kafka is completely down. + 5. Restart Kafka container (`docker start streammart-kafka`). + 6. Launch **2 concurrent outbox relay worker instances** utilizing `SELECT ... FOR UPDATE SKIP LOCKED`. + 7. Wait for relay queue to drain and consumer to process all events. + 8. Execute strict database assertions for lost events and duplicate processing. + +- **Raw Execution Output**: + ```text + =========================================================================== + ๐Ÿงช StreamMart Benchmark: Outbox Reliability Under Broker Outage + =========================================================================== + Scenario: Stop Kafka broker (docker stop streammart-kafka) + Send 500 checkout requests through API Gateway. + Restart Kafka broker, wait for Outbox Relay to drain. + Assert: exactly 500 orders, 0 lost, 0 duplicates. + + [Step 1] Acquiring JWT token from API Gateway... + โœ… Obtained JWT for batch: batch_1794938071336 + ๐Ÿ“Š Baseline DB State: 806 payments, 531 orders + + [Step 2] Stopping Kafka broker (docker stop streammart-kafka)... + streammart-kafka + ๐Ÿ›‘ Kafka broker stopped. Messaging system is completely OFFLINE. + + [Step 3] Dispatching 500 checkouts to API Gateway while Kafka is DOWN... + Dispatched 100/500 checkouts... + Dispatched 200/500 checkouts... + Dispatched 300/500 checkouts... + Dispatched 400/500 checkouts... + Dispatched 500/500 checkouts... + โœ… Dispatched 500/500 checkouts in 4.12s (100% accepted HTTP 200) + + [Step 4] Verifying database isolation while Kafka is OFFLINE: + - New payments recorded in DB: 500/500 + - Pending outbox events in DB: 500/500 + - Orders processed while Kafka is down: 0 (Must be exactly 0) + โœ… PASS: All 500 events safely buffered in outbox table without data loss. + + [Step 5] Restarting Kafka broker (docker start streammart-kafka)... + streammart-kafka + โณ Waiting for Kafka to become healthy and accept connections... + โœ… Kafka broker is back ONLINE and HEALTHY. + + [Step 6] Running 2 concurrent Outbox Relay instances with SELECT ... FOR UPDATE SKIP LOCKED... + โœ… Concurrent Outbox Relay Instance #2 launched in background. + + [Step 7] Waiting for outbox to drain and order-service to consume all events... + โœ… Outbox completely drained and all orders processed in 32.3s! + + [Step 8] Strict Correctness & Concurrency Verification: + 1. Total orders created for batch: 500/500 + โœ… 0 Orders Lost (100% delivery guarantee). + 2. Duplicate orders detected: 0 + โœ… 0 Duplicates Processed (Strict Idempotency verified). + 3. Order-service processed_events records: 500/500 + โœ… Exactly 500 idempotent event records stored. + + =========================================================================== + ๐ŸŽ‰ SUCCESS: 500 orders processed, 0 lost, 0 duplicates under broker outage & concurrent relays! + =========================================================================== + ``` + +- **Resilience Summary**: + - **Orders Dispatched During Broker Outage**: 500 + - **Gateway Availability**: **100% (500 / 500 HTTP 200 OK)** + - **Events Lost**: **0 (0.00%)** + - **Duplicate Orders Processed**: **0 (0.00%)** + - **Idempotency Guarantee**: **100% verified** via compound primary key `(event_id, service_name)` table `processed_events`. + - **Relay Concurrency**: 2 independent worker instances executing `SELECT ... FOR UPDATE SKIP LOCKED` safely shared the outbox queue without deadlock or duplicate message publication. + +--- + +## ๐Ÿ’ฅ 5. Service Crash-Recovery Benchmark (Dual-Write Elimination) + +Empirically verifies that crashing `order-service` immediately after database commit (prior to network publish or Kafka offset commit) results in **zero lost events** and **zero duplicate processing**. + +- **Command**: + ```powershell + node scripts/test-order-crash-recovery.js + ``` + +- **Raw Execution Output**: + ```text + =========================================================================== + ๐Ÿงช StreamMart Phase C: Order-Service Crash Recovery Integration Test + =========================================================================== + Scenario: Kill order-service after DB commit but before event publish. + Assert that upon restart, order-successful is emitted exactly once. + + [Step 1] Requesting JWT from API Gateway... + โœ… Obtained JWT for: user_crash_1794938170436 + + [Step 2] Sending Checkout with testCrashAfterDbCommit=true flag... + โœ… Payment accepted by gateway (200 OK) and queued in outbox. + + [Step 3] Waiting for order-service to consume payment event and trigger crash... + โœ… Confirmed: Order was committed to DB (Order ID: bdefa71b-6ced-4deb-9e48-187cee802b37, Status: processing) + โœ… Confirmed DB Outbox state: 677fcc53-2b4d-46d4-8c83-669959a44e34|order-successful|f + + [Step 4] Checking order-service crash logs... + ๐Ÿ’ฅ [TEST HOOK]: Simulating immediate order-service crash after DB commit (before relay publish)! + + [Step 5] Ensuring order-service is running... + streammart-order + โœ… order-service container restarted. + + [Step 6] Waiting for order-service outbox relay to publish order-successful... + โœ… Confirmed in DB: outbox_events.published = true! + + [Step 7] Running Verification Assertions: + - Total orders created for user: 1 + โœ… EXACTLY ONE order persisted in database (no duplicates). + - Order outbox rows for this order: 1 + โœ… EXACTLY ONE order-successful outbox row created and published. + - Email outbox rows for this order: 1 + โœ… EXACTLY ONE email-successful outbox row created and published. + - Email service processed events: 1 + โœ… Email service successfully consumed and processed order-successful. + + =========================================================================== + ๐ŸŽ‰ SUCCESS: Crash recovery test passed completely! Zero lost, zero duplicates. + =========================================================================== + ``` + +--- + +## ๐Ÿ”‘ 6. Architectural Topology & Partition Keys + +To guarantee strict in-order processing and eliminate race conditions across distributed consumer partitions, deterministic partition keys are assigned without fallback chains: + +| Topic | Partition Key | Justification & Ordering Guarantee | +| :--- | :--- | :--- | +| `payment-successful` | `userId` | Ensures all payment events for a specific user route to the exact same Kafka partition, preserving per-user financial event ordering. | +| `order-successful` | `orderId` | Ensures downstream order lifecycle mutations (inventory, shipping, notifications) are ordered strictly by order instance. | +| `email-successful` | `orderId` | Guarantees all email delivery tracking events for a given order are partitioned sequentially. | +| `payment-successful.DLQ` | `eventId` | Ensures isolated, evenly distributed dead-letter queue routing without skewing onto single user partitions. | + +--- + +## โš–๏ธ 7. Email Idempotency Trade-Off Analysis + +In distributed systems, external non-transactional side-effects (e.g., SMTP / SendGrid / Amazon SES) cannot participate in two-phase database commits. In `email-service`, we evaluated two deduplication architectures: + +### Strategy A: Record "Processed" BEFORE Sending Email +- **Flow**: Insert `processed_events` -> Send email -> Commit. +- **Failure Mode**: If the email service process terminates or network fails during SMTP dispatch, the database record already exists. Upon container reboot, Kafka redelivers the event, the service reads `processed_events`, assumes the email succeeded, and skips it. +- **Result**: **Permanently lost confirmation email.** Customer never receives receipt or shipping confirmation. + +### Strategy B: Record "Processed" AFTER Sending Email (Implemented Choice) +- **Flow**: Send email via SMTP -> Atomically commit `processed_events` + outbox row. +- **Failure Mode**: If the service terminates immediately after the SMTP provider accepts the email but before the database commit finishes, Kafka redelivers the event upon restart. The service dispatches a duplicate email. +- **Result**: **Occasional duplicate email receipt.** + +### Architectural Decision +In e-commerce operations, **a duplicate order confirmation is strictly preferable to a lost confirmation**. A customer receiving two receipt emails experiences minor inconvenience; a customer receiving zero receipts assumes the transaction failed, contacts support, or erroneously re-submits a duplicate payment. StreamMart adopts Strategy B with downstream email message-id deduplication headers. diff --git a/PHASE1-BENCHMARKS.md b/PHASE1-BENCHMARKS.md new file mode 100644 index 0000000..c475b89 --- /dev/null +++ b/PHASE1-BENCHMARKS.md @@ -0,0 +1,278 @@ +# Phase 1 Benchmark Results โ€” StreamMart + +> [!IMPORTANT] +> **Status of Historical Results**: +> - **Pre-Clean-Rerun Results (initial drifted-environment runs & earlier `pool_keepalive_optimized` run)**: **SUPERSEDED** โ€” ran without database resets, accumulated unpruned outbox rows, and did not drain Kafka consumer lag. +> - **Clean Matrix Rerun (`benchmarks/run-benchmarks.js`, Section 5 below)**: +> - All **"Completed checkouts/s"** and **"Drain Time"** values in the Clean Matrix are **SUPERSEDED** because that script only waited for `outbox_events` backlog = 0, not Kafka consumer lag = 0 (`orders == accepted payments`), allowing consumer lag to carry across runs. +> - The **`pool_keepalive_batched` row** in the Clean Matrix is **SUPERSEDED / INVALID** because `RELAY_BATCH_SEND` was not passed through `docker-compose.yml` (defaulted to `false` inside the container, so it actually ran sequential 1-by-1 sends identical to `pool_keepalive`). +> - The **25ms busy-pause rebound claim** (`102 -> 228 req/s`) is **SUPERSEDED / CONFOUNDED** (see Section 2). +> - The **Accepted req/s, p50, and p95** for `baseline`, `pool_only`, `keepalive_only`, and `pool_keepalive` remain **VALID** for ingress under sequential relay sends + 25ms busy pause (with the caveat that consumer lag carried over between runs). +> - **Authoritative End-to-End Results**: Section 1 (`baseline_consumer`, `fix_a`, `fix_b`) contains the fully verified, zero-leftover-lag, full-consumer-drain measurements with container-logged `[EFFECTIVE CONFIG]` captured at the start of every experiment. + +**Test Host**: Local laptop โ€” AMD Ryzen 7 6800H, 8 physical cores / 16 logical threads @ 3.20 GHz, 16 GB RAM, Windows 11 Home (64-bit), Docker Desktop (WSL2 backend). All 7 containers + k6 runner on the same host machine. + +**Authoritative Raw Data Sources** (in `benchmarks/raw/`): +- `summary-experiment-baseline_consumer.json` ยท `summary-experiment-fix_a.json` ยท `summary-experiment-fix_b.json` +- Per-run k6 JSON summaries & raw stdout captures (`baseline_consumer-*`, `fix_a-*`, `fix_b-*`) +- `consumer-bottleneck-evidence.json` (`benchmarks/measure-consumer-breakdown.mjs`) +- `master-gateway-keepalive-measurement.json` (`benchmarks/measure-master-gateway.mjs`) +- Historical clean matrix raw files: `summary-baseline.json`, `summary-pool_only.json`, `summary-keepalive_only.json`, `summary-pool_keepalive.json`, `summary-pool_keepalive_batched.json` (partially superseded; see Section 2 & 5) + +--- + +## 1. Authoritative Consumer Optimization Experiments (`pool_keepalive_batched`, Full Drain to Lag = 0) + +**Methodology (`benchmarks/run-consumer-experiment.js`)**: +1. **Clean Reset**: Before each experiment, all application containers are stopped, Kafka topics (`payment-successful`, `order-successful`, `email-successful`, `payment-successful.DLQ`) are deleted, waited 4s for broker cleanup, recreated with the exact target partition count, and verified via `kafka-topics.sh --describe`. PostgreSQL is truncated (`TRUNCATE payments, orders, processed_events, outbox_events CASCADE;`) and all three topic-scoped partial outbox indexes are verified. +2. **Container Config Verification**: Containers are started with `docker compose up -d --build --force-recreate`. Startup `[EFFECTIVE CONFIG]` log lines are read directly from inside each running container and persisted into each experiment's summary JSON. +3. **Zero Leftover Lag Guarantee**: Before every measured run, the harness asserts `SELECT COUNT(*) FROM payments == SELECT COUNT(*) FROM orders` (zero leftover consumer lag). +4. **Full End-to-End Drain**: After each 30s k6 window (1,000 distinct user JWTs cycled across VUs and iterations), the harness snapshots consumer lag at 30s (`acceptedPayments - ordersDuring30s`), then polls PostgreSQL until `ordersProcessed == acceptedPayments` (Kafka consumer lag = 0, timeout 300s). True completed throughput is: + $$\text{True Completed Checkouts/s} = \frac{\text{Completed Orders}}{\text{Run Duration} + \text{Catch-up Time to Lag } 0}$$ +5. **Protocol**: 1 discarded 30s warm-up (fully drained to lag = 0) + 3 measured 30s runs per tier (20, 50, 100 VUs). **All 27 measured runs completed with 0% HTTP errors and `timedOut = false`.** + +--- + +### Experiment A: `baseline_consumer` (1 Partition, Sequential `eachMessage`) + +**Effective Container Startup Config (verified from inside each container)**: +```text +Kafka payment-successful: PartitionCount: 1, ReplicationFactor: 1 +streammart-gateway: [EFFECTIVE CONFIG] api-gateway: PORT=8080, PAYMENT_SERVICE_URL=http://payment-service:8000, PROXY_KEEP_ALIVE=true, NODE_ENV=development +streammart-payment: [EFFECTIVE CONFIG] payment-service: PORT=8000, DB_POOL_MAX=30, RELAY_BATCH_SEND=true, RELAY_BUSY_PAUSE_MS=25, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +streammart-order: [EFFECTIVE CONFIG] order-service: PORT=8001, DB_POOL_MAX=30, CONSUMER_MODE=eachMessage, PARTITIONS_CONSUMED_CONCURRENTLY=1, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +streammart-email: [EFFECTIVE CONFIG] email-service: PORT=8002, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +``` + +**Results โ€” Mean [Min โ€“ Max] (3 measured runs per tier)**: + +| Tier | Accepted req/s | True Completed checkouts/s | Consumer Lag @ 30s (msgs) | Catch-up Time to Lag 0 (s) | p50 Latency (ms) | p95 Latency (ms) | +|---|---|---|---|---|---|---| +| **20 VUs** | 199.06 [140.43 โ€“ 232.05] | 71.37 [51.75 โ€“ 93.17] | 3,984 [3,156 โ€“ 4,428] | 57.57 [46.23 โ€“ 69.89] | 41.49 [29.50 โ€“ 65.33] | 104.31 [68.41 โ€“ 174.21] | +| **50 VUs** | 227.17 [182.26 โ€“ 250.19] | 56.23 [54.49 โ€“ 57.45] | 5,645 [4,365 โ€“ 6,311] | 96.11 [70.60 โ€“ 112.58] | 135.36 [126.36 โ€“ 152.62] | 350.41 [252.59 โ€“ 544.59] | +| **100 VUs** | 285.61 [259.49 โ€“ 314.85] | 48.42 [45.66 โ€“ 50.73] | 7,420 [6,789 โ€“ 8,265] | 154.33 [129.96 โ€“ 171.42] | 245.14 [211.40 โ€“ 272.66] | 496.65 [457.90 โ€“ 568.14] | + +--- + +### Experiment B: `fix_a` (6 Partitions + `partitionsConsumedConcurrently: 6`, `eachMessage`) + +**Effective Container Startup Config (verified from inside each container)**: +```text +Kafka payment-successful: PartitionCount: 6, ReplicationFactor: 1 +streammart-gateway: [EFFECTIVE CONFIG] api-gateway: PORT=8080, PAYMENT_SERVICE_URL=http://payment-service:8000, PROXY_KEEP_ALIVE=true, NODE_ENV=development +streammart-payment: [EFFECTIVE CONFIG] payment-service: PORT=8000, DB_POOL_MAX=30, RELAY_BATCH_SEND=true, RELAY_BUSY_PAUSE_MS=25, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +streammart-order: [EFFECTIVE CONFIG] order-service: PORT=8001, DB_POOL_MAX=30, CONSUMER_MODE=eachMessage, PARTITIONS_CONSUMED_CONCURRENTLY=6, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +streammart-email: [EFFECTIVE CONFIG] email-service: PORT=8002, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +``` + +**Results โ€” Mean [Min โ€“ Max] (3 measured runs per tier)**: + +| Tier | Accepted req/s | True Completed checkouts/s | Consumer Lag @ 30s (msgs) | Catch-up Time to Lag 0 (s) | p50 Latency (ms) | p95 Latency (ms) | +|---|---|---|---|---|---|---| +| **20 VUs** | 220.04 [209.89 โ€“ 230.66] | 152.24 [144.10 โ€“ 163.05] | 2,142 [1,585 โ€“ 2,686] | 14.06 [8.91 โ€“ 18.63] | 33.44 [29.13 โ€“ 38.52] | 75.09 [69.09 โ€“ 79.73] | +| **50 VUs** | 273.48 [251.92 โ€“ 284.94] | 90.74 [86.22 โ€“ 95.73] | 5,858 [4,900 โ€“ 6,525] | 63.70 [50.73 โ€“ 73.40] | 111.33 [96.08 โ€“ 133.23] | 218.66 [205.88 โ€“ 240.92] | +| **100 VUs** | 340.17 [320.31 โ€“ 361.23] | 87.88 [71.32 โ€“ 119.92] | 7,912 [6,854 โ€“ 9,077] | 97.92 [57.14 โ€“ 128.01] | 205.64 [196.75 โ€“ 215.20] | 399.67 [370.53 โ€“ 429.09] | + +--- + +### Experiment C: `fix_b` (1 Partition + `eachBatch`, 1 SQL Transaction per Batch) + +Per-user FIFO ordering is preserved (`key = userId` on a single partition; batch messages are processed in Kafka offset order inside a single atomic SQL transaction with bulk `inArray` idempotency check against `processed_events`, bulk `INSERT` into `orders`, `processed_events` (`ON CONFLICT DO NOTHING`), and `outbox_events`, followed by `resolveOffset()` after commit). + +**Effective Container Startup Config (verified from inside each container)**: +```text +Kafka payment-successful: PartitionCount: 1, ReplicationFactor: 1 +streammart-gateway: [EFFECTIVE CONFIG] api-gateway: PORT=8080, PAYMENT_SERVICE_URL=http://payment-service:8000, PROXY_KEEP_ALIVE=true, NODE_ENV=development +streammart-payment: [EFFECTIVE CONFIG] payment-service: PORT=8000, DB_POOL_MAX=30, RELAY_BATCH_SEND=true, RELAY_BUSY_PAUSE_MS=25, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +streammart-order: [EFFECTIVE CONFIG] order-service: PORT=8001, DB_POOL_MAX=30, CONSUMER_MODE=eachBatch, PARTITIONS_CONSUMED_CONCURRENTLY=1, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +streammart-email: [EFFECTIVE CONFIG] email-service: PORT=8002, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092 +``` + +**Results โ€” Mean [Min โ€“ Max] (3 measured runs per tier)**: + +| Tier | Accepted req/s | True Completed checkouts/s | Consumer Lag @ 30s (msgs) | Catch-up Time to Lag 0 (s) | p50 Latency (ms) | p95 Latency (ms) | +|---|---|---|---|---|---|---| +| **20 VUs** | 253.12 [246.76 โ€“ 260.03] | **251.17 [244.84 โ€“ 258.08]** | **0 [0 โ€“ 0]** | **0.24 [0.23 โ€“ 0.24]** | **21.77 [20.29 โ€“ 22.52]** | **55.91 [52.51 โ€“ 58.74]** | +| **50 VUs** | 372.13 [335.84 โ€“ 391.51] | **368.92 [333.01 โ€“ 388.35]** | **0 [0 โ€“ 0]** | **0.27 [0.25 โ€“ 0.29]** | **74.00 [68.02 โ€“ 85.40]** | **140.81 [125.59 โ€“ 169.14]** | +| **100 VUs** | 379.49 [354.89 โ€“ 399.75] | **375.75 [349.95 โ€“ 396.79]** | **0 [0 โ€“ 0]** | **0.31 [0.23 โ€“ 0.44]** | **178.47 [169.93 โ€“ 188.84]** | **374.79 [340.02 โ€“ 393.71]** | + +### Side-by-Side Comparison Summary (Means) + +| Tier | Metric | `baseline_consumer` (1 part, `eachMessage`) | `fix_a` (6 parts, `concurrency=6`) | `fix_b` (1 part, `eachBatch`) | `fix_b` vs `baseline` | +|---|---|---|---|---|---| +| **20 VUs** | True Completed checkouts/s | 71.37 | 152.24 (+2.13x) | **251.17** | **+3.52x** | +| **20 VUs** | Consumer Lag @ 30s / Catch-up | 3,984 msgs / 57.57s | 2,142 msgs / 14.06s | **0 msgs / 0.24s** | **-100% lag** | +| **50 VUs** | True Completed checkouts/s | 56.23 | 90.74 (+1.61x) | **368.92** | **+6.56x** | +| **50 VUs** | Consumer Lag @ 30s / Catch-up | 5,645 msgs / 96.11s | 5,858 msgs / 63.70s | **0 msgs / 0.27s** | **-100% lag** | +| **100 VUs** | True Completed checkouts/s | 48.42 | 87.88 (+1.81x) | **375.75** | **+7.76x** | +| **100 VUs** | Consumer Lag @ 30s / Catch-up | 7,420 msgs / 154.33s | 7,912 msgs / 97.92s | **0 msgs / 0.31s** | **-100% lag** | + +**Key Architectural Insight**: +- **`fix_a` (6 partitions + concurrent `eachMessage`)** improves throughput ~1.6xโ€“2.1x over 1-partition `eachMessage`, but still plateaus under 100 orders/s at 50โ€“100 VUs because every message executes its own PostgreSQL transaction (`BEGIN` + `SELECT` + 3 `INSERT`s + `COMMIT` + WAL fsync), creating write contention on Postgres. +- **`fix_b` (`eachBatch`, 1 transaction per batch)** collapses dozens of per-message transactions into a single SQL transaction per Kafka batch. Even on **1 single partition**, consumer throughput catches up to full ingress (**375.75 completed checkouts/s at 100 VUs**, **0 lag**), AND eliminating hundreds of tiny `order-service` transactions/s reduces Postgres contention enough that **accepted ingress throughput also rises** (+32.9% at 100 VUs: 285.61 โ†’ 379.49 req/s, and p50 drops from 245 ms โ†’ 178 ms). + +--- + +## 2. Missing Environment Variable Audit & Validity of Earlier Results + +Prior to commit `5c7f584`, five environment variables were read in application code but omitted from `docker-compose.yml` service `environment:` blocks. + +| Missing Env Var | Service(s) | Exact Code Default When Unset | Effect Before Commit `5c7f584` | +|---|---|---|---| +| `CONSUMER_MODE` | `order-service` | `"eachMessage"` (`order-service/index.js:118`) | Always ran `eachMessage` (single-message mode); `eachBatch` could never activate via Compose. | +| `PARTITIONS_CONSUMED_CONCURRENTLY` | `order-service` | `1` (`parseInt(... \|\| "1", 10)`, `order-service/index.js:117`) | Always consumed 1 partition sequentially even on multi-partition topics. | +| `RELAY_BATCH_SEND` | `payment-service` | `false` (`process.env.RELAY_BATCH_SEND === "true"`, `payment-service/worker.js:130`) | **Always fell into the `else` branch (sequential 1-by-1 `producer.send`)** in all post-`e90c881` runs! | +| `RELAY_BUSY_PAUSE_MS` | `payment-service` | `25` ms (`parseInt(... \|\| "25", 10)`, `payment-service/worker.js:208`) | Always paused 25ms between non-empty relay batches regardless of host env overrides. | +| `OUTBOX_RETENTION_HOURS` | `payment-service`, `order-service`, `email-service` | `1` hour (`parseInt(... \|\| "1", 10)` in each `worker.js`) | Always used 1-hour retention (also note `payment-service` pruner SQL failed silently due to raw JS `Date` parameter until fixed in `5c7f584`). | + +### Validity Assessment of Earlier Results + +| Earlier Result / Experiment | Status | Exact Reason | +|---|---|---| +| **Pre-clean-rerun runs & earlier `"optimized"` run (`summary-pool_keepalive_optimized.json`)** | **SUPERSEDED** | Ran in a drifted environment (no Postgres truncation, unpruned tables) and did not drain Kafka consumer lag. Note: before `e90c881`, batched Kafka sends were hardcoded ON with 0ms busy pause, so that earlier run *did* exercise batched sends + 0ms pause, but in a drifted DB. | +| **Clean Matrix โ€” `pool_keepalive_batched` row** (`summary-pool_keepalive_batched.json`) | **SUPERSEDED / INVALID** | `RELAY_BATCH_SEND` was missing from `docker-compose.yml` and defaulted to `false` inside the container, so this row actually executed **sequential** sends (duplicate of `pool_keepalive`). Also lacked full consumer lag drain. Replaced by Section 1 (`baseline_consumer`, `fix_a`, `fix_b`) with verified `RELAY_BATCH_SEND=true`. | +| **Clean Matrix โ€” `baseline`, `pool_only`, `keepalive_only`, `pool_keepalive` (Accepted req/s, p50, p95)** | **PARTIALLY VALID (Ingress Only)** | `DB_POOL_MAX` and `PROXY_KEEP_ALIVE` *were* passed in `docker-compose.yml`, and sequential relay (`RELAY_BATCH_SEND` unset = `false`) matched their intended config. However, their **Completed checkouts/s** and **Drain Time** columns are **SUPERSEDED** because `run-benchmarks.js` only drained `outbox_events` (not Kafka consumer lag) and allowed consumer lag to carry across runs. | +| **25ms Busy-Pause Result (`102 -> 228 req/s` rebound at 20 VUs)** | **SUPERSEDED / CONFOUNDED (Observed Effect Only)** | The earlier `102 req/s` run had batched sends + 0ms pause in a drifted DB, whereas the `228 req/s` clean-matrix run accidentally had **sequential sends (`RELAY_BATCH_SEND=false`)** + 25ms pause in a clean DB. Because multiple variables changed simultaneously and no event-loop lag or PostgreSQL lock waits were measured with 0ms vs 25ms in isolation, the 25ms pause cannot be claimed as a proven causal mechanism. Under verified `RELAY_BATCH_SEND=true` + `RELAY_BUSY_PAUSE_MS=25` in Section 1, 20 VU accepted throughput is **199โ€“253 req/s**, confirming that batched sends with the 25ms pause do not starve checkouts โ€” treated strictly as an **observed effect**. | +| **Master Branch Gateway Keep-Alive Probe (`benchmarks/measure-master-gateway.mjs`)** | **VALID** | Measured directly on checked-out `master` branch `api-gateway`: 4,396 HTTP requests โ†’ 4,405 TCP ActiveOpens (141.57 opens/sec, ~1:1 ratio, proving original gateway did NOT reuse connections). | +| **Consumer Bottleneck Breakdown (`benchmarks/measure-consumer-breakdown.mjs`)** | **VALID** | Direct per-message timing inside `order-service` `eachMessage` (Section 3). | +| **Native JWT Micro-benchmark (`benchmarks/measure-jwt.js`)** | **VALID** | Measured `jwt.verify()` at 15.2 ยตs โ€“ 82.4 ยตs (mean **21.9 ยตs**). | + +--- + +## 3. Consumer Bottleneck Empirical Evidence (`order-service`) + +To isolate why single-partition `eachMessage` consumption plateaued far below ingress, high-resolution `performance.now()` instrumentation was added to `order-service/index.js` (`GET /consumer-stats`) and sampled over 500 messages via `benchmarks/measure-consumer-breakdown.mjs` (`benchmarks/raw/consumer-bottleneck-evidence.json`): + +| Phase inside `eachMessage` | Low-Contention Sample (N=500, commit `40a760d`) | Under-Load Sample (N=500, `consumer-bottleneck-evidence.json`) | Share of Total | +|---|---|---|---| +| **Atomic DB Transaction** (`orders` + `processed_events` + `outbox_events`) | avg **10.77 ms** (p50 8.92 ms, p95 22.06 ms) | avg **22.10 ms** (p50 17.14 ms, p95 50.54 ms) | **80.3% โ€“ 91.2%** | +| **Idempotency `SELECT`** (`processed_events`) | avg **2.40 ms** (p50 1.86 ms, p95 4.62 ms) | avg **2.04 ms** (p50 1.62 ms, p95 3.35 ms) | **8.4% โ€“ 17.9%** | +| **CPU / JSON Parse / Overhead** | avg **0.25 ms** (p50 0.23 ms, p95 0.38 ms) | avg **0.08 ms** (p50 0.08 ms, p95 0.12 ms) | **0.3% โ€“ 1.9%** | +| **Total per Message** | avg **13.42 ms** (p50 **11.07 ms**) | avg **24.22 ms** (p50 **19.29 ms**) | **100%** | +| **Implied 1-Partition Ceiling** | **74.5 โ€“ 90.3 msgs/s** | **41.3 โ€“ 51.8 msgs/s** | โ€” | + +**Conclusion**: **98.2% โ€“ 99.7%** of `order-service` message processing time is PostgreSQL I/O (not Node.js CPU or JSON parsing). Under sequential 1-partition `eachMessage` processing, each message incurs its own transaction commit latency (~11โ€“24 ms), capping throughput at ~48โ€“90 orders/s depending on concurrent DB write load โ€” closely matching our measured `baseline_consumer` true completed rates (71.37/s at 20 VUs, 56.23/s at 50 VUs, 48.42/s at 100 VUs). + +--- + +## 4. Shared Outbox Backlog, Per-Topic Indexes & Real-Postgres Pruner Verification + +### Backlog Composition & Architectural Choice +All three transactional services (`payment-service`, `order-service`, `email-service`) share the `outbox_events` table in PostgreSQL, distinguished by the `topic` column (`payment-successful`, `order-successful`, `email-successful`). Previously, only `payment-successful` had a partial index and pruning logic; published rows for `order-successful` and `email-successful` accumulated unbounded (>93,000 rows each during extended runs), causing full table scans on those workers' relay queries. + +**Choice โ€” Shared Table with Per-Topic Partial Indexes & Scoped Pruning (vs. Separate Tables per Service)**: +We retained the single `outbox_events` table and added dedicated partial indexes + scoped pruners for each topic: +- `idx_outbox_events_payment_unpublished`: `(created_at ASC) WHERE published = false AND topic = 'payment-successful'` +- `idx_outbox_events_order_unpublished`: `(created_at ASC) WHERE published = false AND topic = 'order-successful'` +- `idx_outbox_events_email_unpublished`: `(created_at ASC) WHERE published = false AND topic = 'email-successful'` +- Each service's `worker.js` runs its own topic-scoped pruner (`DELETE FROM outbox_events WHERE published = true AND topic = '' AND created_at < NOW() - INTERVAL '1 hour' * $1`), eliminating cross-service deletion risk. +- **Why this choice for Phase 1**: Preserves atomic local DB transactions across all three services without introducing schema migrations/multiple database instances yet, while giving each service an isolated O(unpublished) index and bounded table size. (In a future production microservice split with separate database-per-service instances, each service would naturally own its own `outbox_events` table.) + +### Real-Postgres Outbox Pruner Integration Test (`scripts/test-outbox-pruner.js`) +Executed against live `streammart-postgres` (no mocks): +- Inserted 6 rows: 2 old published `payment-successful` (2โ€“3h old), 1 recent published `payment-successful` (10m old), 1 old **unpublished** `payment-successful` (2h old, `published = false`), 1 old published `order-successful` (2h old), and 1 old published `email-successful` (2h old). +- Ran real `prunePublishedEvents(true)`, `pruneOrderOutboxEvents(1)`, and `pruneEmailOutboxEvents(1)` inside each service image: + - Deleted 2 `payment-successful`, 1 `order-successful`, and 1 `email-successful` old published rows. + - Retained both the recent published row (10m old) and the old **unpublished** row (`published = false`). +- Pruner errors now log loudly (`๐Ÿšจ [CRITICAL][Outbox Pruner] PRUNE FAILED`) and are exposed in `GET /relay-status` (`pruner.lastError`, `pruner.consecutiveErrors`, `pruner.lastRunAt`, `pruner.lastDeletedCount`; verified in unit tests `payment-service/tests/payment.test.js` 7/7 passing and live `/relay-status` probe). + +--- + +## 5. Split Health Checks & Relay Startup Resilience Verification + +- **`GET /health` (Liveness)**: Always returns **200 OK** while the `payment-service` HTTP process is alive. Used by `docker-compose.yml` healthcheck and `api-gateway` `depends_on` so Kafka outages NEVER restart `payment-service` or block checkout ingestion. +- **`GET /relay-status` (Relay & Pruner Readiness)**: Returns **503 Service Unavailable** (JSON) when the Kafka outbox relay loop is disconnected, and **200 OK** (JSON with `status: "ok"` or `"degraded"` if `pruner.lastError` is non-null) when connected. Not referenced by any `docker-compose.yml` `depends_on` or restart policy. + +**Verbatim Output (`node scripts/test-relay-startup.js`)**: +```text +=========================================================================== +๐Ÿงช Relay Startup Integration Test: Kafka Down -> Startup -> Up -> Deliver +=========================================================================== +Test user: user_startup_1795012091881 +[Step 1] Ensuring clean database and Kafka state for test isolation... +TRUNCATE TABLE + Baseline DB State: 0 payments, 0 orders + +[Step 2] Stopping Kafka broker (docker stop streammart-kafka)... +๐Ÿ›‘ Kafka broker stopped. + +[Step 3] Restarting payment-service with Kafka DOWN (docker restart streammart-payment)... + +[Step 4] Probing payment-service /health and /relay-status while Kafka is down... + Liveness (/health) response: {"status":200,"text":"Payment Service OK"} + Relay Status (/relay-status) response: {"status":503,"text":"{\"status\":\"unhealthy\",\"message\":\"Payment Service Relay Loop Not Running\",\"relayRunning\":false,\"kafkaConnected\":false,\"pruner\":{\"lastRunAt\":null,\"lastDeletedCount\":0,\"lastError\":null,\"lastErrorAt\":null,\"consecutiveErrors\":0}}"} +โœ… PASS: /health returned 200 (process alive) and /relay-status returned 503 (relay loop not connected to Kafka). + +[Step 5] Submitting checkout to payment-service while Kafka is down... + Payment response: {"status":200,"text":"Payment processed and event safely queued in outbox."} +โœ… PASS: Payment accepted (HTTP 200) and atomically queued in outbox table. + +[Step 6] Verifying database isolation while Kafka is down... + - Unpublished outbox row for user: 1 (Expected: 1) + - Orders created for user while Kafka down: 0 (Expected: 0) +โœ… PASS: Event safely buffered in outbox table with published = false. + +[Step 7] Bringing Kafka UP (docker start streammart-kafka)... +โœ… Kafka broker is back ONLINE and HEALTHY. + +[Step 8] Waiting for payment relay retry loop to connect and /relay-status to return 200... + /relay-status returned 200 OK after 1s! Message: "{"status":"ok","message":"Payment Service Relay Running","relayRunning":true,"kafkaConnected":true,"pruner":{"lastRunAt":"2026-11-18T14:29:01.299Z","lastDeletedCount":0,"lastError":null,"lastErrorAt":null,"consecutiveErrors":0}}" +โœ… PASS: /relay-status successfully transitioned to 200 OK upon Kafka reconnection. + +[Step 9] Confirming event delivery and downstream order processing... +โœ… PASS: Event published to Kafka (published = true) and order-service created order for user_startup_1795012091881! + +=========================================================================== +๐ŸŽ‰ SUCCESS: Relay startup test complete! Kafka connect retry with backoff, + 503 health check under outage, and zero-loss event delivery verified! +=========================================================================== +``` + +--- + +## 6. Historical Clean Matrix Archive (Partially Superseded โ€” Retained for Reference) + +> [!WARNING] +> **Superseded Notice**: +> - The **`pool_keepalive_batched`** row below is **SUPERSEDED / INVALID** (ran with `RELAY_BATCH_SEND=false` because `docker-compose.yml` did not forward it). +> - All **Completed checkouts/s** and **Drain Time** columns below are **SUPERSEDED** (measured outbox drain only, not Kafka consumer lag = 0; runs started with leftover consumer lag). +> - All **pre-clean-rerun** numbers (from earlier un-reset runs) are **SUPERSEDED** and removed from active tables. +> - **Accepted req/s, p50, and p95** for `baseline`, `pool_only`, `keepalive_only`, and `pool_keepalive` remain **VALID** for ingress under sequential relay sends + 25ms pause. + +### Accepted Throughput (accepted req/s) โ€” mean [min โ€“ max] + +| Configuration | Validity | 20 VUs | 50 VUs | 100 VUs | +|---|---|---|---|---| +| `baseline` (`DB_POOL_MAX=10`, `PROXY_KEEP_ALIVE=false`, seq relay) | Valid (ingress) | 152.81 [135.17 โ€“ 170.40] | 154.50 [115.15 โ€“ 176.64] | 138.39 [103.39 โ€“ 182.07] | +| `pool_only` (`DB_POOL_MAX=30`, `PROXY_KEEP_ALIVE=false`, seq relay) | Valid (ingress) | 186.46 [175.11 โ€“ 192.31] | 212.06 [199.87 โ€“ 222.66] | 214.61 [205.41 โ€“ 222.26] | +| `keepalive_only` (`DB_POOL_MAX=10`, `PROXY_KEEP_ALIVE=true`, seq relay) | Valid (ingress) | 225.29 [200.28 โ€“ 238.85] | 316.84 [309.33 โ€“ 325.95] | 327.18 [320.60 โ€“ 332.06] | +| `pool_keepalive` (`DB_POOL_MAX=30`, `PROXY_KEEP_ALIVE=true`, seq relay) | Valid (ingress) | 231.37 [226.94 โ€“ 234.56] | 310.49 [275.76 โ€“ 337.35] | 329.52 [314.51 โ€“ 339.80] | +| ~~`pool_keepalive_batched`~~ | **SUPERSEDED** (`RELAY_BATCH_SEND` unset = `false`) | ~~228.35 [217.51 โ€“ 237.44]~~ | ~~337.78 [336.77 โ€“ 339.37]~~ | ~~332.69 [320.88 โ€“ 340.20]~~ | + +### Latency p50 / p95 (ms) โ€” mean [min โ€“ max] + +| Configuration | Validity | 20 VUs (p50 / p95) | 50 VUs (p50 / p95) | 100 VUs (p50 / p95) | +|---|---|---|---|---| +| `baseline` | Valid (ingress) | 57.85 / 152.93 | 219.11 / 425.59 | 479.24 / 1,356.51 | +| `pool_only` | Valid (ingress) | 45.36 / 87.19 | 163.20 / 236.29 | 384.15 / 493.28 | +| `keepalive_only` | Valid (ingress) | 29.07 / 60.68 | 94.78 / 150.17 | 230.61 / 323.27 | +| `pool_keepalive` | Valid (ingress) | 30.75 / 58.89 | 92.10 / 140.21 | 221.04 / 389.39 | +| ~~`pool_keepalive_batched`~~ | **SUPERSEDED** | ~~31.83 / 59.24~~ | ~~88.85 / 131.21~~ | ~~215.13 / 381.28~~ | + +### Historical Completed Checkouts/s & Outbox Drain (ALL ROWS SUPERSEDED โ€” Replaced by Section 1) + +| Configuration | Status | 20 VUs (Completed/s) | 50 VUs (Completed/s) | 100 VUs (Completed/s) | +|---|---|---|---|---| +| ~~`baseline`~~ | **SUPERSEDED** (no consumer lag drain) | ~~71.04 [64.02 โ€“ 82.82]~~ | ~~62.09 [43.19 โ€“ 74.24]~~ | ~~61.39 [47.15 โ€“ 82.66]~~ | +| ~~`pool_only`~~ | **SUPERSEDED** (no consumer lag drain) | ~~89.48 [86.33 โ€“ 95.07]~~ | ~~88.92 [82.39 โ€“ 96.43]~~ | ~~89.13 [84.04 โ€“ 94.27]~~ | +| ~~`keepalive_only`~~ | **SUPERSEDED** (no consumer lag drain) | ~~103.60 [84.90 โ€“ 114.05]~~ | ~~104.54 [100.12 โ€“ 111.92]~~ | ~~106.40 [102.80 โ€“ 113.45]~~ | +| ~~`pool_keepalive`~~ | **SUPERSEDED** (no consumer lag drain) | ~~105.22 [104.09 โ€“ 107.24]~~ | ~~104.94 [97.15 โ€“ 111.20]~~ | ~~106.38 [101.11 โ€“ 114.52]~~ | +| ~~`pool_keepalive_batched`~~ | **SUPERSEDED** (`RELAY_BATCH_SEND=false` + no consumer lag drain) | ~~106.62 [100.00 โ€“ 117.30]~~ | ~~106.64 [102.87 โ€“ 113.70]~~ | ~~106.37 [101.43 โ€“ 114.21]~~ | + +--- + +## 7. Validated Micro-Benchmarks & Architectural Findings (Retained) + +1. **Original Master Branch Gateway Keep-Alive (`benchmarks/measure-master-gateway.mjs`)**: Under 20 VUs (30s), original `master` `api-gateway` proxied 4,396 HTTP requests and opened 4,405 outbound TCP connections (**141.57 TCP opens/sec**, ~1:1 ratio). The original gateway did **not** reuse connections because omitting `agent` in `http-proxy-middleware` defaults to `agent: false`. +2. **Native JWT Verification (`benchmarks/measure-jwt.js`)**: `jwt.verify()` takes **15.2 ยตs โ€“ 82.4 ยตs (mean: 21.9 ยตs)** in Node.js. +3. **Shared Outbox Deletion Impact**: Because `payment-service`, `order-service`, and `email-service` share `outbox_events`, the earlier manual `DELETE WHERE topic != 'payment-successful'` permanently deleted `order-successful` and `email-successful` events (both pending notifications and historical audit rows). All pruning is now strictly topic-scoped (`AND topic = '' AND published = true`). diff --git a/README.md b/README.md index 6142bc6..18e094a 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,153 @@ -# ๐Ÿ›’ StreamMart: Enterprise Microservices Architecture +# StreamMart: Event-Driven E-Commerce Microservices
Architecture - Kafka - Neon + Kafka + PostgreSQL Drizzle - Kubernetes + Outbox + Docker
-## ๐Ÿ“– Overview -StreamMart is an enterprise-grade, event-driven e-commerce microservices architecture. It demonstrates modern backend patterns required for high-availability, fault-tolerant distributed systems. +## Overview -## ๐Ÿ—๏ธ Architecture & Workflow +StreamMart is an event-driven e-commerce microservices system built with Node.js, Apache Kafka (KRaft), PostgreSQL 16, Drizzle ORM, and Docker Compose. It demonstrates reliable asynchronous event processing using the **Transactional Outbox** pattern (`SELECT ... FOR UPDATE SKIP LOCKED`), **idempotent batch consumers** (`eachBatch` with `processed_events`), **per-message poison-pill fallback to a Dead Letter Queue (DLQ)**, deterministic partition keys, and distributed event lineage (`eventId`, `correlationId`, `causationId`). -The system is fully decoupled using **Apache Kafka** as the central message broker, allowing services to scale independently without bottlenecking synchronous HTTP chains. +--- + +## Architecture ```mermaid -graph TD - Client[Next.js Client UI] -->|JWT Auth & REST API| Gateway[API Gateway Port: 8080] - - Gateway -->|HTTP POST| Payment[Payment Service] - Gateway -->|HTTP GET/POST| Order[Order Service] - - subgraph Transactional Outbox Pattern - Payment -->|Tx Insert| DB[(Neon PostgreSQL)] - PaymentWorker[Outbox Worker] -.->|1. Poll Events| DB - PaymentWorker -->|2. Reliable Publish| Kafka[Apache Kafka] +flowchart TD + Client["Client / Load Generator"] -->|"HTTP + JWT (Port 8085)"| Gateway["API Gateway"] + Gateway -->|"HTTP Keep-Alive POST /payment"| Payment["Payment Service"] + + subgraph Storage["PostgreSQL 16"] + PaymentsTbl[("payments")] + OrdersTbl[("orders")] + OutboxTbl[("outbox_events\n(topic-scoped partial indexes)")] + ProcessedTbl[("processed_events\n(event_id, service_name PK)")] + end + + subgraph Broker["Apache Kafka 3.7 (KRaft)"] + T1["Topic: payment-successful\nkey = userId"] + T2["Topic: order-successful\nkey = orderId"] + T3["Topic: email-successful\nkey = orderId"] + DLQ["Topic: payment-successful.DLQ\nkey = eventId"] end - - Kafka -->|Topic: payment-successful| Order - Kafka -->|Topic: payment-successful| Analytics[Analytic Service] - Kafka -->|Topic: order-successful| Email[Email Service] - - Order -->|SQL Transactions| DB + + Payment -->|"1. Atomic Tx: payment + outbox"| PaymentsTbl + Payment -->|"1. Atomic Tx"| OutboxTbl + OutboxTbl -.->|"2. Payment Outbox Relay\nSKIP LOCKED"| T1 + + T1 -->|"eachBatch consumer"| Order["Order Service"] + Order -->|"Atomic Batch Tx: orders +\nprocessed_events + outbox"| OrdersTbl + Order --> ProcessedTbl + Order --> OutboxTbl + Order -->|"Fallback 1-by-1 after 3 retries\n(poison message only)"| DLQ + OutboxTbl -.->|"Order Outbox Relay\nSKIP LOCKED"| T2 + + T2 -->|"eachBatch consumer"| Email["Email Service"] + Email -->|"Dispatch receipt +\nAtomic Batch Tx"| ProcessedTbl + Email --> OutboxTbl + OutboxTbl -.->|"Email Outbox Relay\nSKIP LOCKED"| T3 + + T1 -->|"eachBatch consumer"| Analytic["Analytic Service"] + T2 -->|"eachBatch consumer"| Analytic + T3 -->|"eachBatch consumer"| Analytic + Analytic -->|"Bulk ON CONFLICT DO NOTHING"| ProcessedTbl ``` -## ๐Ÿ› ๏ธ Technology Stack -- **Frontend**: Next.js 14, React, TailwindCSS -- **API Gateway**: Node.js, Express, `http-proxy-middleware`, JWT Authentication -- **Microservices**: Node.js (Order, Payment, Analytics, Email) -- **Message Broker**: Apache Kafka & Zookeeper -- **Database**: Neon (Serverless PostgreSQL) -- **ORM & Migrations**: Drizzle ORM -- **Containerization & DevOps**: Docker, Docker Compose, Kubernetes (`kubectl`) +### Core Reliability Patterns + +1. **Transactional Outbox (`outbox_events`)**: `payment-service`, `order-service`, and `email-service` write business state and outgoing events in a single PostgreSQL transaction. Background relay workers claim rows with `SELECT ... FOR UPDATE SKIP LOCKED`, publish to Kafka, and mark `published = true`, while topic-scoped pruners clean up published rows older than `OUTBOX_RETENTION_HOURS`. +2. **Idempotent Consumers (`processed_events`)**: `order-service`, `email-service`, and `analytic-service` deduplicate incoming events on `(event_id, service_name)`. Redeliveries after a crash before Kafka offset commit skip already-processed events cleanly (zero duplicate orders). +3. **Poison-Message Fallback in `eachBatch`**: If a batch transaction in `order-service` fails, the transaction rolls back cleanly and `order-service` falls back to processing that batch one message at a time in offset order. Valid messages still commit; after 3 retries, only the failing message is sent to `payment-successful.DLQ` and the consumer continues without getting stuck. +4. **Split Health Checks (`payment-service`)**: `GET /health` reports process liveness (200 even during a Kafka outage so checkouts keep succeeding into PostgreSQL), while `GET /relay-status` reports Kafka relay and outbox pruner health (503 when disconnected from Kafka). + +--- + +## Verified Benchmarks (Full-Drain Results Only) + +All numbers below come from clean, reset-database, full-drain runs with raw outputs stored in `benchmarks/raw/` and detailed methodology in [PHASE1-BENCHMARKS.md](PHASE1-BENCHMARKS.md). + +**Host for every benchmark row below**: Single local laptop โ€” AMD Ryzen 7 6800H (8 physical cores / 16 threads @ 3.20 GHz), 16 GB RAM, Windows 11 Home (64-bit), Docker Desktop (WSL2). All 7 Docker containers and the k6 load generator ran on the same machine. + +### 1. Order Consumer Throughput & Lag (`baseline_consumer` vs `fix_a` vs `fix_b`) -## ๐Ÿ’ก Key Design Decisions +| Configuration | Workload | Host | Accepted req/s (mean) | True Completed checkouts/s (mean) | Order Lag @ 30s (mean) | Catch-up to Lag 0 (mean) | p50 / p95 Latency (ms) | +| :--- | :--- | :--- | :---: | :---: | :---: | :---: | :---: | +| `baseline_consumer` (1 part, `order=eachMessage`) | 20 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 199.06 | 71.37 | 3,984 msgs | 57.57s | 41.49 / 104.31 | +| `baseline_consumer` (1 part, `order=eachMessage`) | 50 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 227.17 | 56.23 | 5,645 msgs | 96.11s | 135.36 / 350.41 | +| `baseline_consumer` (1 part, `order=eachMessage`) | 100 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 285.61 | 48.42 | 7,420 msgs | 154.33s | 245.14 / 496.65 | +| `fix_a` (6 parts, `order=eachMessage`, `concurrency=6`) | 20 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 220.04 | 152.24 | 2,142 msgs | 14.06s | 33.44 / 75.09 | +| `fix_a` (6 parts, `order=eachMessage`, `concurrency=6`) | 50 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 273.48 | 90.74 | 5,858 msgs | 63.70s | 111.33 / 218.66 | +| `fix_a` (6 parts, `order=eachMessage`, `concurrency=6`) | 100 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 340.17 | 87.88 | 7,912 msgs | 97.92s | 205.64 / 399.67 | +| `fix_b` (1 part, `order=eachBatch`) | 20 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 253.12 | 251.17 | 0 msgs | 0.24s | 21.77 / 55.91 | +| `fix_b` (1 part, `order=eachBatch`) | 50 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 372.13 | 368.92 | 0 msgs | 0.27s | 74.00 / 140.81 | +| `fix_b` (1 part, `order=eachBatch`) | 100 VUs, 30s k6, 1,000 JWTs, 3 runs, full order drain | Ryzen 7 6800H / 16 GB / WSL2 | 379.49 | 375.75 | 0 msgs | 0.31s | 178.47 / 374.79 | -### 1. Transactional Outbox Pattern (Reliability) -**The Problem:** If a service saves data to the database but fails to subsequently publish that event to Kafka (due to a network crash), the distributed system state becomes permanently inconsistent. -**The Solution:** The `payment-service` uses Drizzle ORM to **atomically** insert the payment record AND an event into a local `outbox_events` table in a single SQL transaction. A background worker then polls this table and reliably pushes events to Kafka, guaranteeing *at-least-once* delivery. +### 2. Full-Pipeline Downstream Consumer Lag (`email-service` & `analytic-service` under `fix_b`) -### 2. Drizzle ORM & Neon Postgres (Scalability vs Vendor Lock-In) -Using **Neon** provides seamless serverless database scaling on AWS infrastructure under the hood, while **Drizzle ORM** prevents vendor lock-in. By relying purely on standard SQL schemas and standard PostgreSQL configurations rather than proprietary SDKs, the persistence layer can be instantly ported to AWS RDS or GCP Cloud SQL if enterprise requirements pivot. +| Configuration | Workload | Host | Accepted req/s (mean) | Order Lag @ 30s / Catch-up | Email Lag @ 30s / Catch-up | Analytic Lag @ 30s / Catch-up (3x events) | +| :--- | :--- | :--- | :---: | :---: | :---: | :---: | +| Before (`order=eachBatch`, `email=eachMessage`, `analytic=eachMessage`) | 50 VUs, 30s k6, 1,000 JWTs, 3 runs, full 3-service drain | Ryzen 7 6800H / 16 GB / WSL2 | 304.48 | 0 msgs / 0.00s | 6,242 msgs / 48.68s | 23,661 msgs / 112.34s | +| Before (`order=eachBatch`, `email=eachMessage`, `analytic=eachMessage`) | 100 VUs, 30s k6, 1,000 JWTs, 3 runs, full 3-service drain | Ryzen 7 6800H / 16 GB / WSL2 | 274.86 | 0 msgs / 0.00s | 5,050 msgs / 44.09s | 20,480 msgs / 97.15s | +| Final (`order=eachBatch`, `email=eachBatch`, `analytic=eachBatch`, batched relays) | 50 VUs, 30s k6, 1,000 JWTs, 3 runs, full 3-service drain | Ryzen 7 6800H / 16 GB / WSL2 | 264.53 | 0 msgs / 0.00s | 0 msgs / 0.00s | 0 msgs / 0.00s | +| Final (`order=eachBatch`, `email=eachBatch`, `analytic=eachBatch`, batched relays) | 100 VUs, 30s k6, 1,000 JWTs, 3 runs, full 3-service drain | Ryzen 7 6800H / 16 GB / WSL2 | 319.53 | 0 msgs / 0.00s | 0 msgs / 0.00s | 0 msgs / 0.00s | -### 3. API Gateway & Centralized JWT Auth (Security) -Instead of exposing fragmented microservices directly to the front-end client (which creates security risks and CORS nightmares), a unified API Gateway acts as a reverse proxy. It intercepts requests, validates JSON Web Tokens (JWT), and securely routes traffic to internal cluster IPs, drastically reducing the attack surface area. +### 3. Resilience & Fault-Tolerance Verification (Final Code) -## ๐Ÿš€ Getting Started Locally +| Test Script | Workload / Failure Mode | Host | Verified Raw Counts | +| :--- | :--- | :--- | :--- | +| `scripts/test-poison-batch.js` | 50-msg batch (49 valid + 1 `userId=null` DB error) + 1 follow-up msg | Ryzen 7 6800H / 16 GB / WSL2 | 49/49 orders created, 1 message in `payment-successful.DLQ`, follow-up #51 processed (1/1), Kafka lag = 0 | +| `scripts/test-mid-batch-crash.js` | 50-msg batch committed to DB, `SIGKILL` before offset commit, restart | Ryzen 7 6800H / 16 GB / WSL2 | Lag before kill = 50; after restart: 50/50 orders present, 0 duplicates, 50/50 outbox published, lag = 0 | +| `scripts/test-outbox-outage.js` | Stop Kafka, send 500 checkouts, restart Kafka + 2 `SKIP LOCKED` relays | Ryzen 7 6800H / 16 GB / WSL2 | 500/500 HTTP 200 in 2.21s (0 orders while down); after recovery: 500/500 orders in 31.1s, 0 lost, 0 duplicates | +| `scripts/test-order-crash-recovery.js` | Kill `order-service` after DB commit and before outbox publish | Ryzen 7 6800H / 16 GB / WSL2 | 1/1 order persisted, 0 duplicates, 1/1 `order-successful` published, 1/1 email processed | -### 1. Configure the Database -1. Create a free Serverless Postgres database on [Neon.tech](https://neon.tech). -2. Copy `.env.template` to `.env` and insert your Neon `DATABASE_URL`. -3. In both the `payment-service` and `order-service` directories, execute the migration: - ```bash - npx drizzle-kit push - ``` +--- -### 2. Spin Up the Cluster -Run the entire architecture at once securely using Docker Compose! Ensure Docker Desktop is running, then execute: +## Limitations + +- **Single-laptop benchmark host**: All 7 Docker containers (PostgreSQL, Kafka, API Gateway, and 4 microservices) plus the k6 load generator ran on one laptop (Ryzen 7 6800H, 16 GB RAM, Docker Desktop WSL2). Numbers reflect relative behavior under shared CPU/disk contention, not isolated multi-node production capacity. +- **Shared `outbox_events` table**: `payment-service`, `order-service`, and `email-service` share a single PostgreSQL database and `outbox_events` table, isolated logically by `topic`, per-topic partial indexes, and topic-scoped pruners. A full production microservice split would give each service its own database instance and outbox table. +- **25 ms relay busy pause (`RELAY_BUSY_PAUSE_MS=25`) is an observed effect**: Early comparisons between 0 ms and 25 ms were confounded by environment drift and unforwarded env vars; no isolated event-loop lag or PostgreSQL lock-wait experiment proved 25 ms as a causal mechanism. Under verified `RELAY_BATCH_SEND=true` + `RELAY_BUSY_PAUSE_MS=25`, batched sends do not starve checkout ingress, and this setting is documented strictly as an observed working parameter. +- **`DEMO_AUTH` token endpoint is for demos and local testing only**: `POST /api/auth/token` and `POST /api/auth/tokens/batch` on `api-gateway` mint unsigned-passwordless demo JWTs for local tests, benchmarks, and demos. They are explicitly gated off (HTTP 404) whenever `NODE_ENV=production` or `DEMO_AUTH !== "true"`, and must never be enabled in production. + +--- + +## Technology Stack + +- **API Gateway**: Node.js, Express, `http-proxy-middleware` (HTTP keep-alive), JWT verification +- **Microservices**: Node.js (`payment-service`, `order-service`, `email-service`, `analytic-service`) +- **Message Broker**: Apache Kafka 3.7.0 (KRaft mode โ€” no Zookeeper) +- **Database & ORM**: PostgreSQL 16 (`postgres:16-alpine`), Drizzle ORM +- **Testing & CI**: Node test runner, Jest, Supertest, k6, GitHub Actions (unit tests + Docker Compose resilience suite) +- **Containerization**: Docker & Docker Compose (`docker-compose.yml`) + +--- + +## Running Locally + +### 1. Start the Full Stack ```bash -docker-compose up --build -d +docker compose up -d --build --wait +``` + +### 2. Run the Narrated Kafka Outage Demo +```bash +npm run demo:outage +``` +Stops Kafka, sends 20 checkouts through the API Gateway (showing HTTP 200 responses and queued Postgres outbox rows while Kafka is down), restarts Kafka, and displays every checkout completing end-to-end with 0 lost and 0 duplicates. + +### 3. Run Unit & Resilience Tests +```bash +# Unit test suites across all 5 services +npm test + +# Live Docker Compose resilience tests +node scripts/test-poison-batch.js +node scripts/test-mid-batch-crash.js +node scripts/test-order-crash-recovery.js +node scripts/test-outbox-outage.js ``` -Visit `http://localhost:3000` to interact with the Next.js frontend in real time! diff --git a/analytic-service/consumer-processor.js b/analytic-service/consumer-processor.js new file mode 100644 index 0000000..be31fc3 --- /dev/null +++ b/analytic-service/consumer-processor.js @@ -0,0 +1,122 @@ +import { and, eq, inArray } from "drizzle-orm"; + +export function isDuplicateConstraintError(err) { + const code = err?.code || err?.cause?.code; + const msg = err?.message || ""; + const causeMsg = err?.cause?.message || ""; + return ( + code === "23505" || + msg.includes("duplicate key") || + msg.includes("processed_events_pkey") || + msg.includes("unique constraint") || + causeMsg.includes("duplicate key") || + causeMsg.includes("processed_events_pkey") || + causeMsg.includes("unique constraint") + ); +} + +export async function processAnalyticBatch({ + batch, + resolveOffset, + heartbeat, + commitOffsetsIfNecessary, + isRunning, + isStale, + db, + tables, +}) { + if (!isRunning() || isStale()) { + return { mode: "skipped_not_running", processedCount: 0, skippedDuplicates: 0 }; + } + + const { processedEvents } = tables; + const parsedItems = []; + + for (const message of batch.messages) { + const raw = message.value ? message.value.toString() : ""; + try { + const data = JSON.parse(raw); + parsedItems.push({ + message, + data, + eventId: data.eventId == null ? "" : String(data.eventId), + }); + } catch (parseErr) { + console.error(`Analytic Service [JSON Error] topic=${batch.topic} offset=${message.offset}:`, parseErr.message); + } + } + + // 1. Bulk idempotency check + const eventIds = parsedItems.map((p) => p.eventId).filter(Boolean); + let existingSet = new Set(); + if (db && eventIds.length > 0) { + try { + const existing = await db + .select({ eventId: processedEvents.eventId }) + .from(processedEvents) + .where( + and( + inArray(processedEvents.eventId, eventIds), + eq(processedEvents.serviceName, "analytic-service") + ) + ); + existingSet = new Set(existing.map((e) => e.eventId)); + } catch (e) { + console.error("Analytic Service: Bulk idempotency check failed:", e.message); + } + } + + const seenInBatch = new Set(); + const newItems = []; + let skippedDuplicates = 0; + + for (const item of parsedItems) { + if (item.eventId && (existingSet.has(item.eventId) || seenInBatch.has(item.eventId))) { + skippedDuplicates++; + continue; + } + if (item.eventId) seenInBatch.add(item.eventId); + newItems.push(item); + } + + // 2. Single bulk insert into processed_events for all new events in this batch + const toInsert = newItems + .filter((item) => item.eventId) + .map((item) => ({ + eventId: item.eventId, + serviceName: "analytic-service", + })); + + if (db && toInsert.length > 0) { + try { + await db.insert(processedEvents).values(toInsert).onConflictDoNothing(); + } catch (batchErr) { + console.warn( + `Analytic Service [eachBatch Fallback]: Bulk insert failed (${batchErr.message}). Processing ${toInsert.length} event(s) individually...` + ); + for (const row of toInsert) { + try { + await db.insert(processedEvents).values(row).onConflictDoNothing(); + } catch (singleErr) { + if (!isDuplicateConstraintError(singleErr)) { + console.error(`Analytic Service: Failed to record event ${row.eventId}:`, singleErr.message); + } + } + } + } + } + + for (const message of batch.messages) { + resolveOffset(message.offset); + } + if (commitOffsetsIfNecessary) { + await commitOffsetsIfNecessary(); + } + await heartbeat(); + + return { + mode: "batch", + processedCount: newItems.length, + skippedDuplicates, + }; +} diff --git a/analytic-service/db/index.js b/analytic-service/db/index.js new file mode 100644 index 0000000..1d88781 --- /dev/null +++ b/analytic-service/db/index.js @@ -0,0 +1,8 @@ +import { drizzle } from 'drizzle-orm/postgres-js'; +import postgres from 'postgres'; +import * as schema from './schema.js'; + +const connectionString = process.env.DATABASE_URL; +const poolMax = parseInt(process.env.DB_POOL_MAX || '10', 10); +const client = connectionString ? postgres(connectionString, { max: poolMax, prepare: false }) : null; +export const db = client ? drizzle(client, { schema }) : null; diff --git a/analytic-service/db/schema.js b/analytic-service/db/schema.js new file mode 100644 index 0000000..8983478 --- /dev/null +++ b/analytic-service/db/schema.js @@ -0,0 +1,9 @@ +import { pgTable, text, timestamp, primaryKey } from 'drizzle-orm/pg-core'; + +export const processedEvents = pgTable('processed_events', { + eventId: text('event_id').notNull(), + serviceName: text('service_name').notNull(), + processedAt: timestamp('processed_at').defaultNow().notNull(), +}, (table) => [ + primaryKey({ columns: [table.eventId, table.serviceName] }) +]); diff --git a/analytic-service/index.js b/analytic-service/index.js index 706eedd..441796f 100644 --- a/analytic-service/index.js +++ b/analytic-service/index.js @@ -1,4 +1,39 @@ +import http from "node:http"; import { Kafka } from "kafkajs"; +import { db } from "./db/index.js"; +import { processedEvents } from "./db/schema.js"; +import { and, eq } from "drizzle-orm"; +import { processAnalyticBatch } from "./consumer-processor.js"; + +let isReady = false; +let isShuttingDown = false; +let inflightMessages = 0; + +// Health check server for container orchestration +const healthServer = http.createServer((req, res) => { + if (req.url === "/health") { + if (isReady && !isShuttingDown) { + res.writeHead(200, { "Content-Type": "text/plain" }); + res.end("Analytic Service OK"); + } else { + res.writeHead(503, { "Content-Type": "text/plain" }); + res.end(isShuttingDown ? "Analytic Service Shutting Down" : "Analytic Service Starting..."); + } + } else { + res.writeHead(404); + res.end(); + } +}); + +const HEALTH_PORT = process.env.PORT || 8003; +healthServer.listen(HEALTH_PORT, () => { + const effectivePoolMax = parseInt(process.env.DB_POOL_MAX || "10", 10); + const effectiveConsumerMode = process.env.ANALYTIC_CONSUMER_MODE || process.env.CONSUMER_MODE || "eachBatch"; + console.log(`๐Ÿš€ Analytic service health server listening on port ${HEALTH_PORT}`); + console.log( + `[EFFECTIVE CONFIG] analytic-service: PORT=${HEALTH_PORT}, DB_POOL_MAX=${effectivePoolMax}, CONSUMER_MODE=${effectiveConsumerMode}, KAFKA_BROKERS=${process.env.KAFKA_BROKERS || "localhost:9092"}` + ); +}); const kafka = new Kafka({ clientId: "analytic-service", @@ -6,7 +41,7 @@ const kafka = new Kafka({ ...(process.env.KAFKA_SASL_USERNAME && { ssl: true, sasl: { - mechanism: 'plain', + mechanism: "plain", username: process.env.KAFKA_SASL_USERNAME, password: process.env.KAFKA_SASL_PASSWORD, }, @@ -16,53 +51,165 @@ const kafka = new Kafka({ const consumer = kafka.consumer({ groupId: "analytic-service" }); const run = async () => { - try { - await consumer.connect(); - await consumer.subscribe({ - topics: ["payment-successful", "order-successful", "email-successful"], - fromBeginning: true, - }); + let connected = false; + while (!connected && !isShuttingDown) { + try { + await consumer.connect(); + await consumer.subscribe({ + topics: ["payment-successful", "order-successful", "email-successful"], + fromBeginning: true, + }); + connected = true; + isReady = true; + console.log("Analytic Service: Connected to Kafka and subscribed to topics"); + } catch (err) { + console.warn("Analytic Service: Retrying Kafka connection/subscription in 2s...", err.message); + await new Promise((r) => setTimeout(r, 2000)); + } + } + + if (isShuttingDown) return; + const consumerMode = process.env.ANALYTIC_CONSUMER_MODE || process.env.CONSUMER_MODE || "eachBatch"; + const tables = { processedEvents }; + console.log(`Analytic Service: Running consumer with mode=${consumerMode}`); + + if (consumerMode === "eachBatch") { + await consumer.run({ + eachBatch: async ({ batch, resolveOffset, heartbeat, commitOffsetsIfNecessary, isRunning, isStale }) => { + if (!isRunning() || isStale()) return; + inflightMessages += batch.messages.length; + try { + await processAnalyticBatch({ + batch, + resolveOffset, + heartbeat, + commitOffsetsIfNecessary, + isRunning, + isStale, + db, + tables, + }); + } finally { + inflightMessages = Math.max(0, inflightMessages - batch.messages.length); + } + }, + }); + } else { await consumer.run({ eachMessage: async ({ topic, partition, message }) => { - switch (topic) { - case "payment-successful": - { - const value = message.value.toString(); - const { userId, cart } = JSON.parse(value); + inflightMessages++; + try { + const value = message.value.toString(); + const data = JSON.parse(value); + const { eventId, correlationId, causationId } = data; - const total = cart - .reduce((acc, item) => acc + item.price, 0) - .toFixed(2); + // 1. Consumer Idempotency Check: dedupe on incoming event's own eventId + if (db && eventId) { + try { + const existing = await db + .select() + .from(processedEvents) + .where( + and( + eq(processedEvents.eventId, String(eventId)), + eq(processedEvents.serviceName, "analytic-service") + ) + ) + .limit(1); - console.log(`Analytic consumer: User ${userId} paid ${total}`); + if (existing && existing.length > 0) { + console.warn(`Analytic Service [Idempotency]: Event ID ${eventId} already processed by analytic-service. Skipping duplicate metric aggregation.`); + return; + } + } catch (e) { + console.error("Analytic Service: Error querying processed_events:", e.message); } - break; - case "order-successful": - { - const value = message.value.toString(); - const { userId, orderId } = JSON.parse(value); + } - console.log(`Analytic consumer: Order id ${orderId} created for user id ${userId}`); + // 2. Aggregate / log event metrics + switch (topic) { + case "payment-successful": { + const { userId, cart } = data; + const total = cart && Array.isArray(cart) + ? cart.reduce((acc, item) => acc + (Number(item.price) || 0), 0).toFixed(2) + : "0.00"; + console.log(`Analytic consumer [payment-successful]: User ${userId} paid $${total} (Event: ${eventId}, Corr: ${correlationId || eventId})`); + break; } - break; - case "email-successful": - { - const value = message.value.toString(); - const { userId, emailId } = JSON.parse(value); - - console.log(`Analytic consumer: Email id ${emailId} sent to user id ${userId}`); + case "order-successful": { + const { userId, orderId } = data; + console.log(`Analytic consumer [order-successful]: Order ${orderId} confirmed for user ${userId} (Event: ${eventId}, Corr: ${correlationId}, Caus: ${causationId})`); + break; + } + case "email-successful": { + const { userId, emailId, orderId } = data; + console.log(`Analytic consumer [email-successful]: Email ${emailId} dispatched to user ${userId} for order ${orderId} (Event: ${eventId})`); + break; } - break; + default: + console.log(`Analytic consumer [${topic}]: Received event ${eventId}`); + break; + } - default: - break; + // 3. Atomically Record Idempotency in processed_events + if (db && eventId) { + try { + await db.insert(processedEvents).values({ + eventId: String(eventId), + serviceName: "analytic-service", + }); + } catch (dbErr) { + if ( + dbErr.code === "23505" || + dbErr.message?.includes("duplicate key") || + dbErr.message?.includes("processed_events_pkey") || + dbErr.message?.includes("unique constraint") + ) { + console.warn(`Analytic Service [Idempotency]: Unique constraint violation for event ID ${eventId}. Concurrent duplicate detected; skipping cleanly.`); + return; + } + + console.error("Analytic Service: Failed to insert into processed_events:", dbErr.message); + } + } + } finally { + inflightMessages = Math.max(0, inflightMessages - 1); } }, }); + } +}; + +run().catch((err) => { + console.error("Analytic Service Kafka error:", err); +}); + +// Graceful shutdown +const shutdown = async () => { + if (isShuttingDown) return; + isShuttingDown = true; + isReady = false; + console.log("Analytic Service: SIGTERM received. Initiating graceful shutdown..."); + + healthServer.close(); + + const maxWait = 5000; + const start = Date.now(); + while (inflightMessages > 0 && Date.now() - start < maxWait) { + await new Promise((r) => setTimeout(r, 200)); + } + + try { + await consumer.disconnect(); + console.log("Analytic Service: Consumer disconnected."); } catch (err) { - console.log(err); + console.error("Analytic Service error during disconnect:", err.message); } + + console.log("Analytic Service: Graceful shutdown complete. Exiting cleanly."); + process.exit(0); }; -run(); +process.on("SIGTERM", shutdown); +process.on("SIGINT", shutdown); diff --git a/analytic-service/package-lock.json b/analytic-service/package-lock.json index 5deb5fc..d1836f7 100644 --- a/analytic-service/package-lock.json +++ b/analytic-service/package-lock.json @@ -9,7 +9,138 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "kafkajs": "^2.2.4" + "drizzle-orm": "^0.45.4", + "kafkajs": "^2.2.4", + "postgres": "^4.1.1" + } + }, + "node_modules/drizzle-orm": { + "version": "0.45.4", + "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.45.4.tgz", + "integrity": "sha512-NiM1YZpJ2UxyeE67DpDDZ+Tsw4YLX3trSlkNT7Tm9eKoUNb1LvaAaQzXgYQsWs+AQ9TUmmwMmBOCXuqqxUWKKQ==", + "license": "Apache-2.0", + "peerDependencies": { + "@aws-sdk/client-rds-data": ">=3", + "@cloudflare/workers-types": ">=4", + "@electric-sql/pglite": ">=0.2.0", + "@libsql/client": ">=0.10.0", + "@libsql/client-wasm": ">=0.10.0", + "@neondatabase/serverless": ">=0.10.0", + "@netlify/db": ">=0.4.0", + "@op-engineering/op-sqlite": ">=2", + "@opentelemetry/api": "^1.4.1", + "@planetscale/database": ">=1.13", + "@prisma/client": "*", + "@tidbcloud/serverless": "*", + "@types/better-sqlite3": "*", + "@types/pg": "*", + "@types/sql.js": "*", + "@upstash/redis": ">=1.34.7", + "@vercel/postgres": ">=0.8.0", + "@xata.io/client": "*", + "better-sqlite3": ">=7", + "bun-types": "*", + "expo-sqlite": ">=14.0.0", + "gel": ">=2", + "knex": "*", + "kysely": "*", + "mysql2": ">=2", + "pg": ">=8", + "postgres": ">=3", + "sql.js": ">=1", + "sqlite3": ">=5" + }, + "peerDependenciesMeta": { + "@aws-sdk/client-rds-data": { + "optional": true + }, + "@cloudflare/workers-types": { + "optional": true + }, + "@electric-sql/pglite": { + "optional": true + }, + "@libsql/client": { + "optional": true + }, + "@libsql/client-wasm": { + "optional": true + }, + "@neondatabase/serverless": { + "optional": true + }, + "@netlify/db": { + "optional": true + }, + "@op-engineering/op-sqlite": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@prisma/client": { + "optional": true + }, + "@tidbcloud/serverless": { + "optional": true + }, + "@types/better-sqlite3": { + "optional": true + }, + "@types/pg": { + "optional": true + }, + "@types/sql.js": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/postgres": { + "optional": true + }, + "@xata.io/client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "bun-types": { + "optional": true + }, + "expo-sqlite": { + "optional": true + }, + "gel": { + "optional": true + }, + "knex": { + "optional": true + }, + "kysely": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "pg": { + "optional": true + }, + "postgres": { + "optional": true + }, + "prisma": { + "optional": true + }, + "sql.js": { + "optional": true + }, + "sqlite3": { + "optional": true + } } }, "node_modules/kafkajs": { @@ -20,6 +151,19 @@ "engines": { "node": ">=14.0.0" } + }, + "node_modules/postgres": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/postgres/-/postgres-4.1.1.tgz", + "integrity": "sha512-1kJDojqNZC+iTHHXh6eif0J98LUtyLAePe/qkW1GK35eh2JixlsAiIKq3FGI+xqI+SUGTNodzf7TScVeIIyUug==", + "license": "Unlicense", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/porsager" + } } } } diff --git a/analytic-service/package.json b/analytic-service/package.json index d450811..ac5bac7 100644 --- a/analytic-service/package.json +++ b/analytic-service/package.json @@ -4,13 +4,15 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "node --test tests/analytic.test.js" }, "keywords": [], "author": "", "license": "ISC", "type": "module", "dependencies": { - "kafkajs": "^2.2.4" + "drizzle-orm": "^0.45.4", + "kafkajs": "^2.2.4", + "postgres": "^4.1.1" } } diff --git a/analytic-service/tests/analytic.test.js b/analytic-service/tests/analytic.test.js new file mode 100644 index 0000000..3280327 --- /dev/null +++ b/analytic-service/tests/analytic.test.js @@ -0,0 +1,107 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { processAnalyticBatch } from "../consumer-processor.js"; + +test("Analytic Service Idempotency & Unique Constraint Suite", async (t) => { + await t.test("Unique constraint violation (code 23505) skips concurrent duplicates cleanly without throwing", async () => { + let duplicateSkipped = false; + + const handleAnalyticEvent = async (eventId) => { + try { + const dbErr = new Error('duplicate key value violates unique constraint "processed_events_pkey"'); + dbErr.code = "23505"; + throw dbErr; + } catch (dbErr) { + if ( + dbErr.code === "23505" || + dbErr.message?.includes("duplicate key") || + dbErr.message?.includes("processed_events_pkey") + ) { + duplicateSkipped = true; + return; + } + throw dbErr; + } + }; + + await handleAnalyticEvent("evt-9999"); + assert.equal(duplicateSkipped, true, "Must cleanly skip concurrent duplicate without error"); + }); + + await t.test("Analytic consumer dedupes on incoming event's own eventId", () => { + const processedEventsStore = new Set(); + const recordedMetrics = []; + + const consumeEvent = (event) => { + if (processedEventsStore.has(event.eventId)) { + return "skipped"; + } + + recordedMetrics.push(event); + processedEventsStore.add(event.eventId); + return "processed"; + }; + + const event = { eventId: "pay-101", userId: "u-1", amount: "50.00" }; + + const firstRun = consumeEvent(event); + const secondRun = consumeEvent(event); + + assert.equal(firstRun, "processed"); + assert.equal(secondRun, "skipped"); + assert.equal(recordedMetrics.length, 1, "Exactly one metric recorded despite duplicate message delivery"); + }); + + await t.test("eachBatch bulk inserts new events and skips duplicates cleanly", async () => { + const inserted = []; + const resolvedOffsets = []; + const db = { + select() { + return { + from() { + return { + where() { + return Promise.resolve([{ eventId: "evt-dup" }]); + }, + }; + }, + }; + }, + insert() { + return { + values(rows) { + return { + onConflictDoNothing: async () => { + inserted.push(...rows); + }, + }; + }, + }; + }, + }; + + const messages = [ + { offset: "0", value: Buffer.from(JSON.stringify({ eventId: "evt-dup" })) }, + { offset: "1", value: Buffer.from(JSON.stringify({ eventId: "evt-a" })) }, + { offset: "2", value: Buffer.from(JSON.stringify({ eventId: "evt-b" })) }, + ]; + + const res = await processAnalyticBatch({ + batch: { topic: "payment-successful", partition: 0, messages }, + resolveOffset: (o) => resolvedOffsets.push(o), + heartbeat: async () => {}, + commitOffsetsIfNecessary: async () => {}, + isRunning: () => true, + isStale: () => false, + db, + tables: { processedEvents: { eventId: "event_id", serviceName: "service_name" } }, + }); + + assert.equal(res.mode, "batch"); + assert.equal(res.processedCount, 2); + assert.equal(res.skippedDuplicates, 1); + assert.equal(inserted.length, 2); + assert.deepEqual(resolvedOffsets, ["0", "1", "2"]); + }); +}); + diff --git a/api-gateway/auth.middleware.js b/api-gateway/auth.middleware.js index 23a0245..34eb43e 100644 --- a/api-gateway/auth.middleware.js +++ b/api-gateway/auth.middleware.js @@ -1,6 +1,5 @@ import jwt from "jsonwebtoken"; - -const JWT_SECRET = process.env.JWT_SECRET || "super-secret-development-key"; +import { JWT_SECRET } from "./config.js"; export const verifyToken = (req, res, next) => { const authHeader = req.headers.authorization; @@ -11,22 +10,18 @@ export const verifyToken = (req, res, next) => { const token = authHeader.split(" ")[1]; - // Development bypass for Next.js frontend testing - if (token === "mock.jwt.token") { - req.user = { userId: "123" }; - req.headers['x-user-id'] = "123"; - return next(); - } - try { const decoded = jwt.verify(token, JWT_SECRET); + if (!decoded || !decoded.userId) { + return res.status(403).json({ error: "Forbidden: Token missing userId payload" }); + } req.user = decoded; - // Pass the decoded user ID down to the microservices inside the header! - req.headers['x-user-id'] = decoded.userId || "123"; + // Pass the decoded user ID down to internal microservices via header + req.headers['x-user-id'] = String(decoded.userId); next(); } catch (error) { - return res.status(403).json({ error: "Forbidden: Invalid token" }); + return res.status(403).json({ error: "Forbidden: Invalid or expired token" }); } }; diff --git a/api-gateway/config.js b/api-gateway/config.js new file mode 100644 index 0000000..b94b604 --- /dev/null +++ b/api-gateway/config.js @@ -0,0 +1,11 @@ +const MIN_JWT_SECRET_LENGTH = 32; + +const secret = process.env.JWT_SECRET; + +if (typeof secret !== "string" || secret.trim().length < MIN_JWT_SECRET_LENGTH) { + throw new Error( + `Missing or invalid JWT_SECRET: must be set and at least ${MIN_JWT_SECRET_LENGTH} characters long (generate one with: openssl rand -hex 32)` + ); +} + +export const JWT_SECRET = secret; diff --git a/api-gateway/index.js b/api-gateway/index.js index 6428d9d..7075e8c 100644 --- a/api-gateway/index.js +++ b/api-gateway/index.js @@ -1,27 +1,106 @@ import express from "express"; import cors from "cors"; +import http from "node:http"; +import jwt from "jsonwebtoken"; import { createProxyMiddleware } from "http-proxy-middleware"; import { verifyToken } from "./auth.middleware.js"; +import { JWT_SECRET } from "./config.js"; const app = express(); app.use(cors()); -// Health Check +// Health Check endpoint for Docker Compose & orchestration app.get("/health", (req, res) => res.status(200).send("API Gateway OK")); +// Reusable HTTP Agent with TCP keep-alive to avoid socket teardown and handshake overhead +const enableKeepAlive = process.env.PROXY_KEEP_ALIVE === "true"; +const paymentProxyHttpAgent = enableKeepAlive + ? new http.Agent({ + keepAlive: true, + maxSockets: 200, + maxFreeSockets: 50, + timeout: 60000, + keepAliveMsecs: 30000, + }) + : false; + +// Demo token issuing endpoint for clients, tests, and benchmarks. +// SECURITY GUARD: Strictly disabled in production mode (NODE_ENV=production) or when DEMO_AUTH is not explicitly "true". +app.post("/api/auth/token", express.json(), (req, res) => { + const isProduction = process.env.NODE_ENV === "production"; + const allowDemoAuth = process.env.DEMO_AUTH === "true" && !isProduction; + + if (!allowDemoAuth) { + return res.status(404).json({ error: "Not Found" }); + } + + const userId = req.body?.userId || "user_demo_123"; + const token = jwt.sign({ userId }, JWT_SECRET, { expiresIn: "24h" }); + res.status(200).json({ token, userId }); +}); + +// Demo batch token endpoint for multi-user realistic load testing +app.post("/api/auth/tokens/batch", express.json(), (req, res) => { + const isProduction = process.env.NODE_ENV === "production"; + const allowDemoAuth = process.env.DEMO_AUTH === "true" && !isProduction; + + if (!allowDemoAuth) { + return res.status(404).json({ error: "Not Found" }); + } + + const count = Math.min(req.body?.count || 1000, 5000); + const prefix = req.body?.prefix || "user"; + const tokens = []; + for (let i = 0; i < count; i++) { + const userId = `${prefix}_${i}`; + const token = jwt.sign({ userId }, JWT_SECRET, { expiresIn: "24h" }); + tokens.push({ userId, token }); + } + res.status(200).json({ tokens }); +}); + // Proxy payment requests, enforcing JWT authorization +// Target: internal payment-service within Docker Compose network app.use( "/api/payment", verifyToken, createProxyMiddleware({ - // If running in K8s, it uses 'payment-service', else localhost - target: process.env.PAYMENT_SERVICE_URL || "http://localhost:8000", + target: process.env.PAYMENT_SERVICE_URL || "http://payment-service:8000", changeOrigin: true, + agent: paymentProxyHttpAgent, pathRewrite: { - "^/api/payment": "/payment-service", + "^/api/payment": "/payment", + "^/?$": "/payment", }, }) ); +let server; const PORT = process.env.PORT || 8080; -app.listen(PORT, () => console.log(`๐Ÿš€ API Gateway securely routing traffic on port ${PORT}`)); +const targetPaymentUrl = process.env.PAYMENT_SERVICE_URL || "http://payment-service:8000"; +if (process.env.NODE_ENV !== "test") { + server = app.listen(PORT, () => { + console.log(`๐Ÿš€ API Gateway securely routing traffic on port ${PORT}`); + console.log( + `[EFFECTIVE CONFIG] api-gateway: PORT=${PORT}, PAYMENT_SERVICE_URL=${targetPaymentUrl}, PROXY_KEEP_ALIVE=${enableKeepAlive}, NODE_ENV=${process.env.NODE_ENV || "development"}` + ); + }); +} + +// Graceful shutdown handling +const shutdown = () => { + console.log("API Gateway: shutting down gracefully..."); + if (server) { + server.close(() => { + console.log("API Gateway closed."); + process.exit(0); + }); + } else { + process.exit(0); + } +}; + +process.on("SIGTERM", shutdown); +process.on("SIGINT", shutdown); + +export default app; diff --git a/api-gateway/package-lock.json b/api-gateway/package-lock.json index d20e0fb..5cc187c 100644 --- a/api-gateway/package-lock.json +++ b/api-gateway/package-lock.json @@ -52,9 +52,9 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.6", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.6.tgz", - "integrity": "sha512-p5tAzS57i5MV9fZFDj9LeIiTZEufbSe2eDozP+ElheSUq1m74CRq1jI4mYNDdVs9vQztXFLuk/Gd6BWTdwRJ5g==", + "version": "1.20.9", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.9.tgz", + "integrity": "sha512-FISIQxV5u91Y9gvuFq3q/tA/qTqLJn3AhRcEvyozyhJTh5OBFFtv827AdHU7Rbyct4r+Ba1/99oFa1Y3yuFsdw==", "license": "MIT", "dependencies": { "bytes": "~3.1.2", @@ -65,7 +65,7 @@ "http-errors": "~2.0.1", "iconv-lite": "~0.4.24", "on-finished": "~2.4.1", - "qs": "~6.15.1", + "qs": "~6.16.0", "raw-body": "~2.5.3", "type-is": "~1.6.18", "unpipe": "~1.0.0" @@ -302,9 +302,9 @@ "license": "MIT" }, "node_modules/express": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz", - "integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==", + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.3.tgz", + "integrity": "sha512-Bdcs4+3qlpVlx2NRn6fgX2Ue2/gGRaPeawebgclM0ERSCqDpA+owF1fdPwjJUTAJWMTuAaxjDf+hzb0/4eKvvw==", "license": "MIT", "dependencies": { "accepts": "~1.3.8", @@ -326,9 +326,9 @@ "methods": "~1.1.2", "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "~0.1.12", + "path-to-regexp": "~0.1.13", "proxy-addr": "~2.0.7", - "qs": "~6.15.1", + "qs": "~6.16.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "~0.19.0", @@ -378,9 +378,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", - "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.3.tgz", + "integrity": "sha512-toOSoqN6d51Wjf1aOFJYcoVv1aND9rj/CwjLU0Vz40oDuSpWDayCeKe4JpL5NL0WdFvoOOCI3BRo69HahjbR1A==", "funding": [ { "type": "individual", @@ -532,9 +532,9 @@ } }, "node_modules/http-proxy-middleware": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-3.0.7.tgz", - "integrity": "sha512-iwbQltVlx8bCrqePUM8C+hllHvdawVhQJaLrj1X7qllkvFQdXFsr16pW/mo9+JDVjN+QO2XUx9jd8SmoFkE5qw==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-3.0.11.tgz", + "integrity": "sha512-juBSCfRpbRp+Ql4DbukzTx+beBdB8nQvVej1AhvznEIMTjX/O+ReCpyb1AJtob8NCHxD5KDBkLKS2QXl2vo11A==", "license": "MIT", "dependencies": { "@types/http-proxy": "^1.17.15", @@ -886,9 +886,9 @@ } }, "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz", + "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==", "license": "MIT", "dependencies": { "forwarded": "0.2.0", @@ -896,12 +896,16 @@ }, "engines": { "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/qs": { - "version": "6.15.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", - "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", + "version": "6.16.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.2.tgz", + "integrity": "sha512-VYdnB5S7/0IeXzBacUtwNAaM6d7Y/PgYnNC7bJCI6meqA/OgnsQbZMtVW8Dt2D1PHgbHGtYmhSoEIgvt7xZ2ZA==", "license": "BSD-3-Clause", "dependencies": { "es-define-property": "^1.0.1", diff --git a/api-gateway/package.json b/api-gateway/package.json index 9490fb7..b26a2c0 100644 --- a/api-gateway/package.json +++ b/api-gateway/package.json @@ -3,7 +3,8 @@ "version": "1.0.0", "type": "module", "scripts": { - "start": "node index.js" + "start": "node index.js", + "test": "node --test tests/auth.test.js" }, "dependencies": { "cors": "^2.8.5", diff --git a/api-gateway/tests/auth.test.js b/api-gateway/tests/auth.test.js new file mode 100644 index 0000000..c24b609 --- /dev/null +++ b/api-gateway/tests/auth.test.js @@ -0,0 +1,231 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import http from "node:http"; +import path from "node:path"; +import { spawnSync } from "node:child_process"; +import { fileURLToPath } from "node:url"; +import jwt from "jsonwebtoken"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const gatewayEntry = path.resolve(__dirname, "..", "index.js"); + +// Set test environment (use CI-provided JWT_SECRET if set, otherwise fixed test secret) +process.env.NODE_ENV = "test"; +process.env.JWT_SECRET = + process.env.JWT_SECRET || "test-jwt-secret-key-for-api-gateway-verification-32!"; + +const { default: app } = await import("../index.js"); +const { verifyToken } = await import("../auth.middleware.js"); + +function createTestServer() { + return new Promise((resolve) => { + const server = http.createServer(app); + server.listen(0, () => { + const port = server.address().port; + resolve({ + server, + url: `http://localhost:${port}`, + close: () => new Promise((res) => server.close(res)), + }); + }); + }); +} + +test("API Gateway Auth & Endpoint Security Suite", async (t) => { + const testContext = await createTestServer(); + const baseUrl = testContext.url; + + t.after(async () => { + await testContext.close(); + }); + + await t.test("GET /api/auth/token is completely removed and returns 404", async () => { + const res = await fetch(`${baseUrl}/api/auth/token`); + assert.equal(res.status, 404, "GET /api/auth/token must be unavailable (404)"); + }); + + await t.test("POST /api/auth/token is blocked (404) in production mode even if DEMO_AUTH=true", async () => { + const originalEnv = process.env.NODE_ENV; + const originalDemo = process.env.DEMO_AUTH; + try { + process.env.NODE_ENV = "production"; + process.env.DEMO_AUTH = "true"; + + const res = await fetch(`${baseUrl}/api/auth/token`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ userId: "attacker" }), + }); + + assert.equal(res.status, 404, "POST /api/auth/token must return 404 in production mode"); + const body = await res.json(); + assert.equal(body.error, "Not Found"); + } finally { + process.env.NODE_ENV = originalEnv; + process.env.DEMO_AUTH = originalDemo; + } + }); + + await t.test("POST /api/auth/token is blocked (404) when DEMO_AUTH is not 'true'", async () => { + const originalDemo = process.env.DEMO_AUTH; + try { + delete process.env.DEMO_AUTH; + + const res = await fetch(`${baseUrl}/api/auth/token`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ userId: "some_user" }), + }); + + assert.equal(res.status, 404, "POST /api/auth/token must return 404 without DEMO_AUTH=true"); + } finally { + process.env.DEMO_AUTH = originalDemo; + } + }); + + await t.test("POST /api/auth/token succeeds (200) only when DEMO_AUTH=true and NODE_ENV!=production", async () => { + const originalEnv = process.env.NODE_ENV; + const originalDemo = process.env.DEMO_AUTH; + try { + process.env.NODE_ENV = "development"; + process.env.DEMO_AUTH = "true"; + + const res = await fetch(`${baseUrl}/api/auth/token`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ userId: "test_verified_user" }), + }); + + assert.equal(res.status, 200, "POST /api/auth/token should succeed in demo mode"); + const data = await res.json(); + assert.equal(data.userId, "test_verified_user"); + assert.ok(data.token, "Should return a signed JWT token"); + + // Verify token cryptographic signature + const decoded = jwt.verify(data.token, process.env.JWT_SECRET); + assert.equal(decoded.userId, "test_verified_user"); + } finally { + process.env.NODE_ENV = originalEnv; + process.env.DEMO_AUTH = originalDemo; + } + }); + + await t.test("POST /api/payment rejects unauthenticated requests with 401", async () => { + const res = await fetch(`${baseUrl}/api/payment`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ cart: [] }), + }); + + assert.equal(res.status, 401, "Requests without Authorization header must return 401"); + }); + + await t.test("POST /api/payment rejects invalid token with 403 Forbidden", async () => { + const res = await fetch(`${baseUrl}/api/payment`, { + method: "POST", + headers: { + "Content-Type": "application/json", + "Authorization": "Bearer forged.invalid.token", + }, + body: JSON.stringify({ cart: [] }), + }); + + assert.equal(res.status, 403, "Requests with invalid token signature must return 403"); + }); + + await t.test("Sign + verify round-trip uses the same secret across index.js and auth.middleware.js", async () => { + const originalEnv = process.env.NODE_ENV; + const originalDemo = process.env.DEMO_AUTH; + try { + process.env.NODE_ENV = "development"; + process.env.DEMO_AUTH = "true"; + + const res = await fetch(`${baseUrl}/api/auth/token`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ userId: "roundtrip_user" }), + }); + + assert.equal(res.status, 200); + const { token } = await res.json(); + assert.ok(token, "Token should be issued by gateway sign route"); + + // Verify the signed token through auth.middleware.js verifyToken + const req = { headers: { authorization: `Bearer ${token}` } }; + let statusCode = null; + let responseBody = null; + const mockRes = { + status(code) { + statusCode = code; + return this; + }, + json(body) { + responseBody = body; + return this; + }, + }; + let nextCalled = false; + verifyToken(req, mockRes, () => { + nextCalled = true; + }); + + assert.equal(nextCalled, true, "verifyToken must accept token signed by index.js"); + assert.equal(statusCode, null, `Unexpected error status: ${statusCode} ${JSON.stringify(responseBody)}`); + assert.equal(req.user.userId, "roundtrip_user"); + assert.equal(req.headers["x-user-id"], "roundtrip_user"); + + // Confirm token signed with a different secret is rejected by verifyToken + const wrongToken = jwt.sign({ userId: "roundtrip_user" }, "d".repeat(32), { expiresIn: "1h" }); + const badReq = { headers: { authorization: `Bearer ${wrongToken}` } }; + let badStatus = null; + let badNextCalled = false; + verifyToken( + badReq, + { + status(code) { + badStatus = code; + return this; + }, + json() { + return this; + }, + }, + () => { + badNextCalled = true; + } + ); + assert.equal(badNextCalled, false, "verifyToken must reject token signed with a different secret"); + assert.equal(badStatus, 403); + } finally { + process.env.NODE_ENV = originalEnv; + process.env.DEMO_AUTH = originalDemo; + } + }); + + await t.test("Gateway refuses to start when JWT_SECRET is missing", () => { + const env = { ...process.env, NODE_ENV: "development", PORT: "0" }; + delete env.JWT_SECRET; + + const result = spawnSync(process.execPath, [gatewayEntry], { + env, + encoding: "utf8", + timeout: 5000, + }); + + assert.notEqual(result.status, 0, "Gateway must exit non-zero when JWT_SECRET is missing"); + assert.match(result.stderr, /JWT_SECRET/i, "Startup error must clearly mention JWT_SECRET"); + }); + + await t.test("Gateway refuses to start when JWT_SECRET is shorter than 32 characters", () => { + const env = { ...process.env, NODE_ENV: "development", PORT: "0", JWT_SECRET: "a".repeat(31) }; + + const result = spawnSync(process.execPath, [gatewayEntry], { + env, + encoding: "utf8", + timeout: 5000, + }); + + assert.notEqual(result.status, 0, "Gateway must exit non-zero when JWT_SECRET is shorter than 32 chars"); + assert.match(result.stderr, /32/, "Startup error must mention the 32-character minimum"); + }); +}); diff --git a/append-interview.js b/append-interview.js deleted file mode 100644 index c1dcae4..0000000 --- a/append-interview.js +++ /dev/null @@ -1,19 +0,0 @@ -const fs = require('fs'); - -const content = ` - -## 4. Advanced System Design (Idempotency) - -> **'How did you prevent double-charging users?'** -> *Answer:* 'I designed the architecture around **Idempotency**. When users checkout, the API Gateway binds their static \`userId\` to a uniquely generated request ID (\`orderId\`). By persisting this to Neon PostgreSQL using Drizzle ORM immediately via the Outbox pattern, the Gateway can instantly reject any duplicate retries if a user accidentally double-clicks the button or the network hangs.' - -## 5. ATS-Optimized Resume Bullets -*Copy and paste these directly into your resume under this project. They use the Google XYZ framework (Accomplished [X], as measured by [Y], by doing [Z]) to trigger ATS keyword scanners.* - -- **Eliminated distributed data-loss** and guaranteed exactly-once message delivery by engineering the **Transactional Outbox Pattern** using **Drizzle ORM** to execute localized atomic PostgreSQL commits. -- **Architected an event-driven decoupled backend** using **Apache Kafka** to asynchronously offload payment queues, preventing synchronous HTTP bottlenecks and improving checkout latency. -- **Orchestrated a fault-tolerant microservice cluster** (API Gateway, Next.js Client, Zookeeper) leveraging **Docker Compose**, injecting native environment interpolations and rigid container restart policies for maximum uptime. -`; - -fs.appendFileSync('interview.md', content); -console.log('Appended successfully'); diff --git a/benchmarks/cold-start.ps1 b/benchmarks/cold-start.ps1 new file mode 100644 index 0000000..cab5d9b --- /dev/null +++ b/benchmarks/cold-start.ps1 @@ -0,0 +1,19 @@ +# Cold-start benchmark for StreamMart Docker Compose cluster +Write-Host "==========================================================" +Write-Host "โฑ๏ธ StreamMart: Measuring Docker Compose Cold-Start Time" +Write-Host "==========================================================" + +Write-Host "`n[Step 1] Bringing down cluster and removing network..." +docker compose down + +Write-Host "`n[Step 2] Executing: docker compose up -d --wait (timed)..." +$elapsed = Measure-Command { + docker compose up -d --wait +} + +Write-Host "`n==========================================================" +Write-Host "โœ… Cold-Start Results:" +Write-Host " Total Seconds: $([math]::Round($elapsed.TotalSeconds, 2)) s" +Write-Host " Total Milliseconds: $($elapsed.TotalMilliseconds) ms" +Write-Host "==========================================================" + diff --git a/benchmarks/compute-metrics.mjs b/benchmarks/compute-metrics.mjs new file mode 100644 index 0000000..6566a49 --- /dev/null +++ b/benchmarks/compute-metrics.mjs @@ -0,0 +1,83 @@ +import fs from 'node:fs'; +import path from 'node:path'; + +const rawDir = path.resolve('benchmarks/raw'); +const configs = ['baseline', 'pool_only', 'keepalive_only', 'pool_keepalive', 'pool_keepalive_optimized']; +const vus = [20, 50, 100]; + +const tableAccepted = []; +const tableCompleted = []; +const tableDuring = []; +const tableAfter = []; + +for (const config of configs) { + const rowAccepted = { config }; + const rowCompleted = { config }; + const rowDuring = { config }; + const rowAfter = { config }; + + for (const vu of vus) { + const runs = []; + for (let r = 1; r <= 3; r++) { + const jsonFile = path.join(rawDir, `${config}-${vu}vu-run${r}.json`); + const summaryFile = path.join(rawDir, `summary-${config}.json`); + const data = JSON.parse(fs.readFileSync(jsonFile, 'utf8')); + const summary = JSON.parse(fs.readFileSync(summaryFile, 'utf8')); + const runSummary = summary[vu].runs.find(x => x.run === r); + + const acceptedReqs = data.metrics.http_reqs.count; + const acceptedRate = data.metrics.http_reqs.rate; + const runDuration = acceptedReqs / acceptedRate; + const backlog = runSummary.backlog; + const drainSec = runSummary.drainSec; + + const completedCount = acceptedReqs; + const totalTime = runDuration + drainSec; + const completedRate = completedCount / totalTime; + + const eventsDuringLoad = acceptedReqs - backlog; + const relayRateDuringLoad = eventsDuringLoad / runDuration; + const relayRateAfterLoad = drainSec > 0 ? backlog / drainSec : 0; + + runs.push({ + acceptedRate, + completedRate, + relayRateDuringLoad, + relayRateAfterLoad + }); + } + + const fmt = (arr, prop) => { + const vals = arr.map(x => x[prop]); + const mean = (vals.reduce((a, b) => a + b, 0) / vals.length).toFixed(2); + const min = Math.min(...vals).toFixed(2); + const max = Math.max(...vals).toFixed(2); + return `${mean} [${min} โ€“ ${max}]`; + }; + + rowAccepted[`${vu} VUs`] = fmt(runs, 'acceptedRate'); + rowCompleted[`${vu} VUs`] = fmt(runs, 'completedRate'); + rowDuring[`${vu} VUs`] = fmt(runs, 'relayRateDuringLoad'); + rowAfter[`${vu} VUs`] = fmt(runs, 'relayRateAfterLoad'); + } + + tableAccepted.push(rowAccepted); + tableCompleted.push(rowCompleted); + tableDuring.push(rowDuring); + tableAfter.push(rowAfter); +} + +function toMarkdown(title, table) { + let md = `### ${title}\n\n`; + md += `| Config | 20 VUs | 50 VUs | 100 VUs |\n`; + md += `|---|---|---|---|\n`; + for (const row of table) { + md += `| \`${row.config}\` | ${row['20 VUs']} | ${row['50 VUs']} | ${row['100 VUs']} |\n`; + } + return md; +} + +console.log(toMarkdown('Accepted Throughput (accepted req/s) โ€” mean [min โ€“ max]', tableAccepted)); +console.log(toMarkdown('Completed Throughput (completed checkouts/s) โ€” mean [min โ€“ max]', tableCompleted)); +console.log(toMarkdown('Relay Publish Rate DURING Load (events/s) โ€” mean [min โ€“ max]', tableDuring)); +console.log(toMarkdown('Relay Publish Rate AFTER Load (events/s) โ€” mean [min โ€“ max]', tableAfter)); diff --git a/benchmarks/direct-payment-load.mjs b/benchmarks/direct-payment-load.mjs new file mode 100644 index 0000000..680c683 --- /dev/null +++ b/benchmarks/direct-payment-load.mjs @@ -0,0 +1,77 @@ +import http from 'http'; + +const concurrency = parseInt(process.argv[2] || '50', 10); +const durationMs = 10000; +const payload = JSON.stringify({ + cart: [ + { id: 'k6_item_1', name: 'Cloud Native T-Shirt', price: 29.99 }, + { id: 'k6_item_2', name: 'Distributed Systems Cap', price: 19.50 }, + ], +}); + +let totalRequests = 0; +let errors = 0; +const latencies = []; +let keepRunning = true; + +const agent = new http.Agent({ keepAlive: true, maxSockets: concurrency }); + +function makeRequest() { + return new Promise((resolve) => { + const start = performance.now(); + const req = http.request({ + host: 'payment-service', + port: 8000, + path: '/payment', + method: 'POST', + agent, + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(payload), + 'x-user-id': 'bench_direct_user', + }, + }, (res) => { + res.on('data', () => {}); + res.on('end', () => { + const dur = performance.now() - start; + latencies.push(dur); + totalRequests++; + if (res.statusCode !== 200) errors++; + resolve(); + }); + }); + req.on('error', () => { + errors++; + resolve(); + }); + req.write(payload); + req.end(); + }); +} + +async function worker() { + while (keepRunning) { + await makeRequest(); + await new Promise((r) => setTimeout(r, 50)); + } +} + +async function main() { + console.log(`Starting direct payment-service load test (${concurrency} workers, ${durationMs/1000}s)...`); + setTimeout(() => { keepRunning = false; }, durationMs); + const start = performance.now(); + await Promise.all(Array.from({ length: concurrency }, () => worker())); + const elapsed = (performance.now() - start) / 1000; + + latencies.sort((a,b) => a - b); + const p50 = latencies[Math.floor(latencies.length * 0.5)]; + const p95 = latencies[Math.floor(latencies.length * 0.95)]; + const rps = totalRequests / elapsed; + + console.log(`Direct Payment Service Results (${concurrency} workers):`); + console.log(`Throughput: ${rps.toFixed(2)} req/s`); + console.log(`Total Requests: ${totalRequests}, Errors: ${errors}`); + console.log(`p50: ${p50?.toFixed(2)} ms, p95: ${p95?.toFixed(2)} ms`); +} + +main().catch(console.error); \ No newline at end of file diff --git a/benchmarks/drain-outbox.js b/benchmarks/drain-outbox.js new file mode 100644 index 0000000..a013b11 --- /dev/null +++ b/benchmarks/drain-outbox.js @@ -0,0 +1,34 @@ +import postgres from 'postgres'; +import { performance } from 'node:perf_hooks'; + +const connectionString = process.env.DATABASE_URL || 'postgresql://postgres:postgres@localhost:5432/streammart'; + +async function main() { + const sql = postgres(connectionString, { max: 1, prepare: false }); + + const initialRows = await sql`SELECT count(*)::int as count FROM outbox_events WHERE published = false AND topic = 'payment-successful'`; + const initialBacklog = initialRows[0]?.count || 0; + + if (initialBacklog === 0) { + console.log(`Outbox Backlog: 0 events (clean)`); + await sql.end(); + return; + } + + console.log(`Outbox Backlog: ${initialBacklog.toLocaleString()} unpublished events. Waiting for drain...`); + const start = performance.now(); + + let remaining = initialBacklog; + while (remaining > 0) { + await new Promise((r) => setTimeout(r, 200)); + const rows = await sql`SELECT count(*)::int as count FROM outbox_events WHERE published = false AND topic = 'payment-successful'`; + remaining = rows[0]?.count || 0; + } + + const elapsedSec = (performance.now() - start) / 1000; + console.log(`โœ… Outbox Drained: ${initialBacklog.toLocaleString()} events in ${elapsedSec.toFixed(2)}s (${(initialBacklog / elapsedSec).toFixed(1)} events/s relay rate)`); + + await sql.end(); +} + +main().catch(console.error); diff --git a/benchmarks/gateway-load.js b/benchmarks/gateway-load.js new file mode 100644 index 0000000..eeffe4f --- /dev/null +++ b/benchmarks/gateway-load.js @@ -0,0 +1,56 @@ +import http from 'k6/http'; +import { check, sleep } from 'k6'; + +export const options = { + vus: 20, + duration: '30s', + thresholds: { + http_req_failed: ['rate<0.01'], // http errors should be less than 1% + }, +}; + +const BASE_URL = __ENV.GATEWAY_URL || 'http://localhost:8085'; + +export function setup() { + const authRes = http.post( + `${BASE_URL}/api/auth/tokens/batch`, + JSON.stringify({ count: 1000, prefix: 'k6_user' }), + { headers: { 'Content-Type': 'application/json' } } + ); + + if (authRes.status !== 200) { + throw new Error(`Failed to acquire batch JWTs from Gateway: ${authRes.status} ${authRes.body}`); + } + + const tokens = JSON.parse(authRes.body).tokens; + return { tokens }; +} + +export default function (data) { + // Distribute across ~1,000 unique user tokens per VU and iteration + const userIdx = (__VU * 1000 + __ITER) % data.tokens.length; + const userObj = data.tokens[userIdx]; + + const payload = JSON.stringify({ + cart: [ + { id: 'k6_item_1', name: 'Cloud Native T-Shirt', price: 29.99 }, + { id: 'k6_item_2', name: 'Distributed Systems Cap', price: 19.50 }, + ], + }); + + const params = { + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${userObj.token}`, + }, + }; + + const res = http.post(`${BASE_URL}/api/payment`, payload, params); + + check(res, { + 'status is 200': (r) => r.status === 200, + }); + + sleep(0.05); +} + diff --git a/benchmarks/measure-consumer-breakdown.mjs b/benchmarks/measure-consumer-breakdown.mjs new file mode 100644 index 0000000..61410c5 --- /dev/null +++ b/benchmarks/measure-consumer-breakdown.mjs @@ -0,0 +1,93 @@ +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; + +function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sql) { + return execSync(`docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sql}"`, { encoding: 'utf8' }).trim(); +} + +async function main() { + console.log('='.repeat(75)); + console.log('๐Ÿ”ฌ Benchmarking Order-Service Message Processing Breakdown (N=500)'); + console.log('='.repeat(75)); + + // 1. Reset tables + console.log('>>> [1/4] Resetting DB tables...'); + queryDb('TRUNCATE payments, orders, processed_events, outbox_events CASCADE;'); + + // 2. Publish 500 payment-successful events to Kafka + console.log('>>> [2/4] Publishing 500 test payment-successful events directly to Kafka...'); + const publishScript = ` + import { Kafka } from 'kafkajs'; + import crypto from 'node:crypto'; + + const kafka = new Kafka({ clientId: 'perf-publisher', brokers: ['kafka:9092'] }); + const producer = kafka.producer(); + await producer.connect(); + + const messages = []; + for (let i = 1; i <= 500; i++) { + const eventId = crypto.randomUUID(); + const userId = 'perf_user_' + i; + messages.push({ + key: userId, + value: JSON.stringify({ + eventId, + correlationId: eventId, + causationId: eventId, + userId, + cart: [{ price: 29.99, title: 'Item ' + i }], + amount: '29.99' + }) + }); + } + + await producer.send({ topic: 'payment-successful', messages }); + await producer.disconnect(); + console.log('Sent 500 messages to payment-successful'); + `; + + execSync(`docker exec streammart-payment node --input-type=module -e "${publishScript.replace(/\n\s+/g, ' ')}"`, { stdio: 'inherit' }); + + // 3. Wait for order-service to process all 500 messages + console.log('>>> [3/4] Waiting for order-service to consume all 500 messages...'); + let processed = 0; + const timeout = Date.now() + 30000; + while (Date.now() < timeout) { + await sleep(250); + processed = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + process.stdout.write(` Orders created: ${processed}/500\r`); + if (processed >= 500) break; + } + console.log(`\n Finished consuming: ${processed} orders created.`); + + // 4. Fetch metrics from order-service HTTP endpoint + console.log('>>> [4/4] Fetching high-resolution instrumentation metrics from order-service...'); + const statsRaw = execSync( + `docker exec streammart-order node -e "fetch('http://localhost:8001/consumer-stats').then(r=>r.text()).then(console.log)"`, + { encoding: 'utf8' } + ).trim(); + + const stats = JSON.parse(statsRaw); + console.log('\n' + '='.repeat(75)); + console.log('๐Ÿ“Š EMPIRICAL ORDER-SERVICE CONSUMER BREAKDOWN'); + console.log('='.repeat(75)); + console.log(`Sample Count: ${stats.sampleCount} messages`); + console.log(`Total Time per Message: avg=${stats.total.avg} ms | p50=${stats.total.p50} ms | p95=${stats.total.p95} ms (min=${stats.total.min}ms, max=${stats.total.max}ms)`); + console.log(` โ”œโ”€ Atomic DB Transaction: avg=${stats.tx.avg} ms | p50=${stats.tx.p50} ms | p95=${stats.tx.p95} ms [${((stats.tx.avg / stats.total.avg) * 100).toFixed(1)}% of total]`); + console.log(` โ”œโ”€ Idempotency SELECT: avg=${stats.idempotency.avg} ms | p50=${stats.idempotency.p50} ms | p95=${stats.idempotency.p95} ms [${((stats.idempotency.avg / stats.total.avg) * 100).toFixed(1)}% of total]`); + console.log(` โ””โ”€ CPU / JSON Parsing: avg=${stats.overhead.avg} ms | p50=${stats.overhead.p50} ms | p95=${stats.overhead.p95} ms [${((stats.overhead.avg / stats.total.avg) * 100).toFixed(1)}% of total]`); + console.log(`\nImplied Single-Partition Sequential Max Throughput:`); + console.log(` 1,000 ms รท ${stats.total.avg} ms = ${stats.impliedThroughput} orders/sec`); + console.log('='.repeat(75)); + + const outPath = path.resolve('benchmarks/raw/consumer-bottleneck-evidence.json'); + fs.writeFileSync(outPath, JSON.stringify(stats, null, 2), 'utf8'); + console.log(`Saved empirical breakdown to ${outPath}`); +} + +main().catch(console.error); diff --git a/benchmarks/measure-downstream-lag.js b/benchmarks/measure-downstream-lag.js new file mode 100644 index 0000000..511ec0f --- /dev/null +++ b/benchmarks/measure-downstream-lag.js @@ -0,0 +1,370 @@ +import { execSync, spawn } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { performance } from 'node:perf_hooks'; + +const k6Binary = 'C:\\Program Files\\k6\\k6.exe'; +const rawDir = path.resolve('benchmarks/raw'); +if (!fs.existsSync(rawDir)) fs.mkdirSync(rawDir, { recursive: true }); + +const label = process.argv[2] || 'fix_b_downstream_before'; +const emailConsumerMode = process.env.EMAIL_CONSUMER_MODE || 'eachMessage'; +const analyticConsumerMode = process.env.ANALYTIC_CONSUMER_MODE || 'eachMessage'; + +function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + const out = execSync( + `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`, + { encoding: 'utf8' } + ).trim(); + return out; +} + +function snapshotCounts() { + const raw = queryDb( + "SELECT " + + "(SELECT COUNT(*) FROM payments) || '|' || " + + "(SELECT COUNT(*) FROM orders) || '|' || " + + "(SELECT COUNT(*) FROM processed_events WHERE service_name = 'email-service') || '|' || " + + "(SELECT COUNT(*) FROM processed_events WHERE service_name = 'analytic-service') || '|' || " + + "(SELECT COUNT(*) FROM outbox_events WHERE topic = 'order-successful' AND published = false) || '|' || " + + "(SELECT COUNT(*) FROM outbox_events WHERE topic = 'email-successful' AND published = false)" + ); + const [payments, orders, emailProcessed, analyticProcessed, orderOutboxPending, emailOutboxPending] = + raw.split('|').map((v) => parseInt(v, 10) || 0); + return { + payments, + orders, + emailProcessed, + analyticProcessed, + orderOutboxPending, + emailOutboxPending, + }; +} + +function resetPostgres() { + console.log('>>> [Clean Reset] Truncating Postgres tables and verifying partial indexes...'); + execSync( + 'docker exec streammart-postgres psql -U postgres -d streammart -c "TRUNCATE payments, orders, processed_events, outbox_events CASCADE;"', + { stdio: 'inherit' } + ); + execSync( + `docker exec streammart-postgres psql -U postgres -d streammart -c " + CREATE INDEX IF NOT EXISTS idx_outbox_events_payment_unpublished ON outbox_events (created_at ASC) WHERE published = false AND topic = 'payment-successful'; + CREATE INDEX IF NOT EXISTS idx_outbox_events_order_unpublished ON outbox_events (created_at ASC) WHERE published = false AND topic = 'order-successful'; + CREATE INDEX IF NOT EXISTS idx_outbox_events_email_unpublished ON outbox_events (created_at ASC) WHERE published = false AND topic = 'email-successful'; + "`, + { stdio: 'inherit' } + ); +} + +async function resetKafkaTopics() { + console.log('>>> [Clean Reset] Stopping app containers before Kafka topic reset...'); + try { + execSync('docker compose stop api-gateway payment-service order-service email-service analytic-service', { stdio: 'inherit' }); + } catch {} + + const topics = ['payment-successful', 'order-successful', 'email-successful', 'payment-successful.DLQ']; + for (const topic of topics) { + try { + execSync( + `docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic ${topic}`, + { stdio: 'pipe' } + ); + } catch {} + } + + await sleep(4000); + + for (const topic of topics) { + execSync( + `docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --if-not-exists --topic ${topic} --partitions 1 --replication-factor 1`, + { stdio: 'inherit' } + ); + } +} + +async function deployStack() { + await resetKafkaTopics(); + resetPostgres(); + + console.log(`>>> Deploying fix_b stack (order=eachBatch, email=${emailConsumerMode}, analytic=${analyticConsumerMode})...`); + execSync('docker compose up -d --build --force-recreate api-gateway payment-service order-service email-service analytic-service', { + stdio: 'inherit', + env: { + ...process.env, + DB_POOL_MAX: '30', + PROXY_KEEP_ALIVE: 'true', + RELAY_BATCH_SEND: 'true', + RELAY_BUSY_PAUSE_MS: '25', + OUTBOX_RETENTION_HOURS: '1', + CONSUMER_MODE: 'eachBatch', + PARTITIONS_CONSUMED_CONCURRENTLY: '1', + EMAIL_CONSUMER_MODE: emailConsumerMode, + ANALYTIC_CONSUMER_MODE: analyticConsumerMode, + }, + }); + + const services = [ + 'streammart-gateway', + 'streammart-payment', + 'streammart-order', + 'streammart-email', + 'streammart-analytic', + ]; + + for (let i = 0; i < 45; i++) { + await sleep(2000); + let allHealthy = true; + for (const svc of services) { + try { + const status = execSync(`docker inspect ${svc} --format "{{.State.Health.Status}}"`, { encoding: 'utf8' }).trim(); + if (status !== 'healthy') { + allHealthy = false; + break; + } + } catch { + allHealthy = false; + break; + } + } + if (allHealthy) { + await sleep(3000); + const effectiveConfigs = {}; + for (const svc of services) { + const logs = execSync(`docker logs ${svc} 2>&1`, { encoding: 'utf8' }); + const line = logs.split(/\r?\n/).find((l) => l.includes('[EFFECTIVE CONFIG]')) || '(not found)'; + effectiveConfigs[svc] = line.trim(); + console.log(` ${svc}: ${effectiveConfigs[svc]}`); + } + return effectiveConfigs; + } + } + throw new Error('Timed out waiting for services to become healthy'); +} + +function runK6(vus, duration, summaryFile, rawFile) { + return new Promise((resolve, reject) => { + const args = [ + 'run', + '--vus', String(vus), + '--duration', duration, + '--summary-export', summaryFile, + 'benchmarks/gateway-load.js', + ]; + + const outStream = fs.createWriteStream(rawFile); + const child = spawn(k6Binary, args, { stdio: ['inherit', 'pipe', 'pipe'] }); + + child.stdout.pipe(outStream); + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stderr); + + child.on('close', (code) => { + outStream.end(); + if (code !== 0) return reject(new Error(`k6 exited with code ${code}`)); + + const summary = JSON.parse(fs.readFileSync(summaryFile, 'utf8')); + // Strip setup_data (contains ephemeral demo JWTs) before keeping summary on disk + if (summary.setup_data) { + delete summary.setup_data; + fs.writeFileSync(summaryFile, JSON.stringify(summary, null, 2), 'utf8'); + } + + const reqCount = summary.metrics.http_reqs?.count || 0; + const rps = summary.metrics.http_reqs?.rate || 0; + const p50 = summary.metrics.http_req_duration?.med || 0; + const p95 = summary.metrics.http_req_duration?.['p(95)'] || 0; + const failedRate = (summary.metrics.http_req_failed?.value || 0) * 100; + + resolve({ reqCount, rps, p50, p95, errorRate: failedRate }); + }); + }); +} + +async function waitForAllCatchup(before, acceptedPayments, maxWaitMs = 300000) { + const start = performance.now(); + const targetOrders = acceptedPayments; + const targetEmails = acceptedPayments; + const targetAnalytics = acceptedPayments * 3; + + let orderCatchupSec = null; + let emailCatchupSec = null; + let analyticCatchupSec = null; + + let snap = snapshotCounts(); + let ordersDone = snap.orders - before.orders; + let emailsDone = snap.emailProcessed - before.emailProcessed; + let analyticsDone = snap.analyticProcessed - before.analyticProcessed; + + const lagAt30s = { + orderLag: Math.max(0, targetOrders - ordersDone), + emailLag: Math.max(0, targetEmails - emailsDone), + analyticLag: Math.max(0, targetAnalytics - analyticsDone), + orderOutboxPending: snap.orderOutboxPending, + emailOutboxPending: snap.emailOutboxPending, + }; + + if (ordersDone >= targetOrders) orderCatchupSec = 0; + if (emailsDone >= targetEmails) emailCatchupSec = 0; + if (analyticsDone >= targetAnalytics) analyticCatchupSec = 0; + + console.log( + ` [30s Snapshot] Payments=${acceptedPayments} | OrderLag=${lagAt30s.orderLag} (orderOutbox=${lagAt30s.orderOutboxPending}) | EmailLag=${lagAt30s.emailLag} (emailOutbox=${lagAt30s.emailOutboxPending}) | AnalyticLag=${lagAt30s.analyticLag}` + ); + + const deadline = performance.now() + maxWaitMs; + while ( + (orderCatchupSec === null || emailCatchupSec === null || analyticCatchupSec === null) && + performance.now() < deadline + ) { + await sleep(250); + const elapsedSec = Number(((performance.now() - start) / 1000).toFixed(2)); + snap = snapshotCounts(); + ordersDone = snap.orders - before.orders; + emailsDone = snap.emailProcessed - before.emailProcessed; + analyticsDone = snap.analyticProcessed - before.analyticProcessed; + + if (orderCatchupSec === null && ordersDone >= targetOrders) orderCatchupSec = elapsedSec; + if (emailCatchupSec === null && emailsDone >= targetEmails) emailCatchupSec = elapsedSec; + if (analyticCatchupSec === null && analyticsDone >= targetAnalytics) analyticCatchupSec = elapsedSec; + + process.stdout.write( + ` [Drain ${elapsedSec}s] Ord=${ordersDone}/${targetOrders} | Email=${emailsDone}/${targetEmails} (ordOut=${snap.orderOutboxPending}) | Analytic=${analyticsDone}/${targetAnalytics} (emOut=${snap.emailOutboxPending}) \r` + ); + } + + const totalElapsed = Number(((performance.now() - start) / 1000).toFixed(2)); + console.log(''); + console.log( + ` [Catch-up Done] Order=${orderCatchupSec ?? `TIMEOUT(${totalElapsed}s, rem=${targetOrders - ordersDone})`}s | Email=${emailCatchupSec ?? `TIMEOUT(${totalElapsed}s, rem=${targetEmails - emailsDone})`}s | Analytic=${analyticCatchupSec ?? `TIMEOUT(${totalElapsed}s, rem=${targetAnalytics - analyticsDone})`}s` + ); + + return { + lagAt30s, + orderCatchupSec: orderCatchupSec ?? totalElapsed, + emailCatchupSec: emailCatchupSec ?? totalElapsed, + analyticCatchupSec: analyticCatchupSec ?? totalElapsed, + timedOut: { + order: orderCatchupSec === null, + email: emailCatchupSec === null, + analytic: analyticCatchupSec === null, + }, + finalCounts: { + ordersDone, + emailsDone, + analyticsDone, + targetOrders, + targetEmails, + targetAnalytics, + }, + }; +} + +function calcStats(arr) { + return { + mean: Number((arr.reduce((a, b) => a + b, 0) / arr.length).toFixed(2)), + min: Number(Math.min(...arr).toFixed(2)), + max: Number(Math.max(...arr).toFixed(2)), + }; +} + +async function main() { + const effectiveConfigs = await deployStack(); + const results = { + label, + emailConsumerMode, + analyticConsumerMode, + effectiveConfigs, + tiers: {}, + }; + + for (const vus of [50, 100]) { + console.log(`\n========================================================================`); + console.log(`๐Ÿšฆ Downstream Lag Measurement: ${label} @ ${vus} VUs (1 Warm-up + 3 Measured)`); + console.log(`========================================================================`); + + // Warm-up (discarded, reset cleanly after warmup so zero leftover lag) + console.log(`>>> [Warm-up] ${vus} VUs for 30s...`); + const warmBefore = snapshotCounts(); + await runK6( + vus, + '30s', + path.join(rawDir, `${label}-${vus}vu-warmup.json`), + path.join(rawDir, `${label}-${vus}vu-warmup.txt`) + ); + const warmSnap = snapshotCounts(); + const warmAccepted = warmSnap.payments - warmBefore.payments; + const warmDrain = await waitForAllCatchup(warmBefore, warmAccepted, 240000); + if (warmDrain.timedOut.email || warmDrain.timedOut.analytic) { + console.log(' Warm-up hit timeout draining downstream; resetting topics & DB cleanly before measured runs...'); + await deployStack(); + } + await sleep(2000); + + const runs = []; + for (let r = 1; r <= 3; r++) { + // Ensure zero leftover lag across all consumers before run + const pre = snapshotCounts(); + if (pre.orders !== pre.payments || pre.emailProcessed !== pre.payments || pre.analyticProcessed !== pre.payments * 3) { + console.log(` Leftover lag detected before Run ${r} (P=${pre.payments}, O=${pre.orders}, E=${pre.emailProcessed}, A=${pre.analyticProcessed}); resetting cleanly...`); + await deployStack(); + } + const before = snapshotCounts(); + + console.log(`\n>>> [Measured Run ${r}/3] ${label} @ ${vus} VUs for 30s...`); + const k6 = await runK6( + vus, + '30s', + path.join(rawDir, `${label}-${vus}vu-run${r}.json`), + path.join(rawDir, `${label}-${vus}vu-run${r}.txt`) + ); + + const post30s = snapshotCounts(); + const acceptedPayments = post30s.payments - before.payments; + const drain = await waitForAllCatchup(before, acceptedPayments, 300000); + + runs.push({ + run: r, + acceptedRate: Number(k6.rps.toFixed(2)), + acceptedPayments, + p50: Number(k6.p50.toFixed(2)), + p95: Number(k6.p95.toFixed(2)), + errorRate: Number(k6.errorRate.toFixed(2)), + lagAt30s: drain.lagAt30s, + orderCatchupSec: drain.orderCatchupSec, + emailCatchupSec: drain.emailCatchupSec, + analyticCatchupSec: drain.analyticCatchupSec, + timedOut: drain.timedOut, + finalCounts: drain.finalCounts, + }); + + await sleep(2000); + } + + results.tiers[vus] = { + runs, + summary: { + acceptedRate: calcStats(runs.map((r) => r.acceptedRate)), + orderLagAt30s: calcStats(runs.map((r) => r.lagAt30s.orderLag)), + orderCatchupSec: calcStats(runs.map((r) => r.orderCatchupSec)), + emailLagAt30s: calcStats(runs.map((r) => r.lagAt30s.emailLag)), + emailCatchupSec: calcStats(runs.map((r) => r.emailCatchupSec)), + analyticLagAt30s: calcStats(runs.map((r) => r.lagAt30s.analyticLag)), + analyticCatchupSec: calcStats(runs.map((r) => r.analyticCatchupSec)), + }, + }; + } + + const outPath = path.join(rawDir, `summary-downstream-${label}.json`); + fs.writeFileSync(outPath, JSON.stringify(results, null, 2), 'utf8'); + console.log(`\nโœ… Saved downstream lag summary to ${outPath}`); +} + +main().catch((err) => { + console.error('\nโŒ Downstream lag measurement failed:', err); + process.exit(1); +}); diff --git a/benchmarks/measure-jwt.js b/benchmarks/measure-jwt.js new file mode 100644 index 0000000..b8d8507 --- /dev/null +++ b/benchmarks/measure-jwt.js @@ -0,0 +1,65 @@ +import jwt from '../api-gateway/node_modules/jsonwebtoken/index.js'; +import jws from '../api-gateway/node_modules/jws/index.js'; +import crypto from 'node:crypto'; +import { performance } from 'node:perf_hooks'; + +const secret = crypto.randomBytes(32).toString('hex'); +const keyObj = crypto.createSecretKey(Buffer.from(secret)); +const token = jwt.sign({ userId: 'k6_benchmark_user' }, secret, { expiresIn: '24h' }); +const iters = 10000; + +console.log('==============================================================='); +console.log(`๐Ÿ” JWT Verification Benchmark (${iters.toLocaleString()} iterations)`); +console.log('==============================================================='); + +// 1. Raw HMAC-SHA256 +{ + const [header, payload] = token.split('.'); + const data = `${header}.${payload}`; + const start = performance.now(); + for (let i = 0; i < iters; i++) { + crypto.createHmac('sha256', secret).update(data).digest('base64url'); + } + const dur = performance.now() - start; + const usPerOp = (dur / iters) * 1000; + const opsSec = (iters / (dur / 1000)); + console.log(`1. Raw crypto.createHmac (SHA256): ${usPerOp.toFixed(2)} ยตs/op | ${opsSec.toFixed(0)} ops/s`); +} + +// 2. jws.verify +{ + const start = performance.now(); + for (let i = 0; i < iters; i++) { + jws.verify(token, 'HS256', secret); + } + const dur = performance.now() - start; + const usPerOp = (dur / iters) * 1000; + const opsSec = (iters / (dur / 1000)); + console.log(`2. jws.verify (HS256): ${usPerOp.toFixed(2)} ยตs/op | ${opsSec.toFixed(0)} ops/s`); +} + +// 3. jwt.verify with KeyObject (bypasses createPublicKey attempt) +{ + const start = performance.now(); + for (let i = 0; i < iters; i++) { + jwt.verify(token, keyObj); + } + const dur = performance.now() - start; + const usPerOp = (dur / iters) * 1000; + const opsSec = (iters / (dur / 1000)); + console.log(`3. jwt.verify with KeyObject: ${usPerOp.toFixed(2)} ยตs/op | ${opsSec.toFixed(0)} ops/s`); +} + +// 4. jwt.verify with raw string secret (standard library call) +{ + const start = performance.now(); + for (let i = 0; i < iters; i++) { + jwt.verify(token, secret); + } + const dur = performance.now() - start; + const usPerOp = (dur / iters) * 1000; + const opsSec = (iters / (dur / 1000)); + console.log(`4. jwt.verify with string secret: ${usPerOp.toFixed(2)} ยตs/op | ${opsSec.toFixed(0)} ops/s`); +} + +console.log('==============================================================='); diff --git a/benchmarks/measure-latency.js b/benchmarks/measure-latency.js new file mode 100644 index 0000000..ee5c18c --- /dev/null +++ b/benchmarks/measure-latency.js @@ -0,0 +1,110 @@ +import { performance } from 'node:perf_hooks'; +import { execSync } from 'node:child_process'; + +const GATEWAY_URL = process.env.GATEWAY_URL || 'http://localhost:8085'; + +function queryDb(sqlQuery) { + const cmd = `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`; + return execSync(cmd, { encoding: 'utf8' }).trim(); +} + +async function measureLatency() { + console.log('='.repeat(70)); + console.log('๐Ÿ“Š StreamMart Latency Benchmark: Synchronous Gateway & Asynchronous Event'); + console.log('='.repeat(70)); + + // 1. Authenticate with Gateway + console.log('\n[Phase 1] Acquiring JWT for synchronous HTTP benchmark...'); + const authRes = await fetch(`${GATEWAY_URL}/api/auth/token`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ userId: 'latency_benchmark_user' }), + }); + + if (!authRes.ok) { + throw new Error(`Failed to acquire JWT: ${authRes.status} ${await authRes.text()}`); + } + + const { token } = await authRes.json(); + const headers = { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }; + + const payload = JSON.stringify({ + cart: [ + { id: 'item_bench_1', name: 'Latency Benchmark Hoodie', price: 49.99 }, + { id: 'item_bench_2', name: 'Microservices Mug', price: 12.50 }, + ], + }); + + // 2. Measure First Request (Cold Path) + console.log('\n--- 1. Measuring Synchronous HTTP Gateway Latency ---'); + const t0 = performance.now(); + const firstRes = await fetch(`${GATEWAY_URL}/api/payment`, { + method: 'POST', + headers, + body: payload, + }); + const firstLatency = performance.now() - t0; + if (!firstRes.ok) throw new Error(`First request failed: ${firstRes.status}`); + console.log(`First Request (Cold Path): ${firstLatency.toFixed(2)} ms`); + + // 3. Steady-State Requests (30 sequential requests) + const latencies = []; + for (let i = 1; i <= 30; i++) { + const start = performance.now(); + const res = await fetch(`${GATEWAY_URL}/api/payment`, { + method: 'POST', + headers, + body: payload, + }); + const dur = performance.now() - start; + latencies.push(dur); + if (!res.ok) throw new Error(`Request #${i} failed: ${res.status}`); + } + + latencies.sort((a, b) => a - b); + const min = latencies[0]; + const max = latencies[latencies.length - 1]; + const sum = latencies.reduce((a, b) => a + b, 0); + const avg = sum / latencies.length; + const p50 = latencies[Math.floor(latencies.length * 0.5)]; + const p95 = latencies[Math.floor(latencies.length * 0.95)]; + const p99 = latencies[Math.floor(latencies.length * 0.99)]; + + console.log(`Steady-State Min: ${min.toFixed(2)} ms`); + console.log(`Steady-State Max: ${max.toFixed(2)} ms`); + console.log(`Steady-State Avg (Mean): ${avg.toFixed(2)} ms`); + console.log(`Steady-State p50 (Median): ${p50.toFixed(2)} ms`); + console.log(`Steady-State p95: ${p95.toFixed(2)} ms`); + console.log(`Steady-State p99: ${p99.toFixed(2)} ms`); + + // 4. Measure End-to-End Asynchronous Event Latency (Kafka + Outbox -> Consumer) + console.log('\n--- 2. Measuring End-to-End Asynchronous Event Latency ---'); + console.log('Definition: Time from order-service database commit (orders.created_at)'); + console.log(' to downstream email-service processing (processed_events.processed_at).\n'); + + // Let event consumer catch up for 2 seconds + await new Promise((r) => setTimeout(r, 2000)); + + const sqlQuery = "SELECT COUNT(*) AS total_samples, ROUND(percentile_cont(0.50) WITHIN GROUP (ORDER BY EXTRACT(EPOCH FROM (pe.processed_at - o.created_at)) * 1000)::numeric, 2) AS p50_ms, ROUND(percentile_cont(0.95) WITHIN GROUP (ORDER BY EXTRACT(EPOCH FROM (pe.processed_at - o.created_at)) * 1000)::numeric, 2) AS p95_ms, ROUND(percentile_cont(0.99) WITHIN GROUP (ORDER BY EXTRACT(EPOCH FROM (pe.processed_at - o.created_at)) * 1000)::numeric, 2) AS p99_ms, ROUND(AVG(EXTRACT(EPOCH FROM (pe.processed_at - o.created_at)) * 1000)::numeric, 2) AS avg_ms FROM orders o JOIN outbox_events oe ON oe.payload->>'orderId' = o.id::text JOIN processed_events pe ON pe.event_id = oe.id::text WHERE pe.service_name = 'email-service';"; + const e2eStatsRaw = queryDb(sqlQuery); + + const [totalSamples, e2eP50, e2eP95, e2eP99, e2eAvg] = e2eStatsRaw.split('|'); + + console.log(`Total Events Sampled: ${totalSamples}`); + console.log(`End-to-End Event Latency Avg: ${e2eAvg} ms`); + console.log(`End-to-End Event Latency p50: ${e2eP50} ms`); + console.log(`End-to-End Event Latency p95: ${e2eP95} ms`); + console.log(`End-to-End Event Latency p99: ${e2eP99} ms`); + + console.log('\n' + '='.repeat(70)); + console.log('โœ… Latency Measurement Complete'); + console.log('='.repeat(70)); +} + +measureLatency().catch((err) => { + console.error('Latency measurement failed:', err); + process.exit(1); +}); diff --git a/benchmarks/measure-master-gateway.mjs b/benchmarks/measure-master-gateway.mjs new file mode 100644 index 0000000..3c8761a --- /dev/null +++ b/benchmarks/measure-master-gateway.mjs @@ -0,0 +1,90 @@ +import { execSync, spawn } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; + +const k6Binary = 'C:\\Program Files\\k6\\k6.exe'; + +function sleep(ms) { + return new Promise((r) => setTimeout(r, ms)); +} + +function getTcpStats() { + try { + const gwRaw = execSync('docker exec streammart-gateway grep Tcp: /proc/net/snmp', { encoding: 'utf8' }); + const pmRaw = execSync('docker exec streammart-payment grep Tcp: /proc/net/snmp', { encoding: 'utf8' }); + + const parseSnmp = (raw) => { + const lines = raw.trim().split('\n'); + const headers = lines[0].split(/\s+/); + const values = lines[1].split(/\s+/); + const activeIdx = headers.indexOf('ActiveOpens'); + const passiveIdx = headers.indexOf('PassiveOpens'); + return { + activeOpens: parseInt(values[activeIdx], 10), + passiveOpens: parseInt(values[passiveIdx], 10), + }; + }; + + return { + gateway: parseSnmp(gwRaw), + payment: parseSnmp(pmRaw), + }; + } catch (err) { + console.error('Error fetching TCP stats:', err.message); + return null; + } +} + +async function runTest() { + console.log('Testing ORIGINAL master gateway behavior (no custom agent passed to http-proxy-middleware)...'); + + // Backup current api-gateway/index.js + const currentCode = fs.readFileSync('api-gateway/index.js', 'utf8'); + + // Create master-like index.js without custom agent + const masterLikeCode = currentCode.replace( + 'agent: paymentProxyHttpAgent,', + '// agent omitted (master behavior)' + ); + + fs.writeFileSync('api-gateway/index.js', masterLikeCode, 'utf8'); + + try { + execSync('docker compose up -d --build api-gateway', { stdio: 'inherit' }); + + // Wait for healthy + for (let i = 0; i < 30; i++) { + await sleep(1000); + try { + const inspect = JSON.parse(execSync('docker inspect streammart-gateway', { encoding: 'utf8' })); + if (inspect[0]?.State?.Health?.Status === 'healthy') break; + } catch (_) {} + } + + console.log('Gateway healthy. Running 20 VU test for 30s...'); + + const tcpBefore = getTcpStats(); + const t0 = performance.now(); + + execSync(`"${k6Binary}" run --vus 20 --duration 30s benchmarks/gateway-load.js`, { stdio: 'inherit' }); + + const durationSec = (performance.now() - t0) / 1000; + const tcpAfter = getTcpStats(); + + const gwActive = tcpAfter.gateway.activeOpens - tcpBefore.gateway.activeOpens; + const pmPassive = tcpAfter.payment.passiveOpens - tcpBefore.payment.passiveOpens; + + console.log('\n======================================================'); + console.log('ORIGINAL MASTER CODE MEASUREMENT RESULTS:'); + console.log('Duration:', durationSec.toFixed(2), 's'); + console.log('Gateway ActiveOpens (outbound TCP opens):', gwActive); + console.log('Payment PassiveOpens (inbound TCP opens):', pmPassive); + console.log('Outbound TCP opens / sec:', (gwActive / durationSec).toFixed(2)); + console.log('======================================================\n'); + } finally { + // Restore current code + fs.writeFileSync('api-gateway/index.js', currentCode, 'utf8'); + } +} + +runTest().catch(console.error); diff --git a/benchmarks/measure-pool.js b/benchmarks/measure-pool.js new file mode 100644 index 0000000..1274796 --- /dev/null +++ b/benchmarks/measure-pool.js @@ -0,0 +1,82 @@ +import postgres from 'postgres'; +import { drizzle } from 'drizzle-orm/postgres-js'; +import { pgTable, text, timestamp, boolean, jsonb } from 'drizzle-orm/pg-core'; +import crypto from 'node:crypto'; +import { performance } from 'node:perf_hooks'; + +const connectionString = process.env.DATABASE_URL || 'postgresql://postgres:postgres@localhost:5432/streammart'; +const concurrency = parseInt(process.env.CONCURRENCY || '50', 10); +const totalTransactions = parseInt(process.env.TX_COUNT || '500', 10); + +const payments = pgTable('payments', { + id: text('id').primaryKey().$defaultFn(() => crypto.randomUUID()), + userId: text('user_id').notNull(), + amount: text('amount').notNull(), + status: text('status').notNull(), + createdAt: timestamp('created_at').defaultNow().notNull(), +}); + +const outboxEvents = pgTable('outbox_events', { + id: text('id').primaryKey(), + topic: text('topic').notNull(), + payload: jsonb('payload').notNull(), + published: boolean('published').default(false).notNull(), + createdAt: timestamp('created_at').defaultNow().notNull(), +}); + +async function testPoolSize(poolSize) { + const client = postgres(connectionString, { max: poolSize, prepare: false }); + const db = drizzle(client); + + // Warmup 5 transactions + for (let i = 0; i < 5; i++) { + const eventId = crypto.randomUUID(); + await db.transaction(async (tx) => { + await tx.insert(payments).values({ userId: 'warmup', amount: '10.00', status: 'completed' }); + await tx.insert(outboxEvents).values({ id: eventId, topic: 'warmup', payload: {}, published: false }); + }); + } + + let scheduled = 0; + const latencies = []; + const startAll = performance.now(); + + async function worker() { + while (scheduled < totalTransactions) { + scheduled++; + const start = performance.now(); + const eventId = crypto.randomUUID(); + await db.transaction(async (tx) => { + await tx.insert(payments).values({ userId: `bench_p${poolSize}`, amount: '10.00', status: 'completed' }); + await tx.insert(outboxEvents).values({ id: eventId, topic: 'bench_pool', payload: { eventId }, published: false }); + }); + latencies.push(performance.now() - start); + } + } + + await Promise.all(Array.from({ length: concurrency }, () => worker())); + const elapsedSec = (performance.now() - startAll) / 1000; + + latencies.sort((a, b) => a - b); + const min = latencies[0]; + const max = latencies[latencies.length - 1]; + const p50 = latencies[Math.floor(latencies.length * 0.5)]; + const p95 = latencies[Math.floor(latencies.length * 0.95)]; + const mean = latencies.reduce((a, b) => a + b, 0) / latencies.length; + const throughput = totalTransactions / elapsedSec; + + console.log(`Pool=${String(poolSize).padStart(2)}: ${throughput.toFixed(2).padStart(6)} tx/s | p50=${p50.toFixed(2).padStart(6)} ms | p95=${p95.toFixed(2).padStart(6)} ms | mean=${mean.toFixed(2).padStart(6)} ms | range=[${min.toFixed(1)}, ${max.toFixed(1)}] ms`); + await client.end(); +} + +async function main() { + console.log('========================================================================================'); + console.log(`๐Ÿ“Š DB Connection Pool Sweep (${totalTransactions} transactions, ${concurrency} concurrency)`); + console.log('========================================================================================'); + for (const poolSize of [5, 10, 15, 20, 25, 30, 40]) { + await testPoolSize(poolSize); + } + console.log('========================================================================================'); +} + +main().catch(console.error); diff --git a/benchmarks/measure-tx.js b/benchmarks/measure-tx.js new file mode 100644 index 0000000..d66c2b2 --- /dev/null +++ b/benchmarks/measure-tx.js @@ -0,0 +1,72 @@ +import postgres from 'postgres'; +import { drizzle } from 'drizzle-orm/postgres-js'; +import { pgTable, text, timestamp, boolean, jsonb } from 'drizzle-orm/pg-core'; +import crypto from 'node:crypto'; +import { performance } from 'node:perf_hooks'; + +const connectionString = process.env.DATABASE_URL || 'postgresql://postgres:postgres@localhost:5432/streammart'; +const iters = parseInt(process.argv[2] || '100', 10); + +const payments = pgTable('payments', { + id: text('id').primaryKey().$defaultFn(() => crypto.randomUUID()), + userId: text('user_id').notNull(), + amount: text('amount').notNull(), + status: text('status').notNull(), + createdAt: timestamp('created_at').defaultNow().notNull(), +}); + +const outboxEvents = pgTable('outbox_events', { + id: text('id').primaryKey(), + topic: text('topic').notNull(), + payload: jsonb('payload').notNull(), + published: boolean('published').default(false).notNull(), + createdAt: timestamp('created_at').defaultNow().notNull(), +}); + +async function main() { + const client = postgres(connectionString, { max: 5, prepare: false }); + const db = drizzle(client); + + console.log('==============================================================='); + console.log(`โฑ๏ธ Isolated Payment DB Transaction Benchmark (${iters} iterations)`); + console.log('==============================================================='); + + // Warmup 5 transactions + for (let i = 0; i < 5; i++) { + const eventId = crypto.randomUUID(); + await db.transaction(async (tx) => { + await tx.insert(payments).values({ userId: 'warmup', amount: '10.00', status: 'completed' }); + await tx.insert(outboxEvents).values({ id: eventId, topic: 'warmup', payload: {}, published: false }); + }); + } + + const times = []; + for (let i = 0; i < iters; i++) { + const start = performance.now(); + const eventId = crypto.randomUUID(); + await db.transaction(async (tx) => { + await tx.insert(payments).values({ userId: 'bench_isolated', amount: '29.99', status: 'completed' }); + await tx.insert(outboxEvents).values({ id: eventId, topic: 'payment-successful', payload: { eventId }, published: false }); + }); + times.push(performance.now() - start); + } + + times.sort((a, b) => a - b); + const min = times[0]; + const max = times[times.length - 1]; + const p50 = times[Math.floor(times.length * 0.5)]; + const p95 = times[Math.floor(times.length * 0.95)]; + const mean = times.reduce((a, b) => a + b, 0) / times.length; + + console.log(`Results:`); + console.log(` Min: ${min.toFixed(2)} ms`); + console.log(` Mean: ${mean.toFixed(2)} ms`); + console.log(` p50: ${p50.toFixed(2)} ms`); + console.log(` p95: ${p95.toFixed(2)} ms`); + console.log(` Max: ${max.toFixed(2)} ms`); + console.log('==============================================================='); + + await client.end(); +} + +main().catch(console.error); diff --git a/benchmarks/outbox-reliability.js b/benchmarks/outbox-reliability.js new file mode 100644 index 0000000..fe05f37 --- /dev/null +++ b/benchmarks/outbox-reliability.js @@ -0,0 +1,176 @@ +import { execSync } from 'node:child_process'; + +const GATEWAY_URL = process.env.GATEWAY_URL || 'http://localhost:8085'; +const TOTAL_CHECKOUTS = 500; + +async function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + const cmd = `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`; + return execSync(cmd, { encoding: 'utf8' }).trim(); +} + +async function runOutboxReliabilityBenchmark() { + console.log('='.repeat(75)); + console.log('๐Ÿงช StreamMart Benchmark: Outbox Reliability Under Broker Outage'); + console.log('='.repeat(75)); + console.log(`Scenario: Stop Kafka broker (docker stop streammart-kafka)`); + console.log(` Send ${TOTAL_CHECKOUTS} checkout requests through API Gateway.`); + console.log(` Restart Kafka broker, wait for Outbox Relay to drain.`); + console.log(` Assert: exactly ${TOTAL_CHECKOUTS} orders, 0 lost, 0 duplicates.\n`); + + const batchRunId = `bench_${Date.now()}`; + console.log('[Step 1] Acquiring JWT token from API Gateway...'); + const tokenRes = await fetch(`${GATEWAY_URL}/api/auth/token`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ userId: `bench_user_${batchRunId}` }), + }); + + if (!tokenRes.ok) { + throw new Error(`Auth failed: ${tokenRes.status} ${await tokenRes.text()}`); + } + const { token } = await tokenRes.json(); + console.log(`โœ… Obtained JWT for batch: ${batchRunId}`); + + const baselineOrders = parseInt(queryDb('SELECT COUNT(*) FROM orders'), 10) || 0; + const baselinePayments = parseInt(queryDb('SELECT COUNT(*) FROM payments'), 10) || 0; + console.log(`๐Ÿ“Š Baseline DB State: ${baselinePayments} payments, ${baselineOrders} orders`); + + // Stop Kafka Broker + console.log('\n[Step 2] Stopping Kafka broker (docker stop streammart-kafka)...'); + execSync('docker stop streammart-kafka', { stdio: 'inherit' }); + console.log('๐Ÿ›‘ Kafka broker stopped. Messaging system is completely OFFLINE.'); + + // Dispatch 500 checkout requests + console.log(`\n[Step 3] Dispatching ${TOTAL_CHECKOUTS} checkouts to API Gateway while Kafka is DOWN...`); + const startTime = Date.now(); + let successfulRequests = 0; + const concurrency = 25; + + const testUserIds = Array.from({ length: TOTAL_CHECKOUTS }, (_, i) => `user_${batchRunId}_${i}`); + + for (let i = 0; i < TOTAL_CHECKOUTS; i += concurrency) { + const batch = testUserIds.slice(i, i + concurrency); + await Promise.all( + batch.map(async (uId) => { + const res = await fetch(`${GATEWAY_URL}/api/payment`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${token}`, + 'x-user-id': uId, + }, + body: JSON.stringify({ + cart: [{ id: 'item-bench', name: 'Benchmark Item', price: 20.00 }], + }), + }); + + if (res.ok) { + successfulRequests++; + } else { + console.error(`Request failed for ${uId}: ${res.status}`); + } + }) + ); + } + + const durationSec = ((Date.now() - startTime) / 1000).toFixed(2); + console.log(`โœ… Dispatched ${successfulRequests}/${TOTAL_CHECKOUTS} checkouts in ${durationSec}s (100% accepted HTTP 200)`); + + // Check DB buffering while Kafka is down + console.log('\n[Step 4] Verifying database isolation while Kafka is OFFLINE:'); + const paymentsDuringOutage = parseInt(queryDb('SELECT COUNT(*) FROM payments'), 10) - baselinePayments; + const ordersDuringOutage = parseInt(queryDb('SELECT COUNT(*) FROM orders'), 10) - baselineOrders; + const pendingOutboxRows = parseInt(queryDb("SELECT COUNT(*) FROM outbox_events WHERE published = false AND topic = 'payment-successful'"), 10); + + console.log(` - New payments recorded in DB: ${paymentsDuringOutage}/${TOTAL_CHECKOUTS}`); + console.log(` - Pending outbox events in DB: ${pendingOutboxRows}/${TOTAL_CHECKOUTS}`); + console.log(` - Orders processed while Kafka is down: ${ordersDuringOutage} (Must be exactly 0)`); + + if (paymentsDuringOutage !== TOTAL_CHECKOUTS || ordersDuringOutage !== 0 || pendingOutboxRows < TOTAL_CHECKOUTS) { + throw new Error('Database isolation check failed! Outbox rows must buffer while Kafka is down.'); + } + console.log('โœ… PASS: All 500 events safely buffered in outbox table without data loss.'); + + // Restart Kafka Broker + console.log('\n[Step 5] Restarting Kafka broker (docker start streammart-kafka)...'); + execSync('docker start streammart-kafka', { stdio: 'inherit' }); + console.log('โณ Waiting for Kafka to become healthy...'); + + for (let i = 0; i < 30; i++) { + await sleep(1000); + try { + const inspect = execSync('docker inspect --format="{{.State.Health.Status}}" streammart-kafka', { encoding: 'utf8' }).trim(); + if (inspect === 'healthy') break; + } catch {} + } + console.log('โœ… Kafka broker is back ONLINE and HEALTHY.'); + + // Run 2nd concurrent relay instance to verify SKIP LOCKED concurrency + console.log('\n[Step 6] Running 2 concurrent Outbox Relay instances with SELECT ... FOR UPDATE SKIP LOCKED...'); + try { + execSync('docker exec -d streammart-payment node -e "import(\'./worker.js\').then(m => m.startOutboxWorker())"'); + console.log('โœ… Concurrent Outbox Relay Instance #2 launched in background.'); + } catch (err) { + console.warn('Note on 2nd relay:', err.message); + } + + // Drain Outbox and wait for Order Service + console.log('\n[Step 7] Waiting for outbox to drain and order-service to consume all events...'); + const drainStart = Date.now(); + let drained = false; + + for (let i = 0; i < 60; i++) { + await sleep(1000); + const remainingOutbox = parseInt(queryDb("SELECT COUNT(*) FROM outbox_events WHERE published = false AND topic = 'payment-successful'"), 10) || 0; + const currentOrders = parseInt(queryDb(`SELECT COUNT(*) FROM orders WHERE user_id LIKE 'user_${batchRunId}_%'`), 10) || 0; + + process.stdout.write(` [Drain Progress] Unpublished outbox: ${remainingOutbox} | Orders created: ${currentOrders}/${TOTAL_CHECKOUTS}\r`); + + if (remainingOutbox === 0 && currentOrders === TOTAL_CHECKOUTS) { + drained = true; + console.log(`\nโœ… Outbox completely drained and all orders processed in ${((Date.now() - drainStart) / 1000).toFixed(1)}s!`); + break; + } + } + + if (!drained) { + throw new Error('\nTimeout waiting for outbox drain and order processing.'); + } + + // Assertions + console.log('\n[Step 8] Strict Correctness & Concurrency Verification:'); + const finalBatchOrders = parseInt(queryDb(`SELECT COUNT(*) FROM orders WHERE user_id LIKE 'user_${batchRunId}_%'`), 10); + console.log(` 1. Total orders created for batch: ${finalBatchOrders}/${TOTAL_CHECKOUTS}`); + if (finalBatchOrders !== TOTAL_CHECKOUTS) { + throw new Error(`ASSERTION FAILED: Expected ${TOTAL_CHECKOUTS} orders, got ${finalBatchOrders}`); + } + console.log(' โœ… 0 Orders Lost (100% delivery guarantee).'); + + const duplicateUsers = queryDb(`SELECT user_id, COUNT(*) FROM orders WHERE user_id LIKE 'user_${batchRunId}_%' GROUP BY user_id HAVING COUNT(*) > 1`); + console.log(` 2. Duplicate orders detected: ${duplicateUsers ? duplicateUsers.split('\n').length : 0}`); + if (duplicateUsers && duplicateUsers.length > 0) { + throw new Error(`ASSERTION FAILED: Duplicate orders detected!\n${duplicateUsers}`); + } + console.log(' โœ… 0 Duplicates Processed (Strict Idempotency verified).'); + + const processedEventsCount = parseInt(queryDb(`SELECT COUNT(*) FROM processed_events WHERE service_name = 'order-service' AND event_id IN (SELECT id::text FROM outbox_events WHERE payload->>'userId' LIKE 'user_${batchRunId}_%')`), 10); + console.log(` 3. Order-service processed_events records: ${processedEventsCount}/${TOTAL_CHECKOUTS}`); + if (processedEventsCount !== TOTAL_CHECKOUTS) { + throw new Error(`ASSERTION FAILED: Expected ${TOTAL_CHECKOUTS} processed_events records, got ${processedEventsCount}`); + } + console.log(' โœ… Exactly 500 idempotent event records stored.'); + + console.log('\n' + '='.repeat(75)); + console.log(`๐ŸŽ‰ SUCCESS: 500 orders processed, 0 lost, 0 duplicates under broker outage & concurrent relays!`); + console.log('='.repeat(75)); +} + +runOutboxReliabilityBenchmark().catch((err) => { + console.error('\nโŒ Outbox Reliability Benchmark Failed:', err); + process.exit(1); +}); + diff --git a/benchmarks/raw/baseline-100vu-run1.json b/benchmarks/raw/baseline-100vu-run1.json new file mode 100644 index 0000000..d8d15b1 --- /dev/null +++ b/benchmarks/raw/baseline-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "iterations": { + "count": 4136, + "rate": 129.67334904013268 + }, + "http_reqs": { + "count": 4137, + "rate": 129.70470139725072 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "data_received": { + "count": 1369590, + "rate": 42939.87478526966 + }, + "checks": { + "passes": 4136, + "fails": 0, + "value": 1 + }, + "http_req_duration": { + "p(95)": 2566.23022, + "avg": 675.4393796470845, + "min": 62.2679, + "med": 476.6457, + "max": 5134.5469, + "p(90)": 597.8979800000001 + }, + "http_req_waiting": { + "min": 46.5511, + "med": 476.3409, + "max": 5133.7948, + "p(90)": 597.68274, + "p(95)": 2565.79678, + "avg": 675.1270534445243 + }, + "iteration_duration": { + "avg": 728.3256534332692, + "min": 115.739, + "med": 530.46005, + "max": 5186.1169, + "p(90)": 651.48425, + "p(95)": 2619.304775 + }, + "http_req_receiving": { + "p(95)": 0.74766, + "avg": 0.20127503021513185, + "min": 0, + "med": 0, + "max": 14.1519, + "p(90)": 0.58126 + }, + "http_req_failed": { + "fails": 4137, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 54.1653, + "p(90)": 0.4221800000000002, + "p(95)": 0.5519, + "avg": 0.11105117234711144 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "min": 62.2679, + "med": 476.6457, + "max": 5134.5469, + "p(90)": 597.8979800000001, + "p(95)": 2566.23022, + "avg": 675.4393796470845 + }, + "http_req_connecting": { + "max": 40.2723, + "p(90)": 2.7561000000000004, + "p(95)": 3.383399999999998, + "avg": 1.9602453952139192, + "min": 0, + "med": 1.6849 + }, + "data_sent": { + "count": 1876921, + "rate": 58845.89747431211 + }, + "http_req_blocked": { + "max": 49.3778, + "p(90)": 2.8871400000000005, + "p(95)": 3.598099999999999, + "avg": 2.1143914914188917, + "min": 0, + "med": 1.7619 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 4136 + } + } + } +} diff --git a/benchmarks/raw/baseline-100vu-run1.txt b/benchmarks/raw/baseline-100vu-run1.txt new file mode 100644 index 0000000..5984d21 --- /dev/null +++ b/benchmarks/raw/baseline-100vu-run1.txt @@ -0,0 +1,148 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 61 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.5s/30s + +running (0m03.0s), 100/100 VUs, 264 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.5s/30s + +running (0m04.0s), 100/100 VUs, 465 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 02.5s/30s + +running (0m05.0s), 100/100 VUs, 637 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.5s/30s + +running (0m06.0s), 100/100 VUs, 873 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.5s/30s + +running (0m07.0s), 100/100 VUs, 1066 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 05.5s/30s + +running (0m08.0s), 100/100 VUs, 1252 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.5s/30s + +running (0m09.0s), 100/100 VUs, 1419 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.5s/30s + +running (0m10.0s), 100/100 VUs, 1619 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 08.5s/30s + +running (0m11.0s), 100/100 VUs, 1804 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.5s/30s + +running (0m12.0s), 100/100 VUs, 1975 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.5s/30s + +running (0m13.0s), 100/100 VUs, 2156 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 11.5s/30s + +running (0m14.0s), 100/100 VUs, 2317 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.5s/30s + +running (0m15.0s), 100/100 VUs, 2503 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.5s/30s + +running (0m16.0s), 100/100 VUs, 2636 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 14.5s/30s + +running (0m17.0s), 100/100 VUs, 2636 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.5s/30s + +running (0m18.0s), 100/100 VUs, 2636 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.5s/30s + +running (0m19.0s), 100/100 VUs, 2655 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 17.5s/30s + +running (0m20.0s), 100/100 VUs, 2709 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.5s/30s + +running (0m21.0s), 100/100 VUs, 2739 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.5s/30s + +running (0m22.0s), 100/100 VUs, 2751 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 20.5s/30s + +running (0m23.0s), 100/100 VUs, 2761 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.5s/30s + +running (0m24.0s), 100/100 VUs, 2791 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.5s/30s + +running (0m25.0s), 100/100 VUs, 2830 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 23.5s/30s + +running (0m26.0s), 100/100 VUs, 2954 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.5s/30s + +running (0m27.0s), 100/100 VUs, 3160 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.5s/30s + +running (0m28.0s), 100/100 VUs, 3349 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 26.5s/30s + +running (0m29.0s), 100/100 VUs, 3523 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.5s/30s + +running (0m30.0s), 100/100 VUs, 3714 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.5s/30s + +running (0m31.0s), 100/100 VUs, 3927 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 29.5s/30s + +running (0m31.9s), 000/100 VUs, 4136 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 4136 129.673349/s + checks_succeeded...: 100.00% 4136 out of 4136 + checks_failed......: 0.00% 0 out of 4136 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=675.43ms min=62.26ms med=476.64ms max=5.13s p(90)=597.89ms p(95)=2.56s + { expected_response:true }...: avg=675.43ms min=62.26ms med=476.64ms max=5.13s p(90)=597.89ms p(95)=2.56s + http_req_failed................: 0.00% 0 out of 4137 + http_reqs......................: 4137 129.704701/s + + EXECUTION + iteration_duration.............: avg=728.32ms min=115.73ms med=530.46ms max=5.18s p(90)=651.48ms p(95)=2.61s + iterations.....................: 4136 129.673349/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 1.4 MB 43 kB/s + data_sent......................: 1.9 MB 59 kB/s + + + + +running (0m31.9s), 000/100 VUs, 4136 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/baseline-100vu-run2.json b/benchmarks/raw/baseline-100vu-run2.json new file mode 100644 index 0000000..56dd862 --- /dev/null +++ b/benchmarks/raw/baseline-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 3767, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_waiting": { + "avg": 850.0072167993617, + "min": 30.214, + "med": 507.77975000000004, + "max": 12845.4005, + "p(90)": 756.2160600000001, + "p(95)": 917.39762 + }, + "http_req_sending": { + "med": 0, + "max": 43.8738, + "p(90)": 0.5074500000000001, + "p(95)": 0.5565899999999998, + "avg": 0.11949097664543523, + "min": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 3768, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 3767, + "rate": 103.36388956862163 + }, + "http_reqs": { + "count": 3768, + "rate": 103.39132888095733 + }, + "http_req_connecting": { + "max": 67.2524, + "p(90)": 3.2974600000000005, + "p(95)": 4.634834999999997, + "avg": 2.1947338906581755, + "min": 0, + "med": 1.73325 + }, + "data_sent": { + "count": 1709395, + "rate": 46904.623310101924 + }, + "http_req_duration": { + "max": 12845.9091, + "p(90)": 756.8855100000001, + "p(95)": 917.9716, + "avg": 850.4006495222918, + "min": 95.3328, + "med": 508.28650000000005 + }, + "http_req_blocked": { + "avg": 2.3483083864118885, + "min": 0, + "med": 1.8328, + "max": 67.2524, + "p(90)": 3.569750000000001, + "p(95)": 5.022664999999998 + }, + "http_req_receiving": { + "p(90)": 0.6386000000000002, + "p(95)": 0.9315, + "avg": 0.2739417462845012, + "min": 0, + "med": 0, + "max": 72.0679 + }, + "http_req_duration{expected_response:true}": { + "min": 95.3328, + "med": 508.28650000000005, + "max": 12845.9091, + "p(90)": 756.8855100000001, + "p(95)": 917.9716, + "avg": 850.4006495222918 + }, + "vus": { + "value": 65, + "min": 0, + "max": 100 + }, + "iteration_duration": { + "avg": 903.7506589593842, + "min": 152.4114, + "med": 561.9122, + "max": 12899.3956, + "p(90)": 809.5351, + "p(95)": 975.13343 + }, + "data_received": { + "count": 1264794, + "rate": 34705.077606332685 + }, + "checks": { + "passes": 3767, + "fails": 0, + "value": 1 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + } + } +} diff --git a/benchmarks/raw/baseline-100vu-run2.txt b/benchmarks/raw/baseline-100vu-run2.txt new file mode 100644 index 0000000..04caf46 --- /dev/null +++ b/benchmarks/raw/baseline-100vu-run2.txt @@ -0,0 +1,160 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 40 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 00.4s/30s + +running (0m03.0s), 100/100 VUs, 197 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.4s/30s + +running (0m04.0s), 100/100 VUs, 384 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 02.4s/30s + +running (0m05.0s), 100/100 VUs, 587 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 03.4s/30s + +running (0m06.0s), 100/100 VUs, 744 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.4s/30s + +running (0m07.0s), 100/100 VUs, 870 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 05.4s/30s + +running (0m08.0s), 100/100 VUs, 1017 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 06.4s/30s + +running (0m09.0s), 100/100 VUs, 1174 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.4s/30s + +running (0m10.0s), 100/100 VUs, 1340 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 08.4s/30s + +running (0m11.0s), 100/100 VUs, 1563 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 09.4s/30s + +running (0m12.0s), 100/100 VUs, 1764 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.4s/30s + +running (0m13.0s), 100/100 VUs, 1942 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 11.4s/30s + +running (0m14.0s), 100/100 VUs, 2129 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 12.4s/30s + +running (0m15.0s), 100/100 VUs, 2299 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.4s/30s + +running (0m16.0s), 100/100 VUs, 2411 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 14.4s/30s + +running (0m17.0s), 100/100 VUs, 2540 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 15.4s/30s + +running (0m18.0s), 100/100 VUs, 2701 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.4s/30s + +running (0m19.0s), 100/100 VUs, 2802 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 17.4s/30s + +running (0m20.0s), 100/100 VUs, 2989 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 18.4s/30s + +running (0m21.0s), 100/100 VUs, 3177 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.4s/30s + +running (0m22.0s), 100/100 VUs, 3355 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 20.4s/30s + +running (0m23.0s), 100/100 VUs, 3550 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 21.4s/30s + +running (0m24.0s), 100/100 VUs, 3656 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.4s/30s + +running (0m25.0s), 100/100 VUs, 3656 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 23.4s/30s + +running (0m26.0s), 100/100 VUs, 3657 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 24.4s/30s + +running (0m27.0s), 100/100 VUs, 3657 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.4s/30s + +running (0m28.0s), 100/100 VUs, 3665 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 26.4s/30s + +running (0m29.0s), 100/100 VUs, 3667 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 27.4s/30s + +running (0m30.0s), 100/100 VUs, 3667 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.4s/30s + +running (0m31.0s), 100/100 VUs, 3667 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 29.4s/30s + +running (0m32.0s), 092/100 VUs, 3675 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + +running (0m33.0s), 092/100 VUs, 3675 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + +running (0m34.0s), 092/100 VUs, 3675 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + +running (0m35.0s), 090/100 VUs, 3677 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + +running (0m36.0s), 065/100 VUs, 3702 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 3767 103.36389/s + checks_succeeded...: 100.00% 3767 out of 3767 + checks_failed......: 0.00% 0 out of 3767 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=850.4ms min=95.33ms med=508.28ms max=12.84s p(90)=756.88ms p(95)=917.97ms + { expected_response:true }...: avg=850.4ms min=95.33ms med=508.28ms max=12.84s p(90)=756.88ms p(95)=917.97ms + http_req_failed................: 0.00% 0 out of 3768 + http_reqs......................: 3768 103.391329/s + + EXECUTION + iteration_duration.............: avg=903.75ms min=152.41ms med=561.91ms max=12.89s p(90)=809.53ms p(95)=975.13ms + iterations.....................: 3767 103.36389/s + vus............................: 65 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 1.3 MB 35 kB/s + data_sent......................: 1.7 MB 47 kB/s + + + + +running (0m36.4s), 000/100 VUs, 3767 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/baseline-100vu-run3.json b/benchmarks/raw/baseline-100vu-run3.json new file mode 100644 index 0000000..21c585a --- /dev/null +++ b/benchmarks/raw/baseline-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_waiting": { + "p(90)": 545.89866, + "p(95)": 584.9638, + "avg": 464.1349899038476, + "min": 22.893, + "med": 452.55885, + "max": 1523.1713 + }, + "http_reqs": { + "count": 5824, + "rate": 182.07180115273331 + }, + "http_req_receiving": { + "p(90)": 0.5603, + "p(95)": 0.6894099999999996, + "avg": 0.1765531593406592, + "min": 0, + "med": 0, + "max": 10.9957 + }, + "data_sent": { + "count": 2642819, + "rate": 82620.67572985329 + }, + "http_req_failed": { + "passes": 0, + "fails": 5824, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "p(90)": 2.44657, + "p(95)": 2.9455099999999987, + "avg": 1.8034092719780226, + "min": 0, + "med": 1.63355, + "max": 56.9093 + }, + "http_req_blocked": { + "p(90)": 2.5807700000000002, + "p(95)": 3.116119999999999, + "avg": 1.9235193337912064, + "min": 0, + "med": 1.6774, + "max": 57.9209 + }, + "http_req_sending": { + "p(95)": 0.5516849999999999, + "avg": 0.09947187499999977, + "min": 0, + "med": 0, + "max": 64.7621, + "p(90)": 0.46689999999999965 + }, + "checks": { + "passes": 5823, + "fails": 0, + "value": 1 + }, + "vus": { + "value": 11, + "min": 0, + "max": 100 + }, + "http_req_duration{expected_response:true}": { + "max": 1525.9786, + "p(90)": 546.72159, + "p(95)": 585.3403549999999, + "avg": 464.4110149381873, + "min": 24.5123, + "med": 452.8023 + }, + "iteration_duration": { + "p(95)": 638.2432, + "avg": 517.0743803365966, + "min": 78.3025, + "med": 505.55, + "max": 1120.0518, + "p(90)": 599.49968 + }, + "data_received": { + "count": 1848698, + "rate": 57794.604163368094 + }, + "iterations": { + "count": 5823, + "rate": 182.0405388242387 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration": { + "p(95)": 585.3403549999999, + "avg": 464.4110149381873, + "min": 24.5123, + "med": 452.8023, + "max": 1525.9786, + "p(90)": 546.72159 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + } + }, + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "passes": 5823, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + } +} diff --git a/benchmarks/raw/baseline-100vu-run3.txt b/benchmarks/raw/baseline-100vu-run3.txt new file mode 100644 index 0000000..7f0b325 --- /dev/null +++ b/benchmarks/raw/baseline-100vu-run3.txt @@ -0,0 +1,148 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 40 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 00.4s/30s + +running (0m03.0s), 100/100 VUs, 210 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.4s/30s + +running (0m04.0s), 100/100 VUs, 399 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 02.4s/30s + +running (0m05.0s), 100/100 VUs, 583 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 03.4s/30s + +running (0m06.0s), 100/100 VUs, 686 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.4s/30s + +running (0m07.0s), 100/100 VUs, 851 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 05.4s/30s + +running (0m08.0s), 100/100 VUs, 1045 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 06.4s/30s + +running (0m09.0s), 100/100 VUs, 1225 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.4s/30s + +running (0m10.0s), 100/100 VUs, 1401 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 08.4s/30s + +running (0m11.0s), 100/100 VUs, 1571 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 09.4s/30s + +running (0m12.0s), 100/100 VUs, 1764 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.4s/30s + +running (0m13.0s), 100/100 VUs, 1945 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 11.4s/30s + +running (0m14.0s), 100/100 VUs, 2094 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 12.4s/30s + +running (0m15.0s), 100/100 VUs, 2266 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.4s/30s + +running (0m16.0s), 100/100 VUs, 2455 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 14.4s/30s + +running (0m17.0s), 100/100 VUs, 2663 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 15.4s/30s + +running (0m18.0s), 100/100 VUs, 2847 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.4s/30s + +running (0m19.0s), 100/100 VUs, 3040 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 17.4s/30s + +running (0m20.0s), 100/100 VUs, 3262 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 18.4s/30s + +running (0m21.0s), 100/100 VUs, 3480 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.4s/30s + +running (0m22.0s), 100/100 VUs, 3688 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 20.4s/30s + +running (0m23.0s), 100/100 VUs, 3891 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 21.4s/30s + +running (0m24.0s), 100/100 VUs, 4080 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.4s/30s + +running (0m25.0s), 100/100 VUs, 4277 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 23.4s/30s + +running (0m26.0s), 100/100 VUs, 4469 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 24.4s/30s + +running (0m27.0s), 100/100 VUs, 4695 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.4s/30s + +running (0m28.0s), 100/100 VUs, 4911 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 26.4s/30s + +running (0m29.0s), 100/100 VUs, 5123 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 27.4s/30s + +running (0m30.0s), 100/100 VUs, 5332 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.4s/30s + +running (0m31.0s), 100/100 VUs, 5572 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 29.4s/30s + +running (0m32.0s), 011/100 VUs, 5812 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5823 182.040539/s + checks_succeeded...: 100.00% 5823 out of 5823 + checks_failed......: 0.00% 0 out of 5823 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=464.41ms min=24.51ms med=452.8ms max=1.52s p(90)=546.72ms p(95)=585.34ms + { expected_response:true }...: avg=464.41ms min=24.51ms med=452.8ms max=1.52s p(90)=546.72ms p(95)=585.34ms + http_req_failed................: 0.00% 0 out of 5824 + http_reqs......................: 5824 182.071801/s + + EXECUTION + iteration_duration.............: avg=517.07ms min=78.3ms med=505.55ms max=1.12s p(90)=599.49ms p(95)=638.24ms + iterations.....................: 5823 182.040539/s + vus............................: 11 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 1.8 MB 58 kB/s + data_sent......................: 2.6 MB 83 kB/s + + + + +running (0m32.0s), 000/100 VUs, 5823 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/baseline-100vu-warmup.json b/benchmarks/raw/baseline-100vu-warmup.json new file mode 100644 index 0000000..fa70f50 --- /dev/null +++ b/benchmarks/raw/baseline-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_sending": { + "max": 29.0168, + "p(90)": 0.49889000000000006, + "p(95)": 0.551, + "avg": 0.08956873224431808, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "p(95)": 773.23705, + "avg": 534.9724761676438, + "min": 157.8853, + "med": 514.5618, + "max": 971.1829, + "p(90)": 637.1241 + }, + "http_req_duration": { + "med": 462.3309, + "max": 4177.6273, + "p(90)": 583.98216, + "p(95)": 720.3576549999999, + "avg": 482.80742588778503, + "min": 77.0234 + }, + "iterations": { + "count": 5631, + "rate": 161.96366344779105 + }, + "http_req_connecting": { + "min": 0, + "med": 1.5921, + "max": 32.7878, + "p(90)": 2.5952300000000013, + "p(95)": 3.3857499999999994, + "avg": 1.7863314808238597 + }, + "http_reqs": { + "count": 5632, + "rate": 161.99242630757578 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_req_receiving": { + "avg": 0.21706772017045478, + "min": 0, + "med": 0, + "max": 36.3095, + "p(90)": 0.5731900000000001, + "p(95)": 0.7364149999999998 + }, + "http_req_failed": { + "passes": 0, + "fails": 5632, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "avg": 1.9049474609374961, + "min": 0, + "med": 1.615, + "max": 40.5025, + "p(90)": 2.726750000000001, + "p(95)": 3.5955649999999992 + }, + "http_req_duration{expected_response:true}": { + "avg": 482.80742588778503, + "min": 77.0234, + "med": 462.3309, + "max": 4177.6273, + "p(90)": 583.98216, + "p(95)": 720.3576549999999 + }, + "data_sent": { + "count": 2555651, + "rate": 73507.83137169431 + }, + "http_req_waiting": { + "med": 462.08855000000005, + "max": 4173.4683, + "p(90)": 583.9173400000001, + "p(95)": 720.0064349999999, + "avg": 482.5007894353701, + "min": 47.4488 + }, + "data_received": { + "count": 1794170, + "rate": 51605.46013996151 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "checks": { + "passes": 5631, + "fails": 0, + "value": 1 + } + }, + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5631, + "fails": 0, + "name": "status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + } +} diff --git a/benchmarks/raw/baseline-100vu-warmup.txt b/benchmarks/raw/baseline-100vu-warmup.txt new file mode 100644 index 0000000..11b2715 --- /dev/null +++ b/benchmarks/raw/baseline-100vu-warmup.txt @@ -0,0 +1,154 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +running (0m05.0s), 100/100 VUs, 85 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.7s/30s + +running (0m06.0s), 100/100 VUs, 251 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.7s/30s + +running (0m07.0s), 100/100 VUs, 415 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.7s/30s + +running (0m08.0s), 100/100 VUs, 614 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.7s/30s + +running (0m09.0s), 100/100 VUs, 827 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.7s/30s + +running (0m10.0s), 100/100 VUs, 1022 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.7s/30s + +running (0m11.0s), 100/100 VUs, 1184 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.7s/30s + +running (0m12.0s), 100/100 VUs, 1366 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.7s/30s + +running (0m13.0s), 100/100 VUs, 1536 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.7s/30s + +running (0m14.0s), 100/100 VUs, 1723 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.7s/30s + +running (0m15.0s), 100/100 VUs, 1943 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.7s/30s + +running (0m16.0s), 100/100 VUs, 2132 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.7s/30s + +running (0m17.0s), 100/100 VUs, 2304 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.7s/30s + +running (0m18.0s), 100/100 VUs, 2473 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.7s/30s + +running (0m19.0s), 100/100 VUs, 2684 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.7s/30s + +running (0m20.0s), 100/100 VUs, 2884 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.7s/30s + +running (0m21.0s), 100/100 VUs, 3099 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.7s/30s + +running (0m22.0s), 100/100 VUs, 3317 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.7s/30s + +running (0m23.0s), 100/100 VUs, 3553 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.7s/30s + +running (0m24.0s), 100/100 VUs, 3766 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.7s/30s + +running (0m25.0s), 100/100 VUs, 3981 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.7s/30s + +running (0m26.0s), 100/100 VUs, 4188 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.7s/30s + +running (0m27.0s), 100/100 VUs, 4403 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.7s/30s + +running (0m28.0s), 100/100 VUs, 4598 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.7s/30s + +running (0m29.0s), 100/100 VUs, 4781 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.7s/30s + +running (0m30.0s), 100/100 VUs, 4893 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.7s/30s + +running (0m31.0s), 100/100 VUs, 5037 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.7s/30s + +running (0m32.0s), 100/100 VUs, 5174 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.7s/30s + +running (0m33.0s), 100/100 VUs, 5352 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.7s/30s + +running (0m34.0s), 100/100 VUs, 5479 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5631 161.963663/s + checks_succeeded...: 100.00% 5631 out of 5631 + checks_failed......: 0.00% 0 out of 5631 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=482.8ms min=77.02ms med=462.33ms max=4.17s p(90)=583.98ms p(95)=720.35ms + { expected_response:true }...: avg=482.8ms min=77.02ms med=462.33ms max=4.17s p(90)=583.98ms p(95)=720.35ms + http_req_failed................: 0.00% 0 out of 5632 + http_reqs......................: 5632 161.992426/s + + EXECUTION + iteration_duration.............: avg=534.97ms min=157.88ms med=514.56ms max=971.18ms p(90)=637.12ms p(95)=773.23ms + iterations.....................: 5631 161.963663/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 1.8 MB 52 kB/s + data_sent......................: 2.6 MB 74 kB/s + + + + +running (0m34.8s), 000/100 VUs, 5631 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/baseline-20vu-run1.json b/benchmarks/raw/baseline-20vu-run1.json new file mode 100644 index 0000000..6b67c71 --- /dev/null +++ b/benchmarks/raw/baseline-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 4228, + "fails": 0 + } + } + }, + "metrics": { + "http_req_blocked": { + "min": 0, + "med": 1.5856, + "max": 59.7328, + "p(90)": 2.934640000000001, + "p(95)": 4.243899999999999, + "avg": 1.9906383542208566 + }, + "http_req_connecting": { + "avg": 1.8475303144951538, + "min": 0, + "med": 1.443, + "max": 59.7328, + "p(90)": 2.6875400000000003, + "p(95)": 3.9742999999999995 + }, + "iterations": { + "rate": 135.13386098823187, + "count": 4228 + }, + "http_req_duration{expected_response:true}": { + "avg": 89.07539191298144, + "min": 12.5362, + "med": 61.6157, + "max": 1405.414, + "p(90)": 130.74408000000003, + "p(95)": 176.21513999999988 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_sending": { + "med": 0, + "max": 17.191, + "p(90)": 0.4664800000000008, + "p(95)": 0.55098, + "avg": 0.0731114211397493, + "min": 0 + }, + "checks": { + "passes": 4228, + "fails": 0, + "value": 1 + }, + "iteration_duration": { + "avg": 142.18912121570466, + "min": 64.5204, + "med": 114.26795, + "max": 1456.6677, + "p(90)": 185.79631000000006, + "p(95)": 240.9376249999999 + }, + "http_req_receiving": { + "avg": 0.27690423267912073, + "min": 0, + "med": 0, + "max": 22.6368, + "p(90)": 0.6514800000000003, + "p(95)": 1.00922 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "p(95)": 173.5141, + "avg": 88.72537625916257, + "min": 12.5362, + "med": 61.4117, + "max": 1404.8667, + "p(90)": 130.04936000000006 + }, + "http_req_failed": { + "fails": 4229, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 4229, + "rate": 135.1658226393644 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration": { + "med": 61.6157, + "max": 1405.414, + "p(90)": 130.74408000000003, + "p(95)": 176.21513999999988, + "avg": 89.07539191298144, + "min": 12.5362 + }, + "data_sent": { + "rate": 61492.45888812767, + "count": 1923945 + }, + "data_received": { + "count": 1395718, + "rate": 44609.45179535786 + } + } +} diff --git a/benchmarks/raw/baseline-20vu-run1.txt b/benchmarks/raw/baseline-20vu-run1.txt new file mode 100644 index 0000000..9560dc4 --- /dev/null +++ b/benchmarks/raw/baseline-20vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 159 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m03.0s), 20/20 VUs, 368 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m04.0s), 20/20 VUs, 567 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m05.0s), 20/20 VUs, 735 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m06.0s), 20/20 VUs, 900 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m07.0s), 20/20 VUs, 1009 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m08.0s), 20/20 VUs, 1118 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m09.0s), 20/20 VUs, 1264 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m10.0s), 20/20 VUs, 1428 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m11.0s), 20/20 VUs, 1551 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m12.0s), 20/20 VUs, 1597 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m13.0s), 20/20 VUs, 1636 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m14.0s), 20/20 VUs, 1664 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m15.0s), 20/20 VUs, 1683 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m16.0s), 20/20 VUs, 1702 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m17.0s), 20/20 VUs, 1843 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m18.0s), 20/20 VUs, 2011 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m19.0s), 20/20 VUs, 2135 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m20.0s), 20/20 VUs, 2298 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m21.0s), 20/20 VUs, 2497 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m22.0s), 20/20 VUs, 2648 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m23.0s), 20/20 VUs, 2826 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m24.0s), 20/20 VUs, 2976 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m25.0s), 20/20 VUs, 3083 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m26.0s), 20/20 VUs, 3264 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m27.0s), 20/20 VUs, 3456 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m28.0s), 20/20 VUs, 3601 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m29.0s), 20/20 VUs, 3799 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m30.0s), 20/20 VUs, 4001 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m31.0s), 20/20 VUs, 4183 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 4228 135.133861/s + checks_succeeded...: 100.00% 4228 out of 4228 + checks_failed......: 0.00% 0 out of 4228 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=89.07ms min=12.53ms med=61.61ms max=1.4s p(90)=130.74ms p(95)=176.21ms + { expected_response:true }...: avg=89.07ms min=12.53ms med=61.61ms max=1.4s p(90)=130.74ms p(95)=176.21ms + http_req_failed................: 0.00% 0 out of 4229 + http_reqs......................: 4229 135.165823/s + + EXECUTION + iteration_duration.............: avg=142.18ms min=64.52ms med=114.26ms max=1.45s p(90)=185.79ms p(95)=240.93ms + iterations.....................: 4228 135.133861/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.4 MB 45 kB/s + data_sent......................: 1.9 MB 62 kB/s + + + + +running (0m31.3s), 00/20 VUs, 4228 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/baseline-20vu-run2.json b/benchmarks/raw/baseline-20vu-run2.json new file mode 100644 index 0000000..4f68c9d --- /dev/null +++ b/benchmarks/raw/baseline-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 4770, + "fails": 0, + "name": "status is 200" + } + } + }, + "metrics": { + "http_req_blocked": { + "max": 36.8565, + "p(90)": 2.2018, + "p(95)": 2.7284, + "avg": 1.5397608677426082, + "min": 0, + "med": 1.505 + }, + "data_sent": { + "rate": 69565.19772061148, + "count": 2171097 + }, + "data_received": { + "count": 1549646, + "rate": 49652.97745193085 + }, + "http_reqs": { + "count": 4771, + "rate": 152.86998154621253 + }, + "http_req_waiting": { + "p(90)": 118.94, + "p(95)": 180.31435, + "avg": 73.59536958708863, + "min": 16.506, + "med": 57.8298, + "max": 1040.5949 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 119.288, + "p(95)": 180.8073, + "avg": 73.83240450639282, + "min": 17.0377, + "med": 58.0091, + "max": 1046.9054 + }, + "http_req_connecting": { + "p(95)": 2.4703999999999997, + "avg": 1.443275644518965, + "min": 0, + "med": 1.3085, + "max": 15.2572, + "p(90)": 2.116 + }, + "checks": { + "passes": 4770, + "fails": 0, + "value": 1 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_duration": { + "p(90)": 119.288, + "p(95)": 180.8073, + "avg": 73.83240450639282, + "min": 17.0377, + "med": 58.0091, + "max": 1046.9054 + }, + "iteration_duration": { + "avg": 125.93702716981124, + "min": 68.435, + "med": 110.32050000000001, + "max": 665.5967, + "p(90)": 171.93684000000005, + "p(95)": 232.36117000000004 + }, + "http_req_sending": { + "avg": 0.05568222594843853, + "min": 0, + "med": 0, + "max": 14.04, + "p(90)": 0, + "p(95)": 0.5393 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 7.5635, + "p(90)": 0.5625, + "p(95)": 0.69085, + "avg": 0.18135269335569046 + }, + "http_req_failed": { + "passes": 0, + "fails": 4771, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "iterations": { + "count": 4770, + "rate": 152.83794004934686 + } + } +} diff --git a/benchmarks/raw/baseline-20vu-run2.txt b/benchmarks/raw/baseline-20vu-run2.txt new file mode 100644 index 0000000..44d4688 --- /dev/null +++ b/benchmarks/raw/baseline-20vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 138 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m03.0s), 20/20 VUs, 305 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m04.0s), 20/20 VUs, 473 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m05.0s), 20/20 VUs, 629 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m06.0s), 20/20 VUs, 706 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m07.0s), 20/20 VUs, 758 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m08.0s), 20/20 VUs, 834 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m09.0s), 20/20 VUs, 1004 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m10.0s), 20/20 VUs, 1137 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m11.0s), 20/20 VUs, 1232 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m12.0s), 20/20 VUs, 1399 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m13.0s), 20/20 VUs, 1554 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m14.0s), 20/20 VUs, 1692 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m15.0s), 20/20 VUs, 1842 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m16.0s), 20/20 VUs, 2008 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m17.0s), 20/20 VUs, 2173 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m18.0s), 20/20 VUs, 2341 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m19.0s), 20/20 VUs, 2526 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m20.0s), 20/20 VUs, 2714 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m21.0s), 20/20 VUs, 2905 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m22.0s), 20/20 VUs, 3107 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m23.0s), 20/20 VUs, 3316 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m24.0s), 20/20 VUs, 3496 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m25.0s), 20/20 VUs, 3662 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m26.0s), 20/20 VUs, 3864 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m27.0s), 20/20 VUs, 4066 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m28.0s), 20/20 VUs, 4247 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m29.0s), 20/20 VUs, 4447 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m30.0s), 20/20 VUs, 4600 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m31.0s), 20/20 VUs, 4726 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 4770 152.83794/s + checks_succeeded...: 100.00% 4770 out of 4770 + checks_failed......: 0.00% 0 out of 4770 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=73.83ms min=17.03ms med=58ms max=1.04s p(90)=119.28ms p(95)=180.8ms + { expected_response:true }...: avg=73.83ms min=17.03ms med=58ms max=1.04s p(90)=119.28ms p(95)=180.8ms + http_req_failed................: 0.00% 0 out of 4771 + http_reqs......................: 4771 152.869982/s + + EXECUTION + iteration_duration.............: avg=125.93ms min=68.43ms med=110.32ms max=665.59ms p(90)=171.93ms p(95)=232.36ms + iterations.....................: 4770 152.83794/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.5 MB 50 kB/s + data_sent......................: 2.2 MB 70 kB/s + + + + +running (0m31.2s), 00/20 VUs, 4770 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/baseline-20vu-run3.json b/benchmarks/raw/baseline-20vu-run3.json new file mode 100644 index 0000000..69a427b --- /dev/null +++ b/benchmarks/raw/baseline-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5400, + "fails": 0 + } + } + }, + "metrics": { + "http_req_duration": { + "avg": 58.69558220699892, + "min": 13.6101, + "med": 53.9315, + "max": 1533.9901, + "p(90)": 89.8871, + "p(95)": 101.777 + }, + "http_req_sending": { + "p(95)": 0.5502, + "avg": 0.0755210886872801, + "min": 0, + "med": 0, + "max": 13.171, + "p(90)": 0.521 + }, + "iteration_duration": { + "avg": 111.08868312962979, + "min": 65.277, + "med": 106.407, + "max": 325.1466, + "p(90)": 143.47642000000002, + "p(95)": 154.90005499999998 + }, + "http_req_blocked": { + "p(95)": 3.366, + "avg": 1.8339041103499325, + "min": 0.3126, + "med": 1.6254, + "max": 40.0374, + "p(90)": 2.6769 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "checks": { + "passes": 5400, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "passes": 0, + "fails": 5401, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_waiting": { + "avg": 58.42489027957786, + "min": 13.6101, + "med": 53.6982, + "max": 1519.4072, + "p(90)": 89.607, + "p(95)": 101.4895 + }, + "http_req_receiving": { + "max": 14.0399, + "p(90)": 0.5722, + "p(95)": 0.7297, + "avg": 0.19517083873356744, + "min": 0, + "med": 0 + }, + "data_received": { + "count": 1728566, + "rate": 54537.33318578579 + }, + "http_req_duration{expected_response:true}": { + "med": 53.9315, + "max": 1533.9901, + "p(90)": 89.8871, + "p(95)": 101.777, + "avg": 58.69558220699892, + "min": 13.6101 + }, + "data_sent": { + "count": 2458377, + "rate": 77563.32448125933 + }, + "http_req_connecting": { + "p(95)": 3.1341, + "avg": 1.7211415108313255, + "min": 0.3126, + "med": 1.6036, + "max": 34.4081, + "p(90)": 2.4817 + }, + "vus": { + "min": 0, + "max": 20, + "value": 20 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_reqs": { + "count": 5401, + "rate": 170.4049116645989 + }, + "iterations": { + "count": 5400, + "rate": 170.3733610421837 + } + } +} diff --git a/benchmarks/raw/baseline-20vu-run3.txt b/benchmarks/raw/baseline-20vu-run3.txt new file mode 100644 index 0000000..ed78b5d --- /dev/null +++ b/benchmarks/raw/baseline-20vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 41 complete and 0 interrupted iterations +default [ 1% ] 20 VUs 00.4s/30s + +running (0m03.0s), 20/20 VUs, 185 complete and 0 interrupted iterations +default [ 5% ] 20 VUs 01.4s/30s + +running (0m04.0s), 20/20 VUs, 335 complete and 0 interrupted iterations +default [ 8% ] 20 VUs 02.4s/30s + +running (0m05.0s), 20/20 VUs, 472 complete and 0 interrupted iterations +default [ 11% ] 20 VUs 03.4s/30s + +running (0m06.0s), 20/20 VUs, 636 complete and 0 interrupted iterations +default [ 15% ] 20 VUs 04.4s/30s + +running (0m07.0s), 20/20 VUs, 785 complete and 0 interrupted iterations +default [ 18% ] 20 VUs 05.4s/30s + +running (0m08.0s), 20/20 VUs, 960 complete and 0 interrupted iterations +default [ 21% ] 20 VUs 06.4s/30s + +running (0m09.0s), 20/20 VUs, 1148 complete and 0 interrupted iterations +default [ 25% ] 20 VUs 07.4s/30s + +running (0m10.0s), 20/20 VUs, 1329 complete and 0 interrupted iterations +default [ 28% ] 20 VUs 08.4s/30s + +running (0m11.0s), 20/20 VUs, 1520 complete and 0 interrupted iterations +default [ 31% ] 20 VUs 09.4s/30s + +running (0m12.0s), 20/20 VUs, 1697 complete and 0 interrupted iterations +default [ 35% ] 20 VUs 10.4s/30s + +running (0m13.0s), 20/20 VUs, 1845 complete and 0 interrupted iterations +default [ 38% ] 20 VUs 11.4s/30s + +running (0m14.0s), 20/20 VUs, 2002 complete and 0 interrupted iterations +default [ 41% ] 20 VUs 12.4s/30s + +running (0m15.0s), 20/20 VUs, 2163 complete and 0 interrupted iterations +default [ 45% ] 20 VUs 13.4s/30s + +running (0m16.0s), 20/20 VUs, 2354 complete and 0 interrupted iterations +default [ 48% ] 20 VUs 14.4s/30s + +running (0m17.0s), 20/20 VUs, 2529 complete and 0 interrupted iterations +default [ 51% ] 20 VUs 15.4s/30s + +running (0m18.0s), 20/20 VUs, 2747 complete and 0 interrupted iterations +default [ 55% ] 20 VUs 16.4s/30s + +running (0m19.0s), 20/20 VUs, 2957 complete and 0 interrupted iterations +default [ 58% ] 20 VUs 17.4s/30s + +running (0m20.0s), 20/20 VUs, 3149 complete and 0 interrupted iterations +default [ 61% ] 20 VUs 18.4s/30s + +running (0m21.0s), 20/20 VUs, 3356 complete and 0 interrupted iterations +default [ 65% ] 20 VUs 19.4s/30s + +running (0m22.0s), 20/20 VUs, 3503 complete and 0 interrupted iterations +default [ 68% ] 20 VUs 20.4s/30s + +running (0m23.0s), 20/20 VUs, 3668 complete and 0 interrupted iterations +default [ 71% ] 20 VUs 21.4s/30s + +running (0m24.0s), 20/20 VUs, 3872 complete and 0 interrupted iterations +default [ 75% ] 20 VUs 22.4s/30s + +running (0m25.0s), 20/20 VUs, 4075 complete and 0 interrupted iterations +default [ 78% ] 20 VUs 23.4s/30s + +running (0m26.0s), 20/20 VUs, 4285 complete and 0 interrupted iterations +default [ 81% ] 20 VUs 24.4s/30s + +running (0m27.0s), 20/20 VUs, 4489 complete and 0 interrupted iterations +default [ 85% ] 20 VUs 25.4s/30s + +running (0m28.0s), 20/20 VUs, 4714 complete and 0 interrupted iterations +default [ 88% ] 20 VUs 26.4s/30s + +running (0m29.0s), 20/20 VUs, 4920 complete and 0 interrupted iterations +default [ 91% ] 20 VUs 27.4s/30s + +running (0m30.0s), 20/20 VUs, 5103 complete and 0 interrupted iterations +default [ 95% ] 20 VUs 28.4s/30s + +running (0m31.0s), 20/20 VUs, 5270 complete and 0 interrupted iterations +default [ 98% ] 20 VUs 29.4s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5400 170.373361/s + checks_succeeded...: 100.00% 5400 out of 5400 + checks_failed......: 0.00% 0 out of 5400 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=58.69ms min=13.61ms med=53.93ms max=1.53s p(90)=89.88ms p(95)=101.77ms + { expected_response:true }...: avg=58.69ms min=13.61ms med=53.93ms max=1.53s p(90)=89.88ms p(95)=101.77ms + http_req_failed................: 0.00% 0 out of 5401 + http_reqs......................: 5401 170.404912/s + + EXECUTION + iteration_duration.............: avg=111.08ms min=65.27ms med=106.4ms max=325.14ms p(90)=143.47ms p(95)=154.9ms + iterations.....................: 5400 170.373361/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.7 MB 55 kB/s + data_sent......................: 2.5 MB 78 kB/s + + + + +running (0m31.7s), 00/20 VUs, 5400 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/baseline-20vu-warmup.json b/benchmarks/raw/baseline-20vu-warmup.json new file mode 100644 index 0000000..468adda --- /dev/null +++ b/benchmarks/raw/baseline-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 4085, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "http_req_sending": { + "avg": 0.07783076358296616, + "min": 0, + "med": 0, + "max": 3.8752, + "p(90)": 0.5224, + "p(95)": 0.5519 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_connecting": { + "avg": 1.6569980420949602, + "min": 0, + "med": 1.3026499999999999, + "max": 41.7497, + "p(90)": 2.5205, + "p(95)": 3.6407749999999997 + }, + "iteration_duration": { + "med": 136.7348, + "max": 514.523, + "p(90)": 200.8897, + "p(95)": 239.8036599999999, + "avg": 146.99481172582642, + "min": 62.2706 + }, + "http_req_waiting": { + "avg": 93.92946463534018, + "min": 11.0191, + "med": 83.68135000000001, + "max": 1037.3222, + "p(90)": 146.45024999999998, + "p(95)": 183.771175 + }, + "http_req_duration": { + "avg": 94.2459563142438, + "min": 11.0191, + "med": 84.1138, + "max": 1043.7103, + "p(90)": 146.52485000000001, + "p(95)": 184.375525 + }, + "http_req_blocked": { + "max": 41.7497, + "p(90)": 2.72085, + "p(95)": 3.94555, + "avg": 1.7820618942731286, + "min": 0, + "med": 1.492 + }, + "data_received": { + "rate": 43468.214521306414, + "count": 1355106 + }, + "iterations": { + "count": 4085, + "rate": 131.03599004028962 + }, + "http_req_duration{expected_response:true}": { + "med": 84.1138, + "max": 1043.7103, + "p(90)": 146.52485000000001, + "p(95)": 184.375525, + "avg": 94.2459563142438, + "min": 11.0191 + }, + "http_req_receiving": { + "p(90)": 0.6194500000000001, + "p(95)": 0.7977, + "avg": 0.23866091532060704, + "min": 0, + "med": 0, + "max": 7.0674 + }, + "http_req_failed": { + "passes": 0, + "fails": 4086, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "data_sent": { + "count": 1858737, + "rate": 59623.364264263844 + }, + "checks": { + "passes": 4085, + "fails": 0, + "value": 1 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_reqs": { + "count": 4086, + "rate": 131.06806739403265 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + } + } +} diff --git a/benchmarks/raw/baseline-20vu-warmup.txt b/benchmarks/raw/baseline-20vu-warmup.txt new file mode 100644 index 0000000..341af09 --- /dev/null +++ b/benchmarks/raw/baseline-20vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 77 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m03.0s), 20/20 VUs, 166 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m04.0s), 20/20 VUs, 316 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m05.0s), 20/20 VUs, 473 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m06.0s), 20/20 VUs, 572 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m07.0s), 20/20 VUs, 688 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m08.0s), 20/20 VUs, 791 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m09.0s), 20/20 VUs, 913 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m10.0s), 20/20 VUs, 1011 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m11.0s), 20/20 VUs, 1151 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m12.0s), 20/20 VUs, 1266 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m13.0s), 20/20 VUs, 1360 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m14.0s), 20/20 VUs, 1470 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m15.0s), 20/20 VUs, 1585 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m16.0s), 20/20 VUs, 1696 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m17.0s), 20/20 VUs, 1845 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m18.0s), 20/20 VUs, 2004 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m19.0s), 20/20 VUs, 2166 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m20.0s), 20/20 VUs, 2327 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m21.0s), 20/20 VUs, 2457 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m22.0s), 20/20 VUs, 2620 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m23.0s), 20/20 VUs, 2796 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m24.0s), 20/20 VUs, 2969 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m25.0s), 20/20 VUs, 3124 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m26.0s), 20/20 VUs, 3261 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m27.0s), 20/20 VUs, 3417 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m28.0s), 20/20 VUs, 3591 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m29.0s), 20/20 VUs, 3745 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m30.0s), 20/20 VUs, 3866 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m31.0s), 20/20 VUs, 4048 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 4085 131.03599/s + checks_succeeded...: 100.00% 4085 out of 4085 + checks_failed......: 0.00% 0 out of 4085 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=94.24ms min=11.01ms med=84.11ms max=1.04s p(90)=146.52ms p(95)=184.37ms + { expected_response:true }...: avg=94.24ms min=11.01ms med=84.11ms max=1.04s p(90)=146.52ms p(95)=184.37ms + http_req_failed................: 0.00% 0 out of 4086 + http_reqs......................: 4086 131.068067/s + + EXECUTION + iteration_duration.............: avg=146.99ms min=62.27ms med=136.73ms max=514.52ms p(90)=200.88ms p(95)=239.8ms + iterations.....................: 4085 131.03599/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.4 MB 44 kB/s + data_sent......................: 1.9 MB 60 kB/s + + + + +running (0m31.2s), 00/20 VUs, 4085 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/baseline-50vu-run1.json b/benchmarks/raw/baseline-50vu-run1.json new file mode 100644 index 0000000..faa553b --- /dev/null +++ b/benchmarks/raw/baseline-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5441, + "fails": 0 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + }, + "metrics": { + "http_req_duration": { + "p(95)": 305.27509000000003, + "avg": 223.78581773245202, + "min": 50.5705, + "med": 205.68505, + "max": 1739.4935, + "p(90)": 271.31904 + }, + "http_req_blocked": { + "avg": 2.199530797500917, + "min": 0, + "med": 1.8271, + "max": 44.1004, + "p(90)": 3.21763, + "p(95)": 4.169465 + }, + "data_received": { + "count": 1740210, + "rate": 54906.18977060337 + }, + "vus": { + "min": 0, + "max": 50, + "value": 50 + }, + "http_req_failed": { + "passes": 0, + "fails": 5442, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 5441, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 5442, + "rate": 171.70311900955835 + }, + "http_req_receiving": { + "max": 13.2289, + "p(90)": 0.6092700000000001, + "p(95)": 0.9373799999999992, + "avg": 0.2347081587651594, + "min": 0, + "med": 0 + }, + "http_req_duration{expected_response:true}": { + "med": 205.68505, + "max": 1739.4935, + "p(90)": 271.31904, + "p(95)": 305.27509000000003, + "avg": 223.78581773245202, + "min": 50.5705 + }, + "iterations": { + "count": 5441, + "rate": 171.67156753601745 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 14.403, + "p(90)": 0.4581400000000009, + "p(95)": 0.5513, + "avg": 0.08500005512679165 + }, + "http_req_waiting": { + "med": 205.49475, + "max": 1739.1728, + "p(90)": 270.7196400000001, + "p(95)": 304.87528, + "avg": 223.46610951855965, + "min": 45.1612 + }, + "data_sent": { + "count": 2470773, + "rate": 77956.52893506129 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_connecting": { + "min": 0, + "med": 1.7296, + "max": 35.291, + "p(90)": 3.011800000000003, + "p(95)": 3.8953399999999982, + "avg": 2.0706167769202484 + }, + "iteration_duration": { + "avg": 276.8839458739192, + "min": 102.7656, + "med": 258.5569, + "max": 1796.0145, + "p(90)": 325.0857, + "p(95)": 361.3777 + } + } +} diff --git a/benchmarks/raw/baseline-50vu-run1.txt b/benchmarks/raw/baseline-50vu-run1.txt new file mode 100644 index 0000000..bb4e0aa --- /dev/null +++ b/benchmarks/raw/baseline-50vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 93 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.6s/30s + +running (0m03.0s), 50/50 VUs, 269 complete and 0 interrupted iterations +default [ 5% ] 50 VUs 01.6s/30s + +running (0m04.0s), 50/50 VUs, 446 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.6s/30s + +running (0m05.0s), 50/50 VUs, 638 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.6s/30s + +running (0m06.0s), 50/50 VUs, 805 complete and 0 interrupted iterations +default [ 15% ] 50 VUs 04.6s/30s + +running (0m07.0s), 50/50 VUs, 1004 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.6s/30s + +running (0m08.0s), 50/50 VUs, 1170 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.6s/30s + +running (0m09.0s), 50/50 VUs, 1342 complete and 0 interrupted iterations +default [ 25% ] 50 VUs 07.6s/30s + +running (0m10.0s), 50/50 VUs, 1511 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.6s/30s + +running (0m11.0s), 50/50 VUs, 1687 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.6s/30s + +running (0m12.0s), 50/50 VUs, 1886 complete and 0 interrupted iterations +default [ 35% ] 50 VUs 10.6s/30s + +running (0m13.0s), 50/50 VUs, 2033 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.6s/30s + +running (0m14.0s), 50/50 VUs, 2243 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.6s/30s + +running (0m15.0s), 50/50 VUs, 2426 complete and 0 interrupted iterations +default [ 45% ] 50 VUs 13.6s/30s + +running (0m16.0s), 50/50 VUs, 2626 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.6s/30s + +running (0m17.0s), 50/50 VUs, 2864 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.6s/30s + +running (0m18.0s), 50/50 VUs, 3092 complete and 0 interrupted iterations +default [ 55% ] 50 VUs 16.6s/30s + +running (0m19.0s), 50/50 VUs, 3323 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.6s/30s + +running (0m20.0s), 50/50 VUs, 3515 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.6s/30s + +running (0m21.0s), 50/50 VUs, 3687 complete and 0 interrupted iterations +default [ 65% ] 50 VUs 19.6s/30s + +running (0m22.0s), 50/50 VUs, 3885 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.6s/30s + +running (0m23.0s), 50/50 VUs, 4083 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.6s/30s + +running (0m24.0s), 50/50 VUs, 4303 complete and 0 interrupted iterations +default [ 75% ] 50 VUs 22.6s/30s + +running (0m25.0s), 50/50 VUs, 4530 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.6s/30s + +running (0m26.0s), 50/50 VUs, 4735 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.6s/30s + +running (0m27.0s), 50/50 VUs, 4910 complete and 0 interrupted iterations +default [ 85% ] 50 VUs 25.6s/30s + +running (0m28.0s), 50/50 VUs, 5068 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.6s/30s + +running (0m29.0s), 50/50 VUs, 5239 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.6s/30s + +running (0m30.0s), 50/50 VUs, 5375 complete and 0 interrupted iterations +default [ 95% ] 50 VUs 28.6s/30s + +running (0m31.0s), 50/50 VUs, 5389 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5441 171.671568/s + checks_succeeded...: 100.00% 5441 out of 5441 + checks_failed......: 0.00% 0 out of 5441 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=223.78ms min=50.57ms med=205.68ms max=1.73s p(90)=271.31ms p(95)=305.27ms + { expected_response:true }...: avg=223.78ms min=50.57ms med=205.68ms max=1.73s p(90)=271.31ms p(95)=305.27ms + http_req_failed................: 0.00% 0 out of 5442 + http_reqs......................: 5442 171.703119/s + + EXECUTION + iteration_duration.............: avg=276.88ms min=102.76ms med=258.55ms max=1.79s p(90)=325.08ms p(95)=361.37ms + iterations.....................: 5441 171.671568/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 1.7 MB 55 kB/s + data_sent......................: 2.5 MB 78 kB/s + + + + +running (0m31.7s), 00/50 VUs, 5441 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/baseline-50vu-run2.json b/benchmarks/raw/baseline-50vu-run2.json new file mode 100644 index 0000000..ab68b53 --- /dev/null +++ b/benchmarks/raw/baseline-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 3933, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "checks": { + "passes": 3933, + "fails": 0, + "value": 1 + }, + "http_req_duration": { + "min": 77.5316, + "med": 246.7215, + "max": 3725.2244, + "p(90)": 516.4448700000002, + "p(95)": 693.7413449999997, + "avg": 326.79915119471156 + }, + "http_req_receiving": { + "med": 0, + "max": 300.6362, + "p(90)": 0.6929800000000004, + "p(95)": 1.030795, + "avg": 0.3652841891204877, + "min": 0 + }, + "data_sent": { + "count": 1785259, + "rate": 52253.64954156636 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_reqs": { + "count": 3934, + "rate": 115.1462377708344 + }, + "http_req_duration{expected_response:true}": { + "min": 77.5316, + "med": 246.7215, + "max": 3725.2244, + "p(90)": 516.4448700000002, + "p(95)": 693.7413449999997, + "avg": 326.79915119471156 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_blocked": { + "min": 0, + "med": 1.57485, + "max": 202.5961, + "p(90)": 3.820590000000001, + "p(95)": 6.521229999999998, + "avg": 2.4576946110828777 + }, + "http_req_waiting": { + "avg": 326.3036157854591, + "min": 58.9564, + "med": 246.3361, + "max": 3703.5622, + "p(90)": 516.3155800000002, + "p(95)": 691.13326 + }, + "http_req_failed": { + "passes": 0, + "fails": 3934, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "data_received": { + "count": 1311938, + "rate": 38399.777551752144 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "p(90)": 575.95076, + "p(95)": 748.6696399999997, + "avg": 380.8408605390293, + "min": 164.5797, + "med": 301.3321, + "max": 2564.1945 + }, + "http_req_sending": { + "med": 0, + "max": 43.0574, + "p(90)": 0.5122, + "p(95)": 0.5868649999999999, + "avg": 0.13025122013218096, + "min": 0 + }, + "http_req_connecting": { + "avg": 2.241128063040166, + "min": 0, + "med": 1.463, + "max": 65.4938, + "p(90)": 3.5485200000000003, + "p(95)": 5.893975 + }, + "iterations": { + "count": 3933, + "rate": 115.1169682645378 + } + } +} diff --git a/benchmarks/raw/baseline-50vu-run2.txt b/benchmarks/raw/baseline-50vu-run2.txt new file mode 100644 index 0000000..7d2da72 --- /dev/null +++ b/benchmarks/raw/baseline-50vu-run2.txt @@ -0,0 +1,154 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +running (0m04.9s), 50/50 VUs, 81 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.9s/30s + +running (0m05.9s), 50/50 VUs, 182 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.9s/30s + +running (0m06.9s), 50/50 VUs, 272 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 02.9s/30s + +running (0m07.9s), 50/50 VUs, 369 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.9s/30s + +running (0m08.9s), 50/50 VUs, 518 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.9s/30s + +running (0m09.9s), 50/50 VUs, 614 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m10.9s), 50/50 VUs, 708 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.9s/30s + +running (0m11.9s), 50/50 VUs, 775 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m12.9s), 50/50 VUs, 880 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m13.9s), 50/50 VUs, 939 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.9s/30s + +running (0m14.9s), 50/50 VUs, 1032 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.9s/30s + +running (0m15.9s), 50/50 VUs, 1052 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 11.9s/30s + +running (0m16.9s), 50/50 VUs, 1081 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.9s/30s + +running (0m17.9s), 50/50 VUs, 1101 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.9s/30s + +running (0m18.9s), 50/50 VUs, 1273 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 14.9s/30s + +running (0m19.9s), 50/50 VUs, 1437 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.9s/30s + +running (0m20.9s), 50/50 VUs, 1614 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m21.9s), 50/50 VUs, 1734 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 17.9s/30s + +running (0m22.9s), 50/50 VUs, 1887 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.9s/30s + +running (0m23.9s), 50/50 VUs, 2068 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m24.9s), 50/50 VUs, 2265 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 20.9s/30s + +running (0m25.9s), 50/50 VUs, 2436 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.9s/30s + +running (0m26.9s), 50/50 VUs, 2607 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.9s/30s + +running (0m27.9s), 50/50 VUs, 2770 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 23.9s/30s + +running (0m28.9s), 50/50 VUs, 2923 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.9s/30s + +running (0m29.9s), 50/50 VUs, 3097 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m30.9s), 50/50 VUs, 3294 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m31.9s), 50/50 VUs, 3450 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m32.9s), 50/50 VUs, 3653 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.9s/30s + +running (0m33.9s), 50/50 VUs, 3863 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 3933 115.116968/s + checks_succeeded...: 100.00% 3933 out of 3933 + checks_failed......: 0.00% 0 out of 3933 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=326.79ms min=77.53ms med=246.72ms max=3.72s p(90)=516.44ms p(95)=693.74ms + { expected_response:true }...: avg=326.79ms min=77.53ms med=246.72ms max=3.72s p(90)=516.44ms p(95)=693.74ms + http_req_failed................: 0.00% 0 out of 3934 + http_reqs......................: 3934 115.146238/s + + EXECUTION + iteration_duration.............: avg=380.84ms min=164.57ms med=301.33ms max=2.56s p(90)=575.95ms p(95)=748.66ms + iterations.....................: 3933 115.116968/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 1.3 MB 38 kB/s + data_sent......................: 1.8 MB 52 kB/s + + + + +running (0m34.2s), 00/50 VUs, 3933 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/baseline-50vu-run3.json b/benchmarks/raw/baseline-50vu-run3.json new file mode 100644 index 0000000..805fdc8 --- /dev/null +++ b/benchmarks/raw/baseline-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5713, + "fails": 0 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + }, + "metrics": { + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 9.7993, + "p(90)": 0.4616999999999992, + "p(95)": 0.5460399999999999, + "avg": 0.07031989849492477 + }, + "http_req_failed": { + "passes": 0, + "fails": 5714, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "min": 0, + "med": 1.6028, + "max": 25.2426, + "p(90)": 2.4440299999999997, + "p(95)": 2.8950499999999986, + "avg": 1.6755707035351817 + }, + "http_req_waiting": { + "med": 204.5622, + "max": 1543.131, + "p(90)": 260.42879, + "p(95)": 277.41926499999994, + "avg": 213.57741477073878, + "min": 26.4852 + }, + "checks": { + "passes": 5713, + "fails": 0, + "value": 1 + }, + "vus": { + "value": 35, + "min": 0, + "max": 50 + }, + "http_req_duration": { + "max": 1547.9547, + "p(90)": 260.7861, + "p(95)": 277.74109, + "avg": 213.83790355267737, + "min": 28.9719, + "med": 204.91175 + }, + "data_sent": { + "count": 2594805, + "rate": 80214.677904993 + }, + "iteration_duration": { + "avg": 266.2056928934012, + "min": 89.0648, + "med": 257.2229, + "max": 893.8671, + "p(90)": 313.54912, + "p(95)": 331.03622 + }, + "data_received": { + "count": 1817458, + "rate": 56184.10943244398 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "iterations": { + "count": 5713, + "rate": 176.6092075786909 + }, + "http_reqs": { + "count": 5714, + "rate": 176.64012114556974 + }, + "http_req_blocked": { + "p(95)": 3.118394999999994, + "avg": 1.777506667833391, + "min": 0, + "med": 1.6273, + "max": 34.6329, + "p(90)": 2.609759999999999 + }, + "http_req_duration{expected_response:true}": { + "max": 1547.9547, + "p(90)": 260.7861, + "p(95)": 277.74109, + "avg": 213.83790355267737, + "min": 28.9719, + "med": 204.91175 + }, + "http_req_receiving": { + "max": 6.3357, + "p(90)": 0.56947, + "p(95)": 0.7178799999999996, + "avg": 0.19016888344417202, + "min": 0, + "med": 0 + } + } +} diff --git a/benchmarks/raw/baseline-50vu-run3.txt b/benchmarks/raw/baseline-50vu-run3.txt new file mode 100644 index 0000000..7352627 --- /dev/null +++ b/benchmarks/raw/baseline-50vu-run3.txt @@ -0,0 +1,151 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 61 complete and 0 interrupted iterations +default [ 1% ] 50 VUs 00.4s/30s + +running (0m03.0s), 50/50 VUs, 213 complete and 0 interrupted iterations +default [ 5% ] 50 VUs 01.4s/30s + +running (0m04.0s), 50/50 VUs, 397 complete and 0 interrupted iterations +default [ 8% ] 50 VUs 02.4s/30s + +running (0m05.0s), 50/50 VUs, 556 complete and 0 interrupted iterations +default [ 11% ] 50 VUs 03.4s/30s + +running (0m06.0s), 50/50 VUs, 756 complete and 0 interrupted iterations +default [ 15% ] 50 VUs 04.4s/30s + +running (0m07.0s), 50/50 VUs, 949 complete and 0 interrupted iterations +default [ 18% ] 50 VUs 05.4s/30s + +running (0m08.0s), 50/50 VUs, 1133 complete and 0 interrupted iterations +default [ 21% ] 50 VUs 06.4s/30s + +running (0m09.0s), 50/50 VUs, 1319 complete and 0 interrupted iterations +default [ 25% ] 50 VUs 07.4s/30s + +running (0m10.0s), 50/50 VUs, 1485 complete and 0 interrupted iterations +default [ 28% ] 50 VUs 08.4s/30s + +running (0m11.0s), 50/50 VUs, 1677 complete and 0 interrupted iterations +default [ 31% ] 50 VUs 09.4s/30s + +running (0m12.0s), 50/50 VUs, 1879 complete and 0 interrupted iterations +default [ 35% ] 50 VUs 10.4s/30s + +running (0m13.0s), 50/50 VUs, 2082 complete and 0 interrupted iterations +default [ 38% ] 50 VUs 11.4s/30s + +running (0m14.0s), 50/50 VUs, 2282 complete and 0 interrupted iterations +default [ 41% ] 50 VUs 12.4s/30s + +running (0m15.0s), 50/50 VUs, 2457 complete and 0 interrupted iterations +default [ 45% ] 50 VUs 13.4s/30s + +running (0m16.0s), 50/50 VUs, 2645 complete and 0 interrupted iterations +default [ 48% ] 50 VUs 14.4s/30s + +running (0m17.0s), 50/50 VUs, 2838 complete and 0 interrupted iterations +default [ 51% ] 50 VUs 15.4s/30s + +running (0m18.0s), 50/50 VUs, 3040 complete and 0 interrupted iterations +default [ 55% ] 50 VUs 16.4s/30s + +running (0m19.0s), 50/50 VUs, 3260 complete and 0 interrupted iterations +default [ 58% ] 50 VUs 17.4s/30s + +running (0m20.0s), 50/50 VUs, 3466 complete and 0 interrupted iterations +default [ 61% ] 50 VUs 18.4s/30s + +running (0m21.0s), 50/50 VUs, 3678 complete and 0 interrupted iterations +default [ 65% ] 50 VUs 19.4s/30s + +running (0m22.0s), 50/50 VUs, 3876 complete and 0 interrupted iterations +default [ 68% ] 50 VUs 20.4s/30s + +running (0m23.0s), 50/50 VUs, 4071 complete and 0 interrupted iterations +default [ 71% ] 50 VUs 21.4s/30s + +running (0m24.0s), 50/50 VUs, 4256 complete and 0 interrupted iterations +default [ 75% ] 50 VUs 22.4s/30s + +running (0m25.0s), 50/50 VUs, 4482 complete and 0 interrupted iterations +default [ 78% ] 50 VUs 23.4s/30s + +running (0m26.0s), 50/50 VUs, 4679 complete and 0 interrupted iterations +default [ 81% ] 50 VUs 24.4s/30s + +running (0m27.0s), 50/50 VUs, 4870 complete and 0 interrupted iterations +default [ 85% ] 50 VUs 25.4s/30s + +running (0m28.0s), 50/50 VUs, 5057 complete and 0 interrupted iterations +default [ 88% ] 50 VUs 26.4s/30s + +running (0m29.0s), 50/50 VUs, 5246 complete and 0 interrupted iterations +default [ 91% ] 50 VUs 27.4s/30s + +running (0m30.0s), 50/50 VUs, 5426 complete and 0 interrupted iterations +default [ 95% ] 50 VUs 28.4s/30s + +running (0m31.0s), 50/50 VUs, 5606 complete and 0 interrupted iterations +default [ 98% ] 50 VUs 29.4s/30s + +running (0m32.0s), 35/50 VUs, 5678 complete and 0 interrupted iterations +default โ†“ [ 100% ] 50 VUs 30s + +running (0m32.3s), 00/50 VUs, 5713 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5713 176.609208/s + checks_succeeded...: 100.00% 5713 out of 5713 + checks_failed......: 0.00% 0 out of 5713 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=213.83ms min=28.97ms med=204.91ms max=1.54s p(90)=260.78ms p(95)=277.74ms + { expected_response:true }...: avg=213.83ms min=28.97ms med=204.91ms max=1.54s p(90)=260.78ms p(95)=277.74ms + http_req_failed................: 0.00% 0 out of 5714 + http_reqs......................: 5714 176.640121/s + + EXECUTION + iteration_duration.............: avg=266.2ms min=89.06ms med=257.22ms max=893.86ms p(90)=313.54ms p(95)=331.03ms + iterations.....................: 5713 176.609208/s + vus............................: 35 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 1.8 MB 56 kB/s + data_sent......................: 2.6 MB 80 kB/s + + + + +running (0m32.3s), 00/50 VUs, 5713 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/baseline-50vu-warmup.json b/benchmarks/raw/baseline-50vu-warmup.json new file mode 100644 index 0000000..03dd91d --- /dev/null +++ b/benchmarks/raw/baseline-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_reqs": { + "count": 5610, + "rate": 177.9736634382498 + }, + "http_req_waiting": { + "avg": 215.0013707843142, + "min": 103.3144, + "med": 179.15744999999998, + "max": 1871.0951, + "p(90)": 273.6184900000001, + "p(95)": 333.996555 + }, + "iteration_duration": { + "min": 155.1009, + "med": 231.4609, + "max": 1922.704, + "p(90)": 327.39108, + "p(95)": 389.3427399999998, + "avg": 267.5776928507758 + }, + "iterations": { + "count": 5609, + "rate": 177.9419390775656 + }, + "http_req_duration": { + "avg": 215.25895989304848, + "min": 103.3144, + "med": 179.23335, + "max": 1871.6057, + "p(90)": 274.0674600000001, + "p(95)": 334.4747250000002 + }, + "data_sent": { + "count": 2547381, + "rate": 80814.03364402712 + }, + "http_req_duration{expected_response:true}": { + "avg": 215.25895989304848, + "min": 103.3144, + "med": 179.23335, + "max": 1871.6057, + "p(90)": 274.0674600000001, + "p(95)": 334.4747250000002 + }, + "data_received": { + "count": 1787922, + "rate": 56720.68240318047 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_sending": { + "avg": 0.07627139037433157, + "min": 0, + "med": 0, + "max": 22.2817, + "p(90)": 0.3157200000000022, + "p(95)": 0.54371 + }, + "http_req_receiving": { + "p(95)": 0.6755, + "avg": 0.1813177183600712, + "min": 0, + "med": 0, + "max": 54.6775, + "p(90)": 0.5544100000000001 + }, + "http_req_failed": { + "fails": 5610, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "p(95)": 2.87516, + "avg": 1.659458948306593, + "min": 0, + "med": 1.51065, + "max": 62.5002, + "p(90)": 2.2945200000000003 + }, + "http_req_connecting": { + "p(95)": 2.6696800000000005, + "avg": 1.5429171301247724, + "min": 0, + "med": 1.3633, + "max": 42.7824, + "p(90)": 2.1576000000000004 + }, + "checks": { + "passes": 5609, + "fails": 0, + "value": 1 + } + }, + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5609, + "fails": 0 + } + }, + "name": "", + "path": "" + } +} diff --git a/benchmarks/raw/baseline-50vu-warmup.txt b/benchmarks/raw/baseline-50vu-warmup.txt new file mode 100644 index 0000000..4ef0f3d --- /dev/null +++ b/benchmarks/raw/baseline-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m01.9s), 50/50 VUs, 20 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.6s/30s + +running (0m02.9s), 50/50 VUs, 50 complete and 0 interrupted iterations +default [ 5% ] 50 VUs 01.6s/30s + +running (0m03.9s), 50/50 VUs, 95 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.6s/30s + +running (0m04.9s), 50/50 VUs, 311 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.6s/30s + +running (0m05.9s), 50/50 VUs, 529 complete and 0 interrupted iterations +default [ 15% ] 50 VUs 04.6s/30s + +running (0m06.9s), 50/50 VUs, 706 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.6s/30s + +running (0m07.9s), 50/50 VUs, 879 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.6s/30s + +running (0m08.9s), 50/50 VUs, 1109 complete and 0 interrupted iterations +default [ 25% ] 50 VUs 07.6s/30s + +running (0m09.9s), 50/50 VUs, 1326 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.6s/30s + +running (0m10.9s), 50/50 VUs, 1554 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.6s/30s + +running (0m11.9s), 50/50 VUs, 1788 complete and 0 interrupted iterations +default [ 35% ] 50 VUs 10.6s/30s + +running (0m12.9s), 50/50 VUs, 1963 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.6s/30s + +running (0m13.9s), 50/50 VUs, 2118 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.6s/30s + +running (0m14.9s), 50/50 VUs, 2359 complete and 0 interrupted iterations +default [ 45% ] 50 VUs 13.6s/30s + +running (0m15.9s), 50/50 VUs, 2598 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.6s/30s + +running (0m16.9s), 50/50 VUs, 2830 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.6s/30s + +running (0m17.9s), 50/50 VUs, 3052 complete and 0 interrupted iterations +default [ 55% ] 50 VUs 16.6s/30s + +running (0m18.9s), 50/50 VUs, 3290 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.6s/30s + +running (0m19.9s), 50/50 VUs, 3519 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.6s/30s + +running (0m20.9s), 50/50 VUs, 3707 complete and 0 interrupted iterations +default [ 65% ] 50 VUs 19.6s/30s + +running (0m21.9s), 50/50 VUs, 3878 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.6s/30s + +running (0m22.9s), 50/50 VUs, 4090 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.6s/30s + +running (0m23.9s), 50/50 VUs, 4270 complete and 0 interrupted iterations +default [ 75% ] 50 VUs 22.6s/30s + +running (0m24.9s), 50/50 VUs, 4485 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.6s/30s + +running (0m25.9s), 50/50 VUs, 4658 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.6s/30s + +running (0m26.9s), 50/50 VUs, 4722 complete and 0 interrupted iterations +default [ 85% ] 50 VUs 25.6s/30s + +running (0m27.9s), 50/50 VUs, 4928 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.6s/30s + +running (0m28.9s), 50/50 VUs, 5071 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.6s/30s + +running (0m29.9s), 50/50 VUs, 5259 complete and 0 interrupted iterations +default [ 95% ] 50 VUs 28.6s/30s + +running (0m30.9s), 50/50 VUs, 5474 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5609 177.941939/s + checks_succeeded...: 100.00% 5609 out of 5609 + checks_failed......: 0.00% 0 out of 5609 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=215.25ms min=103.31ms med=179.23ms max=1.87s p(90)=274.06ms p(95)=334.47ms + { expected_response:true }...: avg=215.25ms min=103.31ms med=179.23ms max=1.87s p(90)=274.06ms p(95)=334.47ms + http_req_failed................: 0.00% 0 out of 5610 + http_reqs......................: 5610 177.973663/s + + EXECUTION + iteration_duration.............: avg=267.57ms min=155.1ms med=231.46ms max=1.92s p(90)=327.39ms p(95)=389.34ms + iterations.....................: 5609 177.941939/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 1.8 MB 57 kB/s + data_sent......................: 2.5 MB 81 kB/s + + + + +running (0m31.5s), 00/50 VUs, 5609 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-100vu-run1.json b/benchmarks/raw/baseline_consumer-100vu-run1.json new file mode 100644 index 0000000..190ac42 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "data_sent": { + "count": 3720161, + "rate": 117768.39934472952 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 4.3601, + "p(90)": 0.541, + "p(95)": 0.55392, + "avg": 0.10160358667805297 + }, + "iterations": { + "count": 8196, + "rate": 259.45914734050575 + }, + "http_req_blocked": { + "avg": 0.06826027815054289, + "min": 0, + "med": 0, + "max": 42.2976, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 8197, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.04078243259729169, + "min": 0, + "med": 0, + "max": 29.205 + }, + "http_req_waiting": { + "avg": 315.26471173600066, + "min": 66.3319, + "med": 272.5488, + "max": 4462.4728, + "p(90)": 482.62252000000024, + "p(95)": 567.4329799999997 + }, + "http_req_duration{expected_response:true}": { + "min": 66.3319, + "med": 272.6607, + "max": 4462.4728, + "p(90)": 482.91646000000003, + "p(95)": 568.1372199999998, + "avg": 315.40709775527665 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "checks": { + "fails": 0, + "passes": 8196, + "value": 1 + }, + "http_reqs": { + "rate": 259.49080414227984, + "count": 8197 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_duration": { + "p(95)": 568.1372199999998, + "avg": 315.40709775527665, + "min": 66.3319, + "med": 272.6607, + "max": 4462.4728, + "p(90)": 482.91646000000003 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "iteration_duration": { + "min": 117.3938, + "med": 323.26189999999997, + "max": 4514.8013, + "p(90)": 533.38585, + "p(95)": 619.4836, + "avg": 366.17517637872163 + }, + "data_received": { + "count": 2752118, + "rate": 87123.25398492654 + }, + "http_req_connecting": { + "avg": 0.042670977186775684, + "min": 0, + "med": 0, + "max": 32.6723, + "p(90)": 0, + "p(95)": 0 + } + }, + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8196, + "fails": 0 + } + }, + "name": "" + } +} diff --git a/benchmarks/raw/baseline_consumer-100vu-run1.txt b/benchmarks/raw/baseline_consumer-100vu-run1.txt new file mode 100644 index 0000000..bc32b70 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-100vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 61 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.6s/30s + +running (0m03.0s), 100/100 VUs, 201 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.6s/30s + +running (0m04.0s), 100/100 VUs, 487 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.6s/30s + +running (0m05.0s), 100/100 VUs, 717 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.6s/30s + +running (0m06.0s), 100/100 VUs, 998 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.6s/30s + +running (0m07.0s), 100/100 VUs, 1212 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.6s/30s + +running (0m08.0s), 100/100 VUs, 1420 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.6s/30s + +running (0m09.0s), 100/100 VUs, 1672 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.6s/30s + +running (0m10.0s), 100/100 VUs, 1974 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.6s/30s + +running (0m11.0s), 100/100 VUs, 2254 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.6s/30s + +running (0m12.0s), 100/100 VUs, 2471 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.6s/30s + +running (0m13.0s), 100/100 VUs, 2800 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.6s/30s + +running (0m14.0s), 100/100 VUs, 3146 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.6s/30s + +running (0m15.0s), 100/100 VUs, 3431 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.6s/30s + +running (0m16.0s), 100/100 VUs, 3798 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.6s/30s + +running (0m17.0s), 100/100 VUs, 4096 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.6s/30s + +running (0m18.0s), 100/100 VUs, 4392 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.6s/30s + +running (0m19.0s), 100/100 VUs, 4678 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.6s/30s + +running (0m20.0s), 100/100 VUs, 4916 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.6s/30s + +running (0m21.0s), 100/100 VUs, 5310 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.6s/30s + +running (0m22.0s), 100/100 VUs, 5656 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.6s/30s + +running (0m23.0s), 100/100 VUs, 5919 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.6s/30s + +running (0m24.0s), 100/100 VUs, 6184 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.6s/30s + +running (0m25.0s), 100/100 VUs, 6439 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.6s/30s + +running (0m26.0s), 100/100 VUs, 6761 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.6s/30s + +running (0m27.0s), 100/100 VUs, 6899 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.6s/30s + +running (0m28.0s), 100/100 VUs, 7083 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.6s/30s + +running (0m29.0s), 100/100 VUs, 7325 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.6s/30s + +running (0m30.0s), 100/100 VUs, 7567 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.6s/30s + +running (0m31.0s), 100/100 VUs, 7899 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8196 259.459147/s + checks_succeeded...: 100.00% 8196 out of 8196 + checks_failed......: 0.00% 0 out of 8196 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=315.4ms min=66.33ms med=272.66ms max=4.46s p(90)=482.91ms p(95)=568.13ms + { expected_response:true }...: avg=315.4ms min=66.33ms med=272.66ms max=4.46s p(90)=482.91ms p(95)=568.13ms + http_req_failed................: 0.00% 0 out of 8197 + http_reqs......................: 8197 259.490804/s + + EXECUTION + iteration_duration.............: avg=366.17ms min=117.39ms med=323.26ms max=4.51s p(90)=533.38ms p(95)=619.48ms + iterations.....................: 8196 259.459147/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.8 MB 87 kB/s + data_sent......................: 3.7 MB 118 kB/s + + + + +running (0m31.6s), 000/100 VUs, 8196 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-100vu-run2.json b/benchmarks/raw/baseline_consumer-100vu-run2.json new file mode 100644 index 0000000..48141e1 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8802 + } + } + }, + "metrics": { + "http_req_duration": { + "min": 35.7245, + "med": 251.3532, + "max": 7981.8819, + "p(90)": 417.36606, + "p(95)": 457.89995, + "avg": 290.54895910485277 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.06147035101669884, + "min": 0, + "med": 0, + "max": 35.0898, + "p(90)": 0 + }, + "checks": { + "fails": 0, + "passes": 8802, + "value": 1 + }, + "data_received": { + "rate": 94381.8768928826, + "count": 2941190 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_reqs": { + "count": 8803, + "rate": 282.48554574442505 + }, + "http_req_connecting": { + "avg": 0.03144199704646143, + "min": 0, + "med": 0, + "max": 24.4165, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "p(90)": 0.5386, + "p(95)": 0.5517, + "avg": 0.0906295581051915, + "min": 0, + "med": 0, + "max": 5.3936 + }, + "http_req_failed": { + "passes": 0, + "fails": 8803, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 417.36606, + "p(95)": 457.89995, + "avg": 290.54895910485277, + "min": 35.7245, + "med": 251.3532, + "max": 7981.8819 + }, + "http_req_sending": { + "avg": 0.030092173122799055, + "min": 0, + "med": 0, + "max": 24.6015, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "data_sent": { + "count": 3995525, + "rate": 128215.16075888832 + }, + "http_req_waiting": { + "avg": 290.42823737362465, + "min": 35.7245, + "med": 251.2645, + "max": 7981.8819, + "p(90)": 417.1774800000001, + "p(95)": 457.8223499999999 + }, + "iterations": { + "count": 8802, + "rate": 282.45345605389406 + }, + "iteration_duration": { + "p(95)": 508.48964999999987, + "avg": 341.16290966825824, + "min": 85.7937, + "med": 302.00015, + "max": 8036.577, + "p(90)": 467.88846 + } + } +} diff --git a/benchmarks/raw/baseline_consumer-100vu-run2.txt b/benchmarks/raw/baseline_consumer-100vu-run2.txt new file mode 100644 index 0000000..f273051 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-100vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 167 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 01.0s/30s + +running (0m03.0s), 100/100 VUs, 414 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.0s/30s + +running (0m04.0s), 100/100 VUs, 704 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 03.0s/30s + +running (0m05.0s), 100/100 VUs, 944 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 04.0s/30s + +running (0m06.0s), 100/100 VUs, 1181 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.0s/30s + +running (0m07.0s), 100/100 VUs, 1405 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 06.0s/30s + +running (0m08.0s), 100/100 VUs, 1716 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 07.0s/30s + +running (0m09.0s), 100/100 VUs, 1940 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.0s/30s + +running (0m10.0s), 100/100 VUs, 2288 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 09.0s/30s + +running (0m11.0s), 100/100 VUs, 2614 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 10.0s/30s + +running (0m12.0s), 100/100 VUs, 2945 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.0s/30s + +running (0m13.0s), 100/100 VUs, 3154 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 12.0s/30s + +running (0m14.0s), 100/100 VUs, 3450 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 13.0s/30s + +running (0m15.0s), 100/100 VUs, 3796 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.0s/30s + +running (0m16.0s), 100/100 VUs, 4126 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 15.0s/30s + +running (0m17.0s), 100/100 VUs, 4421 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 16.0s/30s + +running (0m18.0s), 100/100 VUs, 4708 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.0s/30s + +running (0m19.0s), 100/100 VUs, 4982 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 18.0s/30s + +running (0m20.0s), 100/100 VUs, 5281 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 19.0s/30s + +running (0m21.0s), 100/100 VUs, 5536 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.0s/30s + +running (0m22.0s), 100/100 VUs, 5830 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 21.0s/30s + +running (0m23.0s), 100/100 VUs, 6115 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 22.0s/30s + +running (0m24.0s), 100/100 VUs, 6494 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.0s/30s + +running (0m25.0s), 100/100 VUs, 6743 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 24.0s/30s + +running (0m26.0s), 100/100 VUs, 7071 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 25.0s/30s + +running (0m27.0s), 100/100 VUs, 7437 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.0s/30s + +running (0m28.0s), 100/100 VUs, 7820 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 27.0s/30s + +running (0m29.0s), 100/100 VUs, 8153 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 28.0s/30s + +running (0m30.0s), 100/100 VUs, 8409 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.0s/30s + +running (0m31.0s), 100/100 VUs, 8702 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8802 282.453456/s + checks_succeeded...: 100.00% 8802 out of 8802 + checks_failed......: 0.00% 0 out of 8802 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=290.54ms min=35.72ms med=251.35ms max=7.98s p(90)=417.36ms p(95)=457.89ms + { expected_response:true }...: avg=290.54ms min=35.72ms med=251.35ms max=7.98s p(90)=417.36ms p(95)=457.89ms + http_req_failed................: 0.00% 0 out of 8803 + http_reqs......................: 8803 282.485546/s + + EXECUTION + iteration_duration.............: avg=341.16ms min=85.79ms med=302ms max=8.03s p(90)=467.88ms p(95)=508.48ms + iterations.....................: 8802 282.453456/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.9 MB 94 kB/s + data_sent......................: 4.0 MB 128 kB/s + + + + +running (0m31.2s), 000/100 VUs, 8802 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-100vu-run3.json b/benchmarks/raw/baseline_consumer-100vu-run3.json new file mode 100644 index 0000000..d04d7dc --- /dev/null +++ b/benchmarks/raw/baseline_consumer-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "avg": 0.0808974395161291, + "min": 0, + "med": 0, + "max": 3.7745, + "p(90)": 0.5321100000000001, + "p(95)": 0.5476 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 11.9283, + "p(90)": 0, + "p(95)": 0, + "avg": 0.020297913306451622 + }, + "http_reqs": { + "count": 9920, + "rate": 314.8477241838466 + }, + "http_req_duration": { + "avg": 252.93342505040286, + "min": 26.9841, + "med": 211.3964, + "max": 1711.3285, + "p(90)": 403.96233, + "p(95)": 463.92300499999993 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "avg": 303.3915079241859, + "min": 78.4393, + "med": 261.8139, + "max": 1764.2392, + "p(90)": 454.04076000000015, + "p(95)": 514.2589399999999 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.01934993951612903, + "min": 0, + "med": 0, + "max": 37.5462 + }, + "checks": { + "passes": 9919, + "fails": 0, + "value": 1 + }, + "http_req_duration{expected_response:true}": { + "avg": 252.93342505040286, + "min": 26.9841, + "med": 211.3964, + "max": 1711.3285, + "p(90)": 403.96233, + "p(95)": 463.92300499999993 + }, + "http_req_blocked": { + "avg": 0.04226368951612904, + "min": 0, + "med": 0, + "max": 42.6127, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 9919, + "rate": 314.8159855019732 + }, + "http_req_waiting": { + "p(90)": 403.44685000000004, + "p(95)": 463.68138, + "avg": 252.8331776713715, + "min": 26.9841, + "med": 211.35770000000002, + "max": 1709.664 + }, + "data_sent": { + "count": 4502587, + "rate": 142906.17640017875 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "data_received": { + "count": 3289694, + "rate": 104410.55132673943 + }, + "http_req_failed": { + "passes": 0, + "fails": 9920, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + } + }, + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 9919, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + }, + "name": "", + "path": "" + } +} diff --git a/benchmarks/raw/baseline_consumer-100vu-run3.txt b/benchmarks/raw/baseline_consumer-100vu-run3.txt new file mode 100644 index 0000000..83d2be6 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-100vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 122 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.7s/30s + +running (0m03.0s), 100/100 VUs, 317 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.7s/30s + +running (0m04.0s), 100/100 VUs, 629 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.7s/30s + +running (0m05.0s), 100/100 VUs, 887 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.7s/30s + +running (0m06.0s), 100/100 VUs, 1215 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.7s/30s + +running (0m07.0s), 100/100 VUs, 1470 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.7s/30s + +running (0m08.0s), 100/100 VUs, 1747 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.7s/30s + +running (0m09.0s), 100/100 VUs, 2082 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.7s/30s + +running (0m10.0s), 100/100 VUs, 2437 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.7s/30s + +running (0m11.0s), 100/100 VUs, 2759 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.7s/30s + +running (0m12.0s), 100/100 VUs, 3135 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.7s/30s + +running (0m13.0s), 100/100 VUs, 3455 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.7s/30s + +running (0m14.0s), 100/100 VUs, 3834 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.7s/30s + +running (0m15.0s), 100/100 VUs, 4171 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.7s/30s + +running (0m16.0s), 100/100 VUs, 4474 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.7s/30s + +running (0m17.0s), 100/100 VUs, 4897 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.7s/30s + +running (0m18.0s), 100/100 VUs, 5277 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.7s/30s + +running (0m19.0s), 100/100 VUs, 5645 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.7s/30s + +running (0m20.0s), 100/100 VUs, 6037 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.7s/30s + +running (0m21.0s), 100/100 VUs, 6378 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.7s/30s + +running (0m22.0s), 100/100 VUs, 6706 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.7s/30s + +running (0m23.0s), 100/100 VUs, 6983 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.7s/30s + +running (0m24.0s), 100/100 VUs, 7285 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.7s/30s + +running (0m25.0s), 100/100 VUs, 7625 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.7s/30s + +running (0m26.0s), 100/100 VUs, 8014 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.7s/30s + +running (0m27.0s), 100/100 VUs, 8407 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.7s/30s + +running (0m28.0s), 100/100 VUs, 8712 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.7s/30s + +running (0m29.0s), 100/100 VUs, 9113 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.7s/30s + +running (0m30.0s), 100/100 VUs, 9451 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.7s/30s + +running (0m31.0s), 100/100 VUs, 9728 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9919 314.815986/s + checks_succeeded...: 100.00% 9919 out of 9919 + checks_failed......: 0.00% 0 out of 9919 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=252.93ms min=26.98ms med=211.39ms max=1.71s p(90)=403.96ms p(95)=463.92ms + { expected_response:true }...: avg=252.93ms min=26.98ms med=211.39ms max=1.71s p(90)=403.96ms p(95)=463.92ms + http_req_failed................: 0.00% 0 out of 9920 + http_reqs......................: 9920 314.847724/s + + EXECUTION + iteration_duration.............: avg=303.39ms min=78.43ms med=261.81ms max=1.76s p(90)=454.04ms p(95)=514.25ms + iterations.....................: 9919 314.815986/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.3 MB 104 kB/s + data_sent......................: 4.5 MB 143 kB/s + + + + +running (0m31.5s), 000/100 VUs, 9919 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-100vu-warmup.json b/benchmarks/raw/baseline_consumer-100vu-warmup.json new file mode 100644 index 0000000..10f7986 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10293, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + }, + "metrics": { + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "data_sent": { + "count": 4673721, + "rate": 148853.81880181248 + }, + "iterations": { + "rate": 327.8228111877145, + "count": 10293 + }, + "http_req_duration{expected_response:true}": { + "min": 44.9083, + "med": 210.70409999999998, + "max": 6252.8163, + "p(90)": 350.00473999999997, + "p(95)": 405.312515, + "avg": 241.48332278997637 + }, + "iteration_duration": { + "med": 261.1278, + "max": 6304.3044, + "p(90)": 400.44462000000004, + "p(95)": 456.03649999999993, + "avg": 291.99816023511175, + "min": 95.5835 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_failed": { + "passes": 0, + "fails": 10294, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 10294, + "rate": 327.85466029013236 + }, + "data_received": { + "count": 3406382, + "rate": 108490.20919258031 + }, + "http_req_receiving": { + "avg": 0.07929542451913746, + "min": 0, + "med": 0, + "max": 2.1416, + "p(90)": 0.53317, + "p(95)": 0.5478350000000001 + }, + "http_req_waiting": { + "avg": 241.37590238974238, + "min": 44.9083, + "med": 210.4039, + "max": 6252.8163, + "p(90)": 349.97454, + "p(95)": 405.16618 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "checks": { + "passes": 10293, + "fails": 0, + "value": 1 + }, + "http_req_sending": { + "avg": 0.028124975714008172, + "min": 0, + "med": 0, + "max": 47.4186, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "avg": 241.48332278997637, + "min": 44.9083, + "med": 210.70409999999998, + "max": 6252.8163, + "p(90)": 350.00473999999997, + "p(95)": 405.312515 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 60.1837, + "p(90)": 0, + "p(95)": 0, + "avg": 0.04986588303866331 + }, + "http_req_connecting": { + "avg": 0.03191173499125705, + "min": 0, + "med": 0, + "max": 24.9196, + "p(90)": 0, + "p(95)": 0 + } + } +} diff --git a/benchmarks/raw/baseline_consumer-100vu-warmup.txt b/benchmarks/raw/baseline_consumer-100vu-warmup.txt new file mode 100644 index 0000000..7a0022f --- /dev/null +++ b/benchmarks/raw/baseline_consumer-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m01.9s), 100/100 VUs, 102 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.7s/30s + +running (0m02.9s), 100/100 VUs, 366 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.7s/30s + +running (0m03.9s), 100/100 VUs, 625 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.7s/30s + +running (0m04.9s), 100/100 VUs, 960 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.7s/30s + +running (0m05.9s), 100/100 VUs, 1245 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.7s/30s + +running (0m06.9s), 100/100 VUs, 1490 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.7s/30s + +running (0m07.9s), 100/100 VUs, 1733 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.7s/30s + +running (0m08.9s), 100/100 VUs, 2013 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.7s/30s + +running (0m09.9s), 100/100 VUs, 2356 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.7s/30s + +running (0m10.9s), 100/100 VUs, 2699 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.7s/30s + +running (0m11.9s), 100/100 VUs, 2977 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.7s/30s + +running (0m12.9s), 100/100 VUs, 3365 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.7s/30s + +running (0m13.9s), 100/100 VUs, 3744 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.7s/30s + +running (0m14.9s), 100/100 VUs, 4037 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.7s/30s + +running (0m15.9s), 100/100 VUs, 4408 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.7s/30s + +running (0m16.9s), 100/100 VUs, 4767 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.7s/30s + +running (0m17.9s), 100/100 VUs, 5137 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.7s/30s + +running (0m18.9s), 100/100 VUs, 5553 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.7s/30s + +running (0m19.9s), 100/100 VUs, 5922 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.7s/30s + +running (0m20.9s), 100/100 VUs, 6261 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.7s/30s + +running (0m21.9s), 100/100 VUs, 6640 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.7s/30s + +running (0m22.9s), 100/100 VUs, 6962 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.7s/30s + +running (0m23.9s), 100/100 VUs, 7298 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.7s/30s + +running (0m24.9s), 100/100 VUs, 7663 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.7s/30s + +running (0m25.9s), 100/100 VUs, 8109 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.7s/30s + +running (0m26.9s), 100/100 VUs, 8578 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.7s/30s + +running (0m27.9s), 100/100 VUs, 8945 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.7s/30s + +running (0m28.9s), 100/100 VUs, 9411 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.7s/30s + +running (0m29.9s), 100/100 VUs, 9788 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.7s/30s + +running (0m30.9s), 100/100 VUs, 10108 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10293 327.822811/s + checks_succeeded...: 100.00% 10293 out of 10293 + checks_failed......: 0.00% 0 out of 10293 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=241.48ms min=44.9ms med=210.7ms max=6.25s p(90)=350ms p(95)=405.31ms + { expected_response:true }...: avg=241.48ms min=44.9ms med=210.7ms max=6.25s p(90)=350ms p(95)=405.31ms + http_req_failed................: 0.00% 0 out of 10294 + http_reqs......................: 10294 327.85466/s + + EXECUTION + iteration_duration.............: avg=291.99ms min=95.58ms med=261.12ms max=6.3s p(90)=400.44ms p(95)=456.03ms + iterations.....................: 10293 327.822811/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.4 MB 109 kB/s + data_sent......................: 4.7 MB 149 kB/s + + + + +running (0m31.4s), 000/100 VUs, 10293 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-20vu-run1.json b/benchmarks/raw/baseline_consumer-20vu-run1.json new file mode 100644 index 0000000..bf2e5bd --- /dev/null +++ b/benchmarks/raw/baseline_consumer-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "p(95)": 0.55253, + "avg": 0.08925479299805517, + "min": 0, + "med": 0, + "max": 3.7241, + "p(90)": 0.53359 + }, + "http_req_duration{expected_response:true}": { + "med": 29.63505, + "max": 898.0894, + "p(90)": 54.60304, + "p(95)": 70.29240499999999, + "avg": 32.998462823006406, + "min": 6.7116 + }, + "vus": { + "value": 6, + "min": 6, + "max": 20 + }, + "http_req_failed": { + "passes": 0, + "fails": 7198, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.009971992220061128, + "min": 0, + "med": 0, + "max": 4.0143, + "p(90)": 0 + }, + "data_sent": { + "rate": 105671.75722039436, + "count": 3277809 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_reqs": { + "count": 7198, + "rate": 232.05296845313399 + }, + "http_req_blocked": { + "avg": 0.009420866907474299, + "min": 0, + "med": 0, + "max": 27.2219, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "p(90)": 105.43476000000001, + "p(95)": 120.80679999999998, + "avg": 83.41712926219283, + "min": 56.7836, + "med": 80.1112, + "max": 268.9279 + }, + "iterations": { + "rate": 232.02072991903378, + "count": 7197 + }, + "checks": { + "passes": 7197, + "fails": 0, + "value": 1 + }, + "http_req_waiting": { + "med": 29.55025, + "max": 896.9499, + "p(90)": 54.573600000000006, + "p(95)": 70.06408999999992, + "avg": 32.899236037788285, + "min": 6.7116 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.003359447068630176, + "min": 0, + "med": 0, + "max": 2.0643, + "p(90)": 0 + }, + "http_req_duration": { + "med": 29.63505, + "max": 898.0894, + "p(90)": 54.60304, + "p(95)": 70.29240499999999, + "avg": 32.998462823006406, + "min": 6.7116 + }, + "data_received": { + "count": 2440430, + "rate": 78675.88577411528 + } + }, + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 7197, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "" + } +} diff --git a/benchmarks/raw/baseline_consumer-20vu-run1.txt b/benchmarks/raw/baseline_consumer-20vu-run1.txt new file mode 100644 index 0000000..a555c71 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-20vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 20 VUs 00.1s/30s + +running (0m02.0s), 20/20 VUs, 182 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.1s/30s + +running (0m03.0s), 20/20 VUs, 411 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.1s/30s + +running (0m04.0s), 20/20 VUs, 638 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.1s/30s + +running (0m05.0s), 20/20 VUs, 839 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.1s/30s + +running (0m06.0s), 20/20 VUs, 1104 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.1s/30s + +running (0m07.0s), 20/20 VUs, 1359 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.1s/30s + +running (0m08.0s), 20/20 VUs, 1620 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.1s/30s + +running (0m09.0s), 20/20 VUs, 1895 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.1s/30s + +running (0m10.0s), 20/20 VUs, 2137 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.1s/30s + +running (0m11.0s), 20/20 VUs, 2368 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.1s/30s + +running (0m12.0s), 20/20 VUs, 2618 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.1s/30s + +running (0m13.0s), 20/20 VUs, 2871 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.1s/30s + +running (0m14.0s), 20/20 VUs, 3138 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.1s/30s + +running (0m15.0s), 20/20 VUs, 3373 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.1s/30s + +running (0m16.0s), 20/20 VUs, 3618 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.1s/30s + +running (0m17.0s), 20/20 VUs, 3867 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.1s/30s + +running (0m18.0s), 20/20 VUs, 4148 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.1s/30s + +running (0m19.0s), 20/20 VUs, 4407 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.1s/30s + +running (0m20.0s), 20/20 VUs, 4662 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.1s/30s + +running (0m21.0s), 20/20 VUs, 4925 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.1s/30s + +running (0m22.0s), 20/20 VUs, 5201 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.1s/30s + +running (0m23.0s), 20/20 VUs, 5478 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.1s/30s + +running (0m24.0s), 20/20 VUs, 5749 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.1s/30s + +running (0m25.0s), 20/20 VUs, 5983 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.1s/30s + +running (0m26.0s), 20/20 VUs, 6161 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.1s/30s + +running (0m27.0s), 20/20 VUs, 6343 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.1s/30s + +running (0m28.0s), 20/20 VUs, 6534 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.1s/30s + +running (0m29.0s), 20/20 VUs, 6757 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.1s/30s + +running (0m30.0s), 20/20 VUs, 6962 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.1s/30s + +running (0m31.0s), 06/20 VUs, 7191 complete and 0 interrupted iterations +default โ†“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7197 232.02073/s + checks_succeeded...: 100.00% 7197 out of 7197 + checks_failed......: 0.00% 0 out of 7197 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=32.99ms min=6.71ms med=29.63ms max=898.08ms p(90)=54.6ms p(95)=70.29ms + { expected_response:true }...: avg=32.99ms min=6.71ms med=29.63ms max=898.08ms p(90)=54.6ms p(95)=70.29ms + http_req_failed................: 0.00% 0 out of 7198 + http_reqs......................: 7198 232.052968/s + + EXECUTION + iteration_duration.............: avg=83.41ms min=56.78ms med=80.11ms max=268.92ms p(90)=105.43ms p(95)=120.8ms + iterations.....................: 7197 232.02073/s + vus............................: 6 min=6 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.4 MB 79 kB/s + data_sent......................: 3.3 MB 106 kB/s + + + + +running (0m31.0s), 00/20 VUs, 7197 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-20vu-run2.json b/benchmarks/raw/baseline_consumer-20vu-run2.json new file mode 100644 index 0000000..1012678 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6989, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + } + }, + "metrics": { + "http_req_receiving": { + "avg": 0.0928416309012875, + "min": 0, + "med": 0, + "max": 5.0885, + "p(90)": 0.5335, + "p(95)": 0.5533549999999999 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "iteration_duration": { + "p(90)": 104.57329999999999, + "p(95)": 118.85101999999995, + "avg": 85.86040532264978, + "min": 51.0858, + "med": 80.0027, + "max": 472.7554 + }, + "checks": { + "passes": 6989, + "fails": 0, + "value": 1 + }, + "iterations": { + "count": 6989, + "rate": 224.65651797588535 + }, + "vus_max": { + "min": 20, + "max": 20, + "value": 20 + }, + "http_req_connecting": { + "med": 0, + "max": 6.0448, + "p(90)": 0, + "p(95)": 0, + "avg": 0.004309141630901288, + "min": 0 + }, + "data_received": { + "count": 2375534, + "rate": 76359.87934945297 + }, + "http_reqs": { + "count": 6990, + "rate": 224.68866227664023 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 6.2599, + "p(90)": 0, + "p(95)": 0, + "avg": 0.014772904148783976 + }, + "data_sent": { + "count": 3182961, + "rate": 102314.05567506682 + }, + "http_req_failed": { + "passes": 0, + "fails": 6990, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration": { + "avg": 35.444062088698125, + "min": 0.7833, + "med": 29.49595, + "max": 992.0687, + "p(90)": 54.028200000000005, + "p(95)": 68.41202499999997 + }, + "http_req_blocked": { + "med": 0, + "max": 30.8489, + "p(90)": 0, + "p(95)": 0, + "avg": 0.019366137339055792, + "min": 0 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_req_waiting": { + "p(90)": 54.00362000000001, + "p(95)": 68.24769999999994, + "avg": 35.33644755364805, + "min": 0.7833, + "med": 29.4014, + "max": 987.3022 + }, + "http_req_duration{expected_response:true}": { + "avg": 35.444062088698125, + "min": 0.7833, + "med": 29.49595, + "max": 992.0687, + "p(90)": 54.028200000000005, + "p(95)": 68.41202499999997 + } + } +} diff --git a/benchmarks/raw/baseline_consumer-20vu-run2.txt b/benchmarks/raw/baseline_consumer-20vu-run2.txt new file mode 100644 index 0000000..8586c0b --- /dev/null +++ b/benchmarks/raw/baseline_consumer-20vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 189 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m03.0s), 20/20 VUs, 418 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m04.0s), 20/20 VUs, 653 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m05.0s), 20/20 VUs, 918 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m06.0s), 20/20 VUs, 1179 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m07.0s), 20/20 VUs, 1409 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m08.0s), 20/20 VUs, 1671 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m09.0s), 20/20 VUs, 1938 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m10.0s), 20/20 VUs, 2198 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m11.0s), 20/20 VUs, 2469 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m12.0s), 20/20 VUs, 2724 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m13.0s), 20/20 VUs, 2942 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m14.0s), 20/20 VUs, 3177 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m15.0s), 20/20 VUs, 3386 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m16.0s), 20/20 VUs, 3623 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m17.0s), 20/20 VUs, 3883 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m18.0s), 20/20 VUs, 4146 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m19.0s), 20/20 VUs, 4423 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m20.0s), 20/20 VUs, 4701 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m21.0s), 20/20 VUs, 4981 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m22.0s), 20/20 VUs, 5234 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m23.0s), 20/20 VUs, 5467 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m24.0s), 20/20 VUs, 5709 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m25.0s), 20/20 VUs, 5953 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m26.0s), 20/20 VUs, 6122 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m27.0s), 20/20 VUs, 6202 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m28.0s), 20/20 VUs, 6323 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m29.0s), 20/20 VUs, 6513 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m30.0s), 20/20 VUs, 6734 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m31.0s), 20/20 VUs, 6961 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6989 224.656518/s + checks_succeeded...: 100.00% 6989 out of 6989 + checks_failed......: 0.00% 0 out of 6989 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=35.44ms min=783.3ยตs med=29.49ms max=992.06ms p(90)=54.02ms p(95)=68.41ms + { expected_response:true }...: avg=35.44ms min=783.3ยตs med=29.49ms max=992.06ms p(90)=54.02ms p(95)=68.41ms + http_req_failed................: 0.00% 0 out of 6990 + http_reqs......................: 6990 224.688662/s + + EXECUTION + iteration_duration.............: avg=85.86ms min=51.08ms med=80ms max=472.75ms p(90)=104.57ms p(95)=118.85ms + iterations.....................: 6989 224.656518/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.4 MB 76 kB/s + data_sent......................: 3.2 MB 102 kB/s + + + + +running (0m31.1s), 00/20 VUs, 6989 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-20vu-run3.json b/benchmarks/raw/baseline_consumer-20vu-run3.json new file mode 100644 index 0000000..487db00 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "data_received": { + "count": 1641710, + "rate": 49707.80846023382 + }, + "http_req_failed": { + "passes": 0, + "fails": 4638, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration": { + "p(95)": 174.210865, + "avg": 78.11779266925386, + "min": 9.4651, + "med": 65.3258, + "max": 2862.3804, + "p(90)": 138.48123 + }, + "http_req_sending": { + "avg": 0.04633178094006038, + "min": 0, + "med": 0, + "max": 9.9529, + "p(90)": 0, + "p(95)": 0.4408549999999921 + }, + "iteration_duration": { + "max": 697.4341, + "p(90)": 191.4922, + "p(95)": 225.94776, + "avg": 129.38682076773804, + "min": 60.78, + "med": 116.7225 + }, + "http_req_blocked": { + "avg": 0.041207201379905155, + "min": 0, + "med": 0, + "max": 93.1217, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "min": 9.4651, + "med": 65.3258, + "max": 2862.3804, + "p(90)": 138.48123, + "p(95)": 174.210865, + "avg": 78.11779266925386 + }, + "checks": { + "passes": 4637, + "fails": 0, + "value": 1 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 8.4702, + "p(90)": 0.5489, + "p(95)": 0.6815899999999998, + "avg": 0.1397226390685641 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "data_sent": { + "count": 2110449, + "rate": 63900.32018876172 + }, + "vus": { + "min": 0, + "max": 20, + "value": 20 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 7.4432, + "p(90)": 0, + "p(95)": 0, + "avg": 0.010902177662785683 + }, + "http_req_waiting": { + "avg": 77.93173824924527, + "min": 9.4651, + "med": 65.23235, + "max": 2859.6554, + "p(90)": 138.25510000000006, + "p(95)": 173.75599999999986 + }, + "iterations": { + "count": 4637, + "rate": 140.39940539443884 + }, + "http_reqs": { + "count": 4638, + "rate": 140.42968346331838 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 4637, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + } +} diff --git a/benchmarks/raw/baseline_consumer-20vu-run3.txt b/benchmarks/raw/baseline_consumer-20vu-run3.txt new file mode 100644 index 0000000..d76858b --- /dev/null +++ b/benchmarks/raw/baseline_consumer-20vu-run3.txt @@ -0,0 +1,151 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +running (0m03.0s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 20 VUs 00.0s/30s + +running (0m04.0s), 20/20 VUs, 145 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 01.0s/30s + +running (0m05.0s), 20/20 VUs, 347 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.0s/30s + +running (0m06.0s), 20/20 VUs, 518 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.0s/30s + +running (0m07.0s), 20/20 VUs, 618 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 04.0s/30s + +running (0m08.0s), 20/20 VUs, 751 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.0s/30s + +running (0m09.0s), 20/20 VUs, 906 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.0s/30s + +running (0m10.1s), 20/20 VUs, 1013 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.1s/30s + +running (0m11.0s), 20/20 VUs, 1075 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m12.0s), 20/20 VUs, 1232 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.0s/30s + +running (0m13.0s), 20/20 VUs, 1382 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 10.0s/30s + +running (0m14.0s), 20/20 VUs, 1530 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m15.0s), 20/20 VUs, 1667 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m16.0s), 20/20 VUs, 1876 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m17.0s), 20/20 VUs, 2065 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.0s/30s + +running (0m18.0s), 20/20 VUs, 2264 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.0s/30s + +running (0m19.0s), 20/20 VUs, 2408 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m20.0s), 20/20 VUs, 2557 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.0s/30s + +running (0m21.0s), 20/20 VUs, 2677 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.0s/30s + +running (0m22.0s), 20/20 VUs, 2813 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 19.0s/30s + +running (0m23.0s), 20/20 VUs, 2994 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.0s/30s + +running (0m24.0s), 20/20 VUs, 3184 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.0s/30s + +running (0m25.0s), 20/20 VUs, 3385 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 22.0s/30s + +running (0m26.0s), 20/20 VUs, 3610 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.0s/30s + +running (0m27.0s), 20/20 VUs, 3778 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.0s/30s + +running (0m28.0s), 20/20 VUs, 3905 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 25.0s/30s + +running (0m29.0s), 20/20 VUs, 4058 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.0s/30s + +running (0m30.0s), 20/20 VUs, 4168 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m31.0s), 20/20 VUs, 4348 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m32.0s), 20/20 VUs, 4476 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m33.0s), 20/20 VUs, 4617 complete and 0 interrupted iterations +default โ†“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 4637 140.399405/s + checks_succeeded...: 100.00% 4637 out of 4637 + checks_failed......: 0.00% 0 out of 4637 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=78.11ms min=9.46ms med=65.32ms max=2.86s p(90)=138.48ms p(95)=174.21ms + { expected_response:true }...: avg=78.11ms min=9.46ms med=65.32ms max=2.86s p(90)=138.48ms p(95)=174.21ms + http_req_failed................: 0.00% 0 out of 4638 + http_reqs......................: 4638 140.429683/s + + EXECUTION + iteration_duration.............: avg=129.38ms min=60.78ms med=116.72ms max=697.43ms p(90)=191.49ms p(95)=225.94ms + iterations.....................: 4637 140.399405/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.6 MB 50 kB/s + data_sent......................: 2.1 MB 64 kB/s + + + + +running (0m33.0s), 00/20 VUs, 4637 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-20vu-warmup.json b/benchmarks/raw/baseline_consumer-20vu-warmup.json new file mode 100644 index 0000000..9307953 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 5714, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "iteration_duration": { + "p(90)": 129.11792, + "p(95)": 157.1487, + "avg": 105.09780204760243, + "min": 59.2564, + "med": 87.83905, + "max": 1346.1087 + }, + "data_sent": { + "count": 2601561, + "rate": 84008.68456670486 + }, + "iterations": { + "count": 5714, + "rate": 184.51446020837164 + }, + "http_reqs": { + "count": 5715, + "rate": 184.54675185349038 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.0141188101487314, + "min": 0, + "med": 0, + "max": 27.306, + "p(90)": 0 + }, + "http_req_connecting": { + "avg": 0.004796832895888015, + "min": 0, + "med": 0, + "max": 2.2127, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 1977734, + "rate": 63864.28446722851 + }, + "http_req_duration": { + "avg": 54.525984724409575, + "min": 8.7243, + "med": 37.0892, + "max": 1295.9996, + "p(90)": 78.43176, + "p(95)": 106.12240000000001 + }, + "http_req_waiting": { + "avg": 54.387445721784935, + "min": 8.7243, + "med": 36.9931, + "max": 1295.9996, + "p(90)": 78.03564000000003, + "p(95)": 105.68936000000001 + }, + "http_req_failed": { + "passes": 0, + "fails": 5715, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_receiving": { + "avg": 0.11649324584426947, + "min": 0, + "med": 0, + "max": 3.6014, + "p(90)": 0.54346, + "p(95)": 0.5694 + }, + "checks": { + "passes": 5714, + "fails": 0, + "value": 1 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "max": 5.6103, + "p(90)": 0, + "p(95)": 0, + "avg": 0.02204575678040244, + "min": 0, + "med": 0 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration{expected_response:true}": { + "avg": 54.525984724409575, + "min": 8.7243, + "med": 37.0892, + "max": 1295.9996, + "p(90)": 78.43176, + "p(95)": 106.12240000000001 + } + } +} diff --git a/benchmarks/raw/baseline_consumer-20vu-warmup.txt b/benchmarks/raw/baseline_consumer-20vu-warmup.txt new file mode 100644 index 0000000..0269ef8 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-20vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 20 VUs 00.1s/30s + +running (0m02.0s), 20/20 VUs, 128 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.1s/30s + +running (0m03.0s), 20/20 VUs, 288 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.1s/30s + +running (0m04.0s), 20/20 VUs, 425 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.1s/30s + +running (0m05.0s), 20/20 VUs, 445 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.1s/30s + +running (0m06.0s), 20/20 VUs, 501 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.1s/30s + +running (0m07.0s), 20/20 VUs, 530 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.1s/30s + +running (0m08.0s), 20/20 VUs, 717 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.1s/30s + +running (0m09.0s), 20/20 VUs, 804 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.1s/30s + +running (0m10.0s), 20/20 VUs, 1033 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.1s/30s + +running (0m11.0s), 20/20 VUs, 1266 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.1s/30s + +running (0m12.0s), 20/20 VUs, 1457 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.1s/30s + +running (0m13.0s), 20/20 VUs, 1649 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.1s/30s + +running (0m14.0s), 20/20 VUs, 1795 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.1s/30s + +running (0m15.0s), 20/20 VUs, 1973 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.1s/30s + +running (0m16.0s), 20/20 VUs, 2213 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.1s/30s + +running (0m17.0s), 20/20 VUs, 2454 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.1s/30s + +running (0m18.0s), 20/20 VUs, 2720 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.1s/30s + +running (0m19.0s), 20/20 VUs, 2974 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.1s/30s + +running (0m20.0s), 20/20 VUs, 3224 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.1s/30s + +running (0m21.0s), 20/20 VUs, 3471 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.1s/30s + +running (0m22.0s), 20/20 VUs, 3666 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.1s/30s + +running (0m23.0s), 20/20 VUs, 3862 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.1s/30s + +running (0m24.0s), 20/20 VUs, 4088 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.1s/30s + +running (0m25.0s), 20/20 VUs, 4346 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.1s/30s + +running (0m26.0s), 20/20 VUs, 4587 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.1s/30s + +running (0m27.0s), 20/20 VUs, 4796 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.1s/30s + +running (0m28.0s), 20/20 VUs, 5025 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.1s/30s + +running (0m29.0s), 20/20 VUs, 5280 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.1s/30s + +running (0m30.0s), 20/20 VUs, 5508 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.1s/30s + +running (0m31.0s), 00/20 VUs, 5714 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5714 184.51446/s + checks_succeeded...: 100.00% 5714 out of 5714 + checks_failed......: 0.00% 0 out of 5714 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=54.52ms min=8.72ms med=37.08ms max=1.29s p(90)=78.43ms p(95)=106.12ms + { expected_response:true }...: avg=54.52ms min=8.72ms med=37.08ms max=1.29s p(90)=78.43ms p(95)=106.12ms + http_req_failed................: 0.00% 0 out of 5715 + http_reqs......................: 5715 184.546752/s + + EXECUTION + iteration_duration.............: avg=105.09ms min=59.25ms med=87.83ms max=1.34s p(90)=129.11ms p(95)=157.14ms + iterations.....................: 5714 184.51446/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.0 MB 64 kB/s + data_sent......................: 2.6 MB 84 kB/s + + + + +running (0m31.0s), 00/20 VUs, 5714 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-50vu-run1.json b/benchmarks/raw/baseline_consumer-50vu-run1.json new file mode 100644 index 0000000..df5a52d --- /dev/null +++ b/benchmarks/raw/baseline_consumer-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5820, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + }, + "name": "", + "path": "" + }, + "metrics": { + "data_sent": { + "count": 2643597, + "rate": 82775.31712765754 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_failed": { + "passes": 0, + "fails": 5821, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration": { + "med": 152.6199, + "max": 1775.5405, + "p(90)": 335.6523, + "p(95)": 544.5873, + "avg": 206.91515103934032, + "min": 29.9799 + }, + "http_req_receiving": { + "p(95)": 0.6022, + "avg": 0.11363475347878367, + "min": 0, + "med": 0, + "max": 6.7069, + "p(90)": 0.5408 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 335.6523, + "p(95)": 544.5873, + "avg": 206.91515103934032, + "min": 29.9799, + "med": 152.6199, + "max": 1775.5405 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.021758495103934024, + "min": 0, + "med": 0, + "max": 13.191 + }, + "data_received": { + "count": 2010806, + "rate": 62961.6028207766 + }, + "http_req_sending": { + "avg": 0.04034725992097579, + "min": 0, + "med": 0, + "max": 23.835, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "avg": 257.98984226804185, + "min": 80.0006, + "med": 203.32299999999998, + "max": 1826.2314, + "p(90)": 388.3924300000002, + "p(95)": 595.75479 + }, + "iterations": { + "count": 5820, + "rate": 182.2336557663543 + }, + "http_req_waiting": { + "med": 152.362, + "max": 1775.5405, + "p(90)": 334.0169, + "p(95)": 544.5873, + "avg": 206.7611690259402, + "min": 29.9799 + }, + "http_reqs": { + "count": 5821, + "rate": 182.26496739105642 + }, + "checks": { + "passes": 5820, + "fails": 0, + "value": 1 + }, + "http_req_blocked": { + "max": 44.1837, + "p(90)": 0, + "p(95)": 0, + "avg": 0.036190362480673414, + "min": 0, + "med": 0 + } + } +} diff --git a/benchmarks/raw/baseline_consumer-50vu-run1.txt b/benchmarks/raw/baseline_consumer-50vu-run1.txt new file mode 100644 index 0000000..e69c101 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-50vu-run1.txt @@ -0,0 +1,148 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 0 complete and 0 interrupted iterations +default [ 1% ] 50 VUs 00.2s/30s + +running (0m03.0s), 50/50 VUs, 160 complete and 0 interrupted iterations +default [ 4% ] 50 VUs 01.2s/30s + +running (0m04.0s), 50/50 VUs, 243 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.2s/30s + +running (0m05.0s), 50/50 VUs, 411 complete and 0 interrupted iterations +default [ 11% ] 50 VUs 03.2s/30s + +running (0m06.0s), 50/50 VUs, 600 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.2s/30s + +running (0m07.0s), 50/50 VUs, 821 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.2s/30s + +running (0m08.0s), 50/50 VUs, 1071 complete and 0 interrupted iterations +default [ 21% ] 50 VUs 06.2s/30s + +running (0m09.0s), 50/50 VUs, 1242 complete and 0 interrupted iterations +default [ 24% ] 50 VUs 07.2s/30s + +running (0m10.0s), 50/50 VUs, 1369 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.2s/30s + +running (0m11.0s), 50/50 VUs, 1542 complete and 0 interrupted iterations +default [ 31% ] 50 VUs 09.2s/30s + +running (0m12.0s), 50/50 VUs, 1662 complete and 0 interrupted iterations +default [ 34% ] 50 VUs 10.2s/30s + +running (0m13.0s), 50/50 VUs, 1848 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.2s/30s + +running (0m14.0s), 50/50 VUs, 2017 complete and 0 interrupted iterations +default [ 41% ] 50 VUs 12.2s/30s + +running (0m15.0s), 50/50 VUs, 2207 complete and 0 interrupted iterations +default [ 44% ] 50 VUs 13.2s/30s + +running (0m16.0s), 50/50 VUs, 2237 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.2s/30s + +running (0m17.0s), 50/50 VUs, 2275 complete and 0 interrupted iterations +default [ 51% ] 50 VUs 15.2s/30s + +running (0m18.0s), 50/50 VUs, 2347 complete and 0 interrupted iterations +default [ 54% ] 50 VUs 16.2s/30s + +running (0m19.0s), 50/50 VUs, 2391 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.2s/30s + +running (0m20.0s), 50/50 VUs, 2459 complete and 0 interrupted iterations +default [ 61% ] 50 VUs 18.2s/30s + +running (0m21.0s), 50/50 VUs, 2699 complete and 0 interrupted iterations +default [ 64% ] 50 VUs 19.2s/30s + +running (0m22.0s), 50/50 VUs, 3005 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.2s/30s + +running (0m23.0s), 50/50 VUs, 3303 complete and 0 interrupted iterations +default [ 71% ] 50 VUs 21.2s/30s + +running (0m24.0s), 50/50 VUs, 3572 complete and 0 interrupted iterations +default [ 74% ] 50 VUs 22.2s/30s + +running (0m25.0s), 50/50 VUs, 3915 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.2s/30s + +running (0m26.0s), 50/50 VUs, 4273 complete and 0 interrupted iterations +default [ 81% ] 50 VUs 24.2s/30s + +running (0m27.0s), 50/50 VUs, 4617 complete and 0 interrupted iterations +default [ 84% ] 50 VUs 25.2s/30s + +running (0m28.0s), 50/50 VUs, 4893 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.2s/30s + +running (0m29.0s), 50/50 VUs, 5224 complete and 0 interrupted iterations +default [ 91% ] 50 VUs 27.2s/30s + +running (0m30.0s), 50/50 VUs, 5477 complete and 0 interrupted iterations +default [ 94% ] 50 VUs 28.2s/30s + +running (0m31.0s), 50/50 VUs, 5622 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.2s/30s + +running (0m31.9s), 00/50 VUs, 5820 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5820 182.233656/s + checks_succeeded...: 100.00% 5820 out of 5820 + checks_failed......: 0.00% 0 out of 5820 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=206.91ms min=29.97ms med=152.61ms max=1.77s p(90)=335.65ms p(95)=544.58ms + { expected_response:true }...: avg=206.91ms min=29.97ms med=152.61ms max=1.77s p(90)=335.65ms p(95)=544.58ms + http_req_failed................: 0.00% 0 out of 5821 + http_reqs......................: 5821 182.264967/s + + EXECUTION + iteration_duration.............: avg=257.98ms min=80ms med=203.32ms max=1.82s p(90)=388.39ms p(95)=595.75ms + iterations.....................: 5820 182.233656/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.0 MB 63 kB/s + data_sent......................: 2.6 MB 83 kB/s + + + + +running (0m31.9s), 00/50 VUs, 5820 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-50vu-run2.json b/benchmarks/raw/baseline_consumer-50vu-run2.json new file mode 100644 index 0000000..fb7aeb9 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_reqs": { + "count": 7844, + "rate": 250.18643578069188 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 7844, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.0666658592554819, + "min": 0, + "med": 0, + "max": 74.9047 + }, + "data_sent": { + "count": 3566085, + "rate": 113741.21568600058 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_duration": { + "med": 126.35725, + "max": 1141.0786, + "p(90)": 221.80339999999998, + "p(95)": 254.05977499999992, + "avg": 139.92440708821962, + "min": 18.358 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.029873215196328403, + "min": 0, + "med": 0, + "max": 16.9632, + "p(90)": 0 + }, + "checks": { + "passes": 7843, + "fails": 0, + "value": 1 + }, + "data_received": { + "count": 2641982, + "rate": 84266.70830912085 + }, + "http_req_duration{expected_response:true}": { + "avg": 139.92440708821962, + "min": 18.358, + "med": 126.35725, + "max": 1141.0786, + "p(90)": 221.80339999999998, + "p(95)": 254.05977499999992 + }, + "iteration_duration": { + "p(90)": 273.71193999999997, + "p(95)": 306.41288999999995, + "avg": 191.08580274129753, + "min": 68.8382, + "med": 177.201, + "max": 873.4486 + }, + "iterations": { + "count": 7843, + "rate": 250.15454051860866 + }, + "http_req_connecting": { + "med": 0, + "max": 27.4786, + "p(90)": 0, + "p(95)": 0, + "avg": 0.0313194543600204, + "min": 0 + }, + "http_req_receiving": { + "p(95)": 0.5719549999999998, + "avg": 0.11462151963284047, + "min": 0, + "med": 0, + "max": 21.4605, + "p(90)": 0.5445 + }, + "http_req_waiting": { + "p(90)": 221.68688999999998, + "p(95)": 253.75542499999995, + "avg": 139.77991235339053, + "min": 17.8252, + "med": 126.30375000000001, + "max": 1140.0017 + }, + "vus": { + "max": 50, + "value": 50, + "min": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7843 + } + } + } +} diff --git a/benchmarks/raw/baseline_consumer-50vu-run2.txt b/benchmarks/raw/baseline_consumer-50vu-run2.txt new file mode 100644 index 0000000..f102bda --- /dev/null +++ b/benchmarks/raw/baseline_consumer-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 101 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m03.0s), 50/50 VUs, 383 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.8s/30s + +running (0m04.0s), 50/50 VUs, 708 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m05.0s), 50/50 VUs, 1017 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.8s/30s + +running (0m06.0s), 50/50 VUs, 1278 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m07.0s), 50/50 VUs, 1544 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.8s/30s + +running (0m08.0s), 50/50 VUs, 1828 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m09.0s), 50/50 VUs, 2130 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.8s/30s + +running (0m10.0s), 50/50 VUs, 2451 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.8s/30s + +running (0m11.0s), 50/50 VUs, 2816 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m12.0s), 50/50 VUs, 3040 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.8s/30s + +running (0m13.0s), 50/50 VUs, 3212 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.8s/30s + +running (0m14.0s), 50/50 VUs, 3351 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m15.0s), 50/50 VUs, 3532 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.8s/30s + +running (0m16.0s), 50/50 VUs, 3730 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m17.0s), 50/50 VUs, 3924 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.8s/30s + +running (0m18.0s), 50/50 VUs, 4099 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.8s/30s + +running (0m19.0s), 50/50 VUs, 4362 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m20.0s), 50/50 VUs, 4688 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.8s/30s + +running (0m21.0s), 50/50 VUs, 5034 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.8s/30s + +running (0m22.0s), 50/50 VUs, 5317 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m23.0s), 50/50 VUs, 5562 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m24.0s), 50/50 VUs, 5787 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m25.0s), 50/50 VUs, 6090 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.8s/30s + +running (0m26.0s), 50/50 VUs, 6377 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m27.0s), 50/50 VUs, 6637 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.8s/30s + +running (0m28.0s), 50/50 VUs, 6914 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.8s/30s + +running (0m29.0s), 50/50 VUs, 7200 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.8s/30s + +running (0m30.0s), 50/50 VUs, 7514 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m31.0s), 50/50 VUs, 7749 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7843 250.154541/s + checks_succeeded...: 100.00% 7843 out of 7843 + checks_failed......: 0.00% 0 out of 7843 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=139.92ms min=18.35ms med=126.35ms max=1.14s p(90)=221.8ms p(95)=254.05ms + { expected_response:true }...: avg=139.92ms min=18.35ms med=126.35ms max=1.14s p(90)=221.8ms p(95)=254.05ms + http_req_failed................: 0.00% 0 out of 7844 + http_reqs......................: 7844 250.186436/s + + EXECUTION + iteration_duration.............: avg=191.08ms min=68.83ms med=177.2ms max=873.44ms p(90)=273.71ms p(95)=306.41ms + iterations.....................: 7843 250.154541/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.6 MB 84 kB/s + data_sent......................: 3.6 MB 114 kB/s + + + + +running (0m31.4s), 00/50 VUs, 7843 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-50vu-run3.json b/benchmarks/raw/baseline_consumer-50vu-run3.json new file mode 100644 index 0000000..25eb477 --- /dev/null +++ b/benchmarks/raw/baseline_consumer-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7853, + "fails": 0, + "name": "status is 200" + } + } + }, + "metrics": { + "http_req_sending": { + "avg": 0.02528612172141584, + "min": 0, + "med": 0, + "max": 24.2413, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "med": 177.8826, + "max": 1382.2926, + "p(90)": 267.00664000000006, + "p(95)": 303.77325999999994, + "avg": 191.40214459442305, + "min": 73.5357 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_duration{expected_response:true}": { + "max": 1329.8702, + "p(90)": 215.40661999999998, + "p(95)": 252.58526499999994, + "avg": 140.72934742806237, + "min": 22.1996, + "med": 127.10745 + }, + "data_sent": { + "rate": 113224.7792842247, + "count": 3570645 + }, + "data_received": { + "count": 2645102, + "rate": 83875.90761172319 + }, + "iterations": { + "count": 7853, + "rate": 249.0178081884412 + }, + "checks": { + "passes": 7853, + "fails": 0, + "value": 1 + }, + "vus_max": { + "max": 50, + "value": 50, + "min": 50 + }, + "http_req_waiting": { + "p(90)": 215.20074, + "p(95)": 252.47053999999986, + "avg": 140.59814710975354, + "min": 22.1996, + "med": 127.0607, + "max": 1329.8357 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 7854, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 7854, + "rate": 249.0495180837918 + }, + "http_req_duration": { + "avg": 140.72934742806237, + "min": 22.1996, + "med": 127.10745, + "max": 1329.8702, + "p(90)": 215.40661999999998, + "p(95)": 252.58526499999994 + }, + "http_req_receiving": { + "p(95)": 0.5566699999999999, + "avg": 0.105914196587726, + "min": 0, + "med": 0, + "max": 10.3735, + "p(90)": 0.53917 + }, + "http_req_blocked": { + "avg": 0.02738955946014768, + "min": 0, + "med": 0, + "max": 31.7841, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.0164692513368984, + "min": 0, + "med": 0, + "max": 19.5033 + } + } +} diff --git a/benchmarks/raw/baseline_consumer-50vu-run3.txt b/benchmarks/raw/baseline_consumer-50vu-run3.txt new file mode 100644 index 0000000..c07ceca --- /dev/null +++ b/benchmarks/raw/baseline_consumer-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 45 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.6s/30s + +running (0m03.0s), 50/50 VUs, 311 complete and 0 interrupted iterations +default [ 5% ] 50 VUs 01.6s/30s + +running (0m04.0s), 50/50 VUs, 604 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.6s/30s + +running (0m05.0s), 50/50 VUs, 834 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.6s/30s + +running (0m06.0s), 50/50 VUs, 1055 complete and 0 interrupted iterations +default [ 15% ] 50 VUs 04.6s/30s + +running (0m07.0s), 50/50 VUs, 1304 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.6s/30s + +running (0m08.0s), 50/50 VUs, 1485 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.6s/30s + +running (0m09.0s), 50/50 VUs, 1745 complete and 0 interrupted iterations +default [ 25% ] 50 VUs 07.6s/30s + +running (0m10.0s), 50/50 VUs, 1911 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.6s/30s + +running (0m11.0s), 50/50 VUs, 2154 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.6s/30s + +running (0m12.0s), 50/50 VUs, 2372 complete and 0 interrupted iterations +default [ 35% ] 50 VUs 10.6s/30s + +running (0m13.0s), 50/50 VUs, 2615 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.6s/30s + +running (0m14.0s), 50/50 VUs, 2869 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.6s/30s + +running (0m15.0s), 50/50 VUs, 3138 complete and 0 interrupted iterations +default [ 45% ] 50 VUs 13.6s/30s + +running (0m16.0s), 50/50 VUs, 3448 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.6s/30s + +running (0m17.0s), 50/50 VUs, 3814 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.6s/30s + +running (0m18.0s), 50/50 VUs, 4180 complete and 0 interrupted iterations +default [ 55% ] 50 VUs 16.6s/30s + +running (0m19.0s), 50/50 VUs, 4505 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.6s/30s + +running (0m20.0s), 50/50 VUs, 4807 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.6s/30s + +running (0m21.0s), 50/50 VUs, 5086 complete and 0 interrupted iterations +default [ 65% ] 50 VUs 19.6s/30s + +running (0m22.0s), 50/50 VUs, 5265 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.6s/30s + +running (0m23.0s), 50/50 VUs, 5493 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.6s/30s + +running (0m24.0s), 50/50 VUs, 5709 complete and 0 interrupted iterations +default [ 75% ] 50 VUs 22.6s/30s + +running (0m25.0s), 50/50 VUs, 5984 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.6s/30s + +running (0m26.0s), 50/50 VUs, 6298 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.6s/30s + +running (0m27.0s), 50/50 VUs, 6600 complete and 0 interrupted iterations +default [ 85% ] 50 VUs 25.6s/30s + +running (0m28.0s), 50/50 VUs, 6935 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.6s/30s + +running (0m29.0s), 50/50 VUs, 7274 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.6s/30s + +running (0m30.0s), 50/50 VUs, 7446 complete and 0 interrupted iterations +default [ 95% ] 50 VUs 28.6s/30s + +running (0m31.0s), 50/50 VUs, 7701 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7853 249.017808/s + checks_succeeded...: 100.00% 7853 out of 7853 + checks_failed......: 0.00% 0 out of 7853 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=140.72ms min=22.19ms med=127.1ms max=1.32s p(90)=215.4ms p(95)=252.58ms + { expected_response:true }...: avg=140.72ms min=22.19ms med=127.1ms max=1.32s p(90)=215.4ms p(95)=252.58ms + http_req_failed................: 0.00% 0 out of 7854 + http_reqs......................: 7854 249.049518/s + + EXECUTION + iteration_duration.............: avg=191.4ms min=73.53ms med=177.88ms max=1.38s p(90)=267ms p(95)=303.77ms + iterations.....................: 7853 249.017808/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.6 MB 84 kB/s + data_sent......................: 3.6 MB 113 kB/s + + + + +running (0m31.5s), 00/50 VUs, 7853 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/baseline_consumer-50vu-warmup.json b/benchmarks/raw/baseline_consumer-50vu-warmup.json new file mode 100644 index 0000000..d05759d --- /dev/null +++ b/benchmarks/raw/baseline_consumer-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8958, + "fails": 0 + } + } + }, + "metrics": { + "iterations": { + "count": 8958, + "rate": 287.77028152292297 + }, + "data_sent": { + "rate": 130891.62830120427, + "count": 4074525 + }, + "http_req_failed": { + "passes": 0, + "fails": 8959, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "avg": 0.018438999888380388, + "min": 0, + "med": 0, + "max": 31.1683, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "min": 0, + "max": 50, + "value": 50 + }, + "http_req_duration{expected_response:true}": { + "med": 108.0635, + "max": 980.2886, + "p(90)": 180.4987, + "p(95)": 207.92493000000005, + "avg": 117.0488844402274, + "min": 16.3374 + }, + "data_received": { + "rate": 96047.49156672132, + "count": 2989862 + }, + "http_req_waiting": { + "avg": 116.92201745730539, + "min": 16.3374, + "med": 107.9829, + "max": 978.7559, + "p(90)": 180.2248, + "p(95)": 207.92493000000005 + }, + "iteration_duration": { + "avg": 167.59503592319712, + "min": 67.4487, + "med": 158.62795, + "max": 908.2319, + "p(90)": 231.2206, + "p(95)": 259.72855499999986 + }, + "http_req_connecting": { + "avg": 0.007445239424042863, + "min": 0, + "med": 0, + "max": 4.5894, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "avg": 0.028712847416006278, + "min": 0, + "med": 0, + "max": 39.9335, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "max": 5.6619, + "p(90)": 0.53612, + "p(95)": 0.5613400000000002, + "avg": 0.09815413550619481, + "min": 0, + "med": 0 + }, + "http_req_duration": { + "avg": 117.0488844402274, + "min": 16.3374, + "med": 108.0635, + "max": 980.2886, + "p(90)": 180.4987, + "p(95)": 207.92493000000005 + }, + "vus_max": { + "max": 50, + "value": 50, + "min": 50 + }, + "http_reqs": { + "count": 8959, + "rate": 287.80240591246564 + }, + "checks": { + "passes": 8958, + "fails": 0, + "value": 1 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + } + } +} diff --git a/benchmarks/raw/baseline_consumer-50vu-warmup.txt b/benchmarks/raw/baseline_consumer-50vu-warmup.txt new file mode 100644 index 0000000..92cda3f --- /dev/null +++ b/benchmarks/raw/baseline_consumer-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 211 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 01.0s/30s + +running (0m03.0s), 50/50 VUs, 532 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.0s/30s + +running (0m04.0s), 50/50 VUs, 796 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.0s/30s + +running (0m05.0s), 50/50 VUs, 1036 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 04.0s/30s + +running (0m06.0s), 50/50 VUs, 1302 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.0s/30s + +running (0m07.0s), 50/50 VUs, 1656 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.0s/30s + +running (0m08.0s), 50/50 VUs, 1955 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 07.0s/30s + +running (0m09.0s), 50/50 VUs, 2311 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.0s/30s + +running (0m10.0s), 50/50 VUs, 2631 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.0s/30s + +running (0m11.0s), 50/50 VUs, 2906 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 10.0s/30s + +running (0m12.0s), 50/50 VUs, 3210 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.0s/30s + +running (0m13.0s), 50/50 VUs, 3451 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.0s/30s + +running (0m14.0s), 50/50 VUs, 3661 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 13.0s/30s + +running (0m15.0s), 50/50 VUs, 3820 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.0s/30s + +running (0m16.0s), 50/50 VUs, 4028 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.0s/30s + +running (0m17.0s), 50/50 VUs, 4294 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 16.0s/30s + +running (0m18.0s), 50/50 VUs, 4624 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.0s/30s + +running (0m19.0s), 50/50 VUs, 4949 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.0s/30s + +running (0m20.0s), 50/50 VUs, 5263 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 19.0s/30s + +running (0m21.0s), 50/50 VUs, 5600 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.0s/30s + +running (0m22.0s), 50/50 VUs, 5920 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.0s/30s + +running (0m23.0s), 50/50 VUs, 6100 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 22.0s/30s + +running (0m24.0s), 50/50 VUs, 6417 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.0s/30s + +running (0m25.0s), 50/50 VUs, 6773 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.0s/30s + +running (0m26.0s), 50/50 VUs, 7126 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 25.0s/30s + +running (0m27.0s), 50/50 VUs, 7513 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.0s/30s + +running (0m28.0s), 50/50 VUs, 7916 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.0s/30s + +running (0m29.0s), 50/50 VUs, 8298 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 28.0s/30s + +running (0m30.0s), 50/50 VUs, 8595 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.0s/30s + +running (0m31.0s), 50/50 VUs, 8897 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8958 287.770282/s + checks_succeeded...: 100.00% 8958 out of 8958 + checks_failed......: 0.00% 0 out of 8958 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=117.04ms min=16.33ms med=108.06ms max=980.28ms p(90)=180.49ms p(95)=207.92ms + { expected_response:true }...: avg=117.04ms min=16.33ms med=108.06ms max=980.28ms p(90)=180.49ms p(95)=207.92ms + http_req_failed................: 0.00% 0 out of 8959 + http_reqs......................: 8959 287.802406/s + + EXECUTION + iteration_duration.............: avg=167.59ms min=67.44ms med=158.62ms max=908.23ms p(90)=231.22ms p(95)=259.72ms + iterations.....................: 8958 287.770282/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.0 MB 96 kB/s + data_sent......................: 4.1 MB 131 kB/s + + + + +running (0m31.1s), 00/50 VUs, 8958 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/consumer-bottleneck-evidence.json b/benchmarks/raw/consumer-bottleneck-evidence.json new file mode 100644 index 0000000..aeea1b6 --- /dev/null +++ b/benchmarks/raw/consumer-bottleneck-evidence.json @@ -0,0 +1,32 @@ +{ + "sampleCount": 500, + "total": { + "avg": 24.22, + "p50": 19.29, + "p95": 52.44, + "min": 6.15, + "max": 275.68 + }, + "idempotency": { + "avg": 2.04, + "p50": 1.62, + "p95": 3.35, + "min": 1.01, + "max": 33.91 + }, + "tx": { + "avg": 22.1, + "p50": 17.14, + "p95": 50.54, + "min": 4.88, + "max": 249.52 + }, + "overhead": { + "avg": 0.08, + "p50": 0.08, + "p95": 0.12, + "min": 0.05, + "max": 0.45 + }, + "impliedThroughput": 41.29 +} \ No newline at end of file diff --git a/benchmarks/raw/exp-keepalive_off_container_ip-raw.txt b/benchmarks/raw/exp-keepalive_off_container_ip-raw.txt new file mode 100644 index 0000000..3a85254 --- /dev/null +++ b/benchmarks/raw/exp-keepalive_off_container_ip-raw.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 173 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m02.0s), 20/20 VUs, 375 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m03.0s), 20/20 VUs, 578 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m04.0s), 20/20 VUs, 803 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m05.0s), 20/20 VUs, 983 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m06.0s), 20/20 VUs, 1182 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m07.0s), 20/20 VUs, 1378 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m08.0s), 20/20 VUs, 1584 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m09.0s), 20/20 VUs, 1799 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m10.0s), 20/20 VUs, 2023 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m11.0s), 20/20 VUs, 2215 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m12.0s), 20/20 VUs, 2394 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m13.0s), 20/20 VUs, 2544 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m14.0s), 20/20 VUs, 2689 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m15.0s), 20/20 VUs, 2787 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m16.0s), 20/20 VUs, 2992 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m17.0s), 20/20 VUs, 3187 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m18.0s), 20/20 VUs, 3391 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m19.0s), 20/20 VUs, 3612 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m20.0s), 20/20 VUs, 3759 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m21.0s), 20/20 VUs, 3833 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m22.0s), 20/20 VUs, 4008 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m23.0s), 20/20 VUs, 4208 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m24.0s), 20/20 VUs, 4412 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m25.0s), 20/20 VUs, 4615 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m26.0s), 20/20 VUs, 4823 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m27.0s), 20/20 VUs, 5060 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m28.0s), 20/20 VUs, 5271 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m29.0s), 20/20 VUs, 5496 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m30.0s), 20/20 VUs, 5702 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5729 190.151701/s + checks_succeeded...: 100.00% 5729 out of 5729 + checks_failed......: 0.00% 0 out of 5729 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=52.56ms min=5.84ms med=43.69ms max=912.47ms p(90)=81.13ms p(95)=96.15ms + { expected_response:true }...: avg=52.56ms min=5.84ms med=43.69ms max=912.47ms p(90)=81.13ms p(95)=96.15ms + http_req_failed................: 0.00% 0 out of 5730 + http_reqs......................: 5730 190.184892/s + + EXECUTION + iteration_duration.............: avg=104.86ms min=63.75ms med=95.85ms max=965.61ms p(90)=133.37ms p(95)=148.35ms + iterations.....................: 5729 190.151701/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.6 MB 54 kB/s + data_sent......................: 2.7 MB 88 kB/s + + + + +running (0m30.1s), 00/20 VUs, 5729 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/exp-keepalive_off_container_ip-summary.json b/benchmarks/raw/exp-keepalive_off_container_ip-summary.json new file mode 100644 index 0000000..ac53823 --- /dev/null +++ b/benchmarks/raw/exp-keepalive_off_container_ip-summary.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 5729, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "checks": { + "fails": 0, + "passes": 5729, + "value": 1 + }, + "http_req_sending": { + "max": 1.31, + "p(90)": 0, + "p(95)": 0.5447, + "avg": 0.054291431064572404, + "min": 0, + "med": 0 + }, + "http_reqs": { + "rate": 190.18489164449795, + "count": 5730 + }, + "data_sent": { + "rate": 88235.93197211888, + "count": 2658423 + }, + "data_received": { + "count": 1627512, + "rate": 54018.881914506135 + }, + "http_req_duration": { + "avg": 52.56018509598597, + "min": 5.8451, + "med": 43.6903, + "max": 912.4729, + "p(90)": 81.13408000000004, + "p(95)": 96.15017500000002 + }, + "iterations": { + "count": 5729, + "rate": 190.1517005639317 + }, + "http_req_failed": { + "passes": 0, + "fails": 5730, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_req_waiting": { + "p(90)": 80.74792000000002, + "p(95)": 95.850465, + "avg": 52.36632766143093, + "min": 5.3019, + "med": 43.558, + "max": 912.4729 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 96.15017500000002, + "avg": 52.56018509598597, + "min": 5.8451, + "med": 43.6903, + "max": 912.4729, + "p(90)": 81.13408000000004 + }, + "http_req_connecting": { + "avg": 1.652181413612569, + "min": 0, + "med": 1.60985, + "max": 376.9554, + "p(90)": 2.1921200000000005, + "p(95)": 2.5378950000000002 + }, + "iteration_duration": { + "min": 63.7586, + "med": 95.8529, + "max": 965.6174, + "p(90)": 133.37671999999998, + "p(95)": 148.35476, + "avg": 104.86880209460634 + }, + "http_req_receiving": { + "max": 22.9098, + "p(90)": 0.5454, + "p(95)": 0.5637650000000001, + "avg": 0.139566003490401, + "min": 0, + "med": 0 + }, + "http_req_blocked": { + "avg": 1.7274185863874387, + "min": 0, + "med": 1.6201500000000002, + "max": 376.9554, + "p(90)": 2.23348, + "p(95)": 2.674685 + } + } +} diff --git a/benchmarks/raw/exp-keepalive_off_container_ip-warmup.json b/benchmarks/raw/exp-keepalive_off_container_ip-warmup.json new file mode 100644 index 0000000..f5f34d0 --- /dev/null +++ b/benchmarks/raw/exp-keepalive_off_container_ip-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 444652, + "rate": 43529.14534096481 + }, + "checks": { + "fails": 0, + "passes": 1564, + "value": 1 + }, + "http_req_waiting": { + "p(90)": 128.34344000000002, + "p(95)": 145.71943999999996, + "avg": 75.77687079872203, + "min": 15.015, + "med": 66.8983, + "max": 237.6662 + }, + "data_sent": { + "rate": 71058.25684946596, + "count": 725863 + }, + "http_req_blocked": { + "max": 51.9371, + "p(90)": 2.41392, + "p(95)": 3.3150599999999995, + "avg": 1.6203628115015967, + "min": 0, + "med": 1.1946 + }, + "http_req_sending": { + "p(95)": 0.5519, + "avg": 0.08471520766773163, + "min": 0, + "med": 0, + "max": 12.5673, + "p(90)": 0.52656 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration": { + "avg": 76.08569188498399, + "min": 15.015, + "med": 67.3483, + "max": 237.6662, + "p(90)": 128.39068, + "p(95)": 146.43279999999996 + }, + "http_req_receiving": { + "avg": 0.2241058785942491, + "min": 0, + "med": 0, + "max": 10.8595, + "p(90)": 0.56706, + "p(95)": 0.7400599999999997 + }, + "iteration_duration": { + "max": 291.9765, + "p(90)": 182.28548, + "p(95)": 200.27324499999997, + "avg": 128.58809488491056, + "min": 66.6183, + "med": 119.74414999999999 + }, + "iterations": { + "count": 1564, + "rate": 153.10756122376367 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_failed": { + "passes": 0, + "fails": 1565, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration{expected_response:true}": { + "min": 15.015, + "med": 67.3483, + "max": 237.6662, + "p(90)": 128.39068, + "p(95)": 146.43279999999996, + "avg": 76.08569188498399 + }, + "http_req_connecting": { + "med": 1.1132, + "max": 14.2601, + "p(90)": 2.1801800000000005, + "p(95)": 3.018219999999999, + "avg": 1.4603324600638985, + "min": 0 + }, + "http_reqs": { + "count": 1565, + "rate": 153.20545608388116 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 1564, + "fails": 0 + } + } + } +} diff --git a/benchmarks/raw/exp-keepalive_off_container_ip-warmup.txt b/benchmarks/raw/exp-keepalive_off_container_ip-warmup.txt new file mode 100644 index 0000000..b960453 --- /dev/null +++ b/benchmarks/raw/exp-keepalive_off_container_ip-warmup.txt @@ -0,0 +1,82 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 40s max duration (incl. graceful stop): + * default: 20 looping VUs for 10s (gracefulStop: 30s) + + +running (01.0s), 20/20 VUs, 97 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 00.9s/10s + +running (02.0s), 20/20 VUs, 210 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 01.9s/10s + +running (03.0s), 20/20 VUs, 326 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 02.9s/10s + +running (04.0s), 20/20 VUs, 443 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 03.9s/10s + +running (05.0s), 20/20 VUs, 592 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 04.9s/10s + +running (06.0s), 20/20 VUs, 772 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 05.9s/10s + +running (07.0s), 20/20 VUs, 933 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 06.9s/10s + +running (08.0s), 20/20 VUs, 1105 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 07.9s/10s + +running (09.0s), 20/20 VUs, 1328 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 08.9s/10s + +running (10.0s), 20/20 VUs, 1527 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 09.9s/10s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 1564 153.107561/s + checks_succeeded...: 100.00% 1564 out of 1564 + checks_failed......: 0.00% 0 out of 1564 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=76.08ms min=15.01ms med=67.34ms max=237.66ms p(90)=128.39ms p(95)=146.43ms + { expected_response:true }...: avg=76.08ms min=15.01ms med=67.34ms max=237.66ms p(90)=128.39ms p(95)=146.43ms + http_req_failed................: 0.00% 0 out of 1565 + http_reqs......................: 1565 153.205456/s + + EXECUTION + iteration_duration.............: avg=128.58ms min=66.61ms med=119.74ms max=291.97ms p(90)=182.28ms p(95)=200.27ms + iterations.....................: 1564 153.107561/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 445 kB 44 kB/s + data_sent......................: 726 kB 71 kB/s + + + + +running (10.2s), 00/20 VUs, 1564 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 10s diff --git a/benchmarks/raw/exp-keepalive_off_hostname-raw.txt b/benchmarks/raw/exp-keepalive_off_hostname-raw.txt new file mode 100644 index 0000000..e08bf2c --- /dev/null +++ b/benchmarks/raw/exp-keepalive_off_hostname-raw.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 88 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m02.0s), 20/20 VUs, 210 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m03.0s), 20/20 VUs, 333 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m04.0s), 20/20 VUs, 430 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m05.0s), 20/20 VUs, 525 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m06.0s), 20/20 VUs, 624 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m07.0s), 20/20 VUs, 769 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m08.0s), 20/20 VUs, 958 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m09.0s), 20/20 VUs, 1145 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m10.0s), 20/20 VUs, 1294 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m11.0s), 20/20 VUs, 1415 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m12.0s), 20/20 VUs, 1570 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m13.0s), 20/20 VUs, 1726 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m14.0s), 20/20 VUs, 1873 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m15.0s), 20/20 VUs, 2019 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m16.0s), 20/20 VUs, 2162 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m17.0s), 20/20 VUs, 2297 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m18.0s), 20/20 VUs, 2488 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m19.0s), 20/20 VUs, 2663 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m20.0s), 20/20 VUs, 2841 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m21.0s), 20/20 VUs, 2971 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m22.0s), 20/20 VUs, 3104 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m23.0s), 20/20 VUs, 3205 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m24.0s), 20/20 VUs, 3329 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m25.0s), 20/20 VUs, 3485 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m26.0s), 20/20 VUs, 3651 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m27.0s), 20/20 VUs, 3771 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m28.0s), 20/20 VUs, 3911 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m29.0s), 20/20 VUs, 4045 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m30.0s), 20/20 VUs, 4199 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 4226 139.724931/s + checks_succeeded...: 100.00% 4226 out of 4226 + checks_failed......: 0.00% 0 out of 4226 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=88.36ms min=9.39ms med=79.63ms max=268.14ms p(90)=147.07ms p(95)=168.05ms + { expected_response:true }...: avg=88.36ms min=9.39ms med=79.63ms max=268.14ms p(90)=147.07ms p(95)=168.05ms + http_req_failed................: 0.00% 0 out of 4227 + http_reqs......................: 4227 139.757994/s + + EXECUTION + iteration_duration.............: avg=142.45ms min=66.42ms med=133.59ms max=331.64ms p(90)=201.97ms p(95)=226.84ms + iterations.....................: 4226 139.724931/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.2 MB 40 kB/s + data_sent......................: 2.0 MB 65 kB/s + + + + +running (0m30.2s), 00/20 VUs, 4226 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/exp-keepalive_off_hostname-summary.json b/benchmarks/raw/exp-keepalive_off_hostname-summary.json new file mode 100644 index 0000000..c3af531 --- /dev/null +++ b/benchmarks/raw/exp-keepalive_off_hostname-summary.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 4226, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + } + }, + "metrics": { + "http_req_receiving": { + "avg": 0.3154985095812643, + "min": 0, + "med": 0, + "max": 17.8745, + "p(90)": 0.7420200000000007, + "p(95)": 1.0908399999999991 + }, + "data_sent": { + "rate": 64837.88950510801, + "count": 1961031 + }, + "http_req_duration": { + "avg": 88.36255694345859, + "min": 9.3918, + "med": 79.6312, + "max": 268.1484, + "p(90)": 147.07598000000002, + "p(95)": 168.05122999999998 + }, + "http_req_duration{expected_response:true}": { + "avg": 88.36255694345859, + "min": 9.3918, + "med": 79.6312, + "max": 268.1484, + "p(90)": 147.07598000000002, + "p(95)": 168.05122999999998 + }, + "iterations": { + "count": 4226, + "rate": 139.72493094121737 + }, + "http_req_connecting": { + "p(90)": 3.6054200000000005, + "p(95)": 5.0529999999999955, + "avg": 2.2125250532292418, + "min": 0, + "med": 1.6478, + "max": 94.7916 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "checks": { + "passes": 4226, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "passes": 0, + "fails": 4227, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 4227, + "rate": 139.75799410518832 + }, + "http_req_blocked": { + "min": 0, + "med": 1.7286, + "max": 94.7916, + "p(90)": 3.8902, + "p(95)": 5.476149999999999, + "avg": 2.4214604920747616 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "iteration_duration": { + "p(90)": 201.97295000000003, + "p(95)": 226.842975, + "avg": 142.4579872929488, + "min": 66.4208, + "med": 133.59055, + "max": 331.6434 + }, + "data_received": { + "count": 1200660, + "rate": 39697.618453355906 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_sending": { + "p(90)": 0.5270600000000001, + "p(95)": 0.55548, + "avg": 0.09087653181925717, + "min": 0, + "med": 0, + "max": 10.2024 + }, + "http_req_waiting": { + "max": 267.6784, + "p(90)": 146.28866000000002, + "p(95)": 167.89045999999996, + "avg": 87.95618190205786, + "min": 8.8519, + "med": 79.3633 + } + } +} diff --git a/benchmarks/raw/exp-keepalive_off_hostname-warmup.json b/benchmarks/raw/exp-keepalive_off_hostname-warmup.json new file mode 100644 index 0000000..bf73eff --- /dev/null +++ b/benchmarks/raw/exp-keepalive_off_hostname-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 875, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "http_reqs": { + "count": 876, + "rate": 84.7427384107074 + }, + "iteration_duration": { + "avg": 232.02969519999994, + "min": 73.5635, + "med": 192.272, + "max": 1009.4477, + "p(90)": 366.55514000000005, + "p(95)": 495.8147899999999 + }, + "http_req_failed": { + "passes": 0, + "fails": 876, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_waiting": { + "avg": 176.52429931506873, + "min": 21.5477, + "med": 138.0246, + "max": 957.8494, + "p(90)": 307.209, + "p(95)": 435.0878 + }, + "http_req_connecting": { + "max": 46.5741, + "p(90)": 4.68965, + "p(95)": 6.6985, + "avg": 2.3085635844748857, + "min": 0, + "med": 1.2287 + }, + "http_req_sending": { + "p(95)": 0.568025, + "avg": 0.1077543378995434, + "min": 0, + "med": 0, + "max": 13.0083, + "p(90)": 0.5258499999999999 + }, + "checks": { + "passes": 875, + "fails": 0, + "value": 1 + }, + "http_req_receiving": { + "max": 33.3739, + "p(90)": 1.0115500000000002, + "p(95)": 1.5172500000000002, + "avg": 0.40642762557077616, + "min": 0, + "med": 0 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration{expected_response:true}": { + "min": 22.0947, + "med": 138.0377, + "max": 957.8494, + "p(90)": 307.209, + "p(95)": 435.220525, + "avg": 177.0384812785389 + }, + "http_req_blocked": { + "avg": 2.5717221461187187, + "min": 0, + "med": 1.52305, + "max": 46.5741, + "p(90)": 5.299799999999999, + "p(95)": 7.524 + }, + "iterations": { + "rate": 84.64600012485043, + "count": 875 + }, + "http_req_duration": { + "med": 138.0377, + "max": 957.8494, + "p(90)": 307.209, + "p(95)": 435.220525, + "avg": 177.0384812785389, + "min": 22.0947 + }, + "data_received": { + "count": 248976, + "rate": 24085.51145952544 + }, + "data_sent": { + "count": 406167, + "rate": 39291.89935166871 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + } + } +} diff --git a/benchmarks/raw/exp-keepalive_off_hostname-warmup.txt b/benchmarks/raw/exp-keepalive_off_hostname-warmup.txt new file mode 100644 index 0000000..ee67412 --- /dev/null +++ b/benchmarks/raw/exp-keepalive_off_hostname-warmup.txt @@ -0,0 +1,82 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 40s max duration (incl. graceful stop): + * default: 20 looping VUs for 10s (gracefulStop: 30s) + + +running (01.0s), 20/20 VUs, 61 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 00.9s/10s + +running (02.0s), 20/20 VUs, 176 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 01.9s/10s + +running (03.0s), 20/20 VUs, 316 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 02.9s/10s + +running (04.0s), 20/20 VUs, 416 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 03.9s/10s + +running (05.0s), 20/20 VUs, 526 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 04.9s/10s + +running (06.0s), 20/20 VUs, 548 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 05.9s/10s + +running (07.0s), 20/20 VUs, 627 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 06.9s/10s + +running (08.0s), 20/20 VUs, 710 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 07.9s/10s + +running (09.0s), 20/20 VUs, 786 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 08.9s/10s + +running (10.0s), 20/20 VUs, 847 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 09.9s/10s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 875 84.646/s + checks_succeeded...: 100.00% 875 out of 875 + checks_failed......: 0.00% 0 out of 875 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=177.03ms min=22.09ms med=138.03ms max=957.84ms p(90)=307.2ms p(95)=435.22ms + { expected_response:true }...: avg=177.03ms min=22.09ms med=138.03ms max=957.84ms p(90)=307.2ms p(95)=435.22ms + http_req_failed................: 0.00% 0 out of 876 + http_reqs......................: 876 84.742738/s + + EXECUTION + iteration_duration.............: avg=232.02ms min=73.56ms med=192.27ms max=1s p(90)=366.55ms p(95)=495.81ms + iterations.....................: 875 84.646/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 249 kB 24 kB/s + data_sent......................: 406 kB 39 kB/s + + + + +running (10.3s), 00/20 VUs, 875 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 10s diff --git a/benchmarks/raw/exp-keepalive_on_hostname-raw.txt b/benchmarks/raw/exp-keepalive_on_hostname-raw.txt new file mode 100644 index 0000000..136242c --- /dev/null +++ b/benchmarks/raw/exp-keepalive_on_hostname-raw.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 213 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m02.0s), 20/20 VUs, 430 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m03.0s), 20/20 VUs, 674 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m04.0s), 20/20 VUs, 923 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m05.0s), 20/20 VUs, 1177 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m06.0s), 20/20 VUs, 1447 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m07.0s), 20/20 VUs, 1700 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m08.0s), 20/20 VUs, 1930 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m09.0s), 20/20 VUs, 2141 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m10.0s), 20/20 VUs, 2381 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m11.0s), 20/20 VUs, 2622 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m12.0s), 20/20 VUs, 2858 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m13.0s), 20/20 VUs, 3128 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m14.0s), 20/20 VUs, 3410 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m15.0s), 20/20 VUs, 3664 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m16.0s), 20/20 VUs, 3903 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m17.0s), 20/20 VUs, 4071 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m18.0s), 20/20 VUs, 4314 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m19.0s), 20/20 VUs, 4515 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m20.0s), 20/20 VUs, 4777 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m21.0s), 20/20 VUs, 4991 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m22.0s), 20/20 VUs, 5218 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m23.0s), 20/20 VUs, 5469 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m24.0s), 20/20 VUs, 5696 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m25.0s), 20/20 VUs, 5750 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m26.0s), 20/20 VUs, 5858 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m27.0s), 20/20 VUs, 6014 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m28.0s), 20/20 VUs, 6211 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m29.0s), 20/20 VUs, 6392 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m30.0s), 20/20 VUs, 6584 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6614 219.528502/s + checks_succeeded...: 100.00% 6614 out of 6614 + checks_failed......: 0.00% 0 out of 6614 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=40.23ms min=5.75ms med=32.31ms max=928.12ms p(90)=61.68ms p(95)=78.03ms + { expected_response:true }...: avg=40.23ms min=5.75ms med=32.31ms max=928.12ms p(90)=61.68ms p(95)=78.03ms + http_req_failed................: 0.00% 0 out of 6615 + http_reqs......................: 6615 219.561694/s + + EXECUTION + iteration_duration.............: avg=90.85ms min=58.91ms med=82.9ms max=978.32ms p(90)=112.44ms p(95)=128.88ms + iterations.....................: 6614 219.528502/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.1 MB 69 kB/s + data_sent......................: 3.1 MB 102 kB/s + + + + +running (0m30.1s), 00/20 VUs, 6614 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/exp-keepalive_on_hostname-summary.json b/benchmarks/raw/exp-keepalive_on_hostname-summary.json new file mode 100644 index 0000000..5145d37 --- /dev/null +++ b/benchmarks/raw/exp-keepalive_on_hostname-summary.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "iteration_duration": { + "p(95)": 128.88615499999997, + "avg": 90.8527234200182, + "min": 58.9158, + "med": 82.9058, + "max": 978.326, + "p(90)": 112.44148 + }, + "http_req_duration": { + "avg": 40.23359501133794, + "min": 5.754, + "med": 32.3181, + "max": 928.1289, + "p(90)": 61.680560000000085, + "p(95)": 78.03037999999987 + }, + "http_req_duration{expected_response:true}": { + "max": 928.1289, + "p(90)": 61.680560000000085, + "p(95)": 78.03037999999987, + "avg": 40.23359501133794, + "min": 5.754, + "med": 32.3181 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 2.7144, + "p(90)": 0, + "p(95)": 0, + "avg": 0.015006863189720335 + }, + "iterations": { + "count": 6614, + "rate": 219.52850210004038 + }, + "vus": { + "min": 20, + "max": 20, + "value": 20 + }, + "data_received": { + "count": 2064044, + "rate": 68508.69180353428 + }, + "http_req_waiting": { + "avg": 40.11467417989425, + "min": 5.754, + "med": 32.2429, + "max": 928.1289, + "p(90)": 61.50326000000001, + "p(95)": 77.73469999999999 + }, + "http_req_connecting": { + "avg": 0.0027879365079365084, + "min": 0, + "med": 0, + "max": 1.6185, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "checks": { + "passes": 6614, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 6615, + "rate": 219.56169358811115 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 2.5906, + "p(90)": 0.5399, + "p(95)": 0.55543, + "avg": 0.10391396825396813 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_failed": { + "fails": 6615, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "avg": 0.014855283446712013, + "min": 0, + "med": 0, + "max": 39.7093, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 3069063, + "rate": 101866.76795292656 + } + }, + "root_group": { + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6614, + "fails": 0, + "name": "status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + } +} diff --git a/benchmarks/raw/exp-keepalive_on_hostname-warmup.json b/benchmarks/raw/exp-keepalive_on_hostname-warmup.json new file mode 100644 index 0000000..ec18339 --- /dev/null +++ b/benchmarks/raw/exp-keepalive_on_hostname-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 2099, + "fails": 0 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + }, + "metrics": { + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_failed": { + "passes": 0, + "fails": 2100, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_sending": { + "avg": 0.019287619047619046, + "min": 0, + "med": 0, + "max": 4.8832, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 655364, + "rate": 64327.36524048414 + }, + "checks": { + "passes": 2099, + "fails": 0, + "value": 1 + }, + "http_req_connecting": { + "med": 0, + "max": 5.6303, + "p(90)": 0, + "p(95)": 0, + "avg": 0.023388999999999997, + "min": 0 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_receiving": { + "med": 0, + "max": 1.6633, + "p(90)": 0.5358300000000001, + "p(95)": 0.5522, + "avg": 0.10319480952380956, + "min": 0 + }, + "data_sent": { + "count": 974103, + "rate": 95613.24616984045 + }, + "http_reqs": { + "count": 2100, + "rate": 206.12585830930092 + }, + "http_req_waiting": { + "p(95)": 93.80055999999999, + "avg": 45.00216380952387, + "min": 9.5221, + "med": 41.50045, + "max": 258.8133, + "p(90)": 77.56337000000003 + }, + "http_req_blocked": { + "avg": 0.05180561904761905, + "min": 0, + "med": 0, + "max": 42.5033, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 2099, + "rate": 206.02770313867745 + }, + "iteration_duration": { + "avg": 95.71889976179142, + "min": 60.2902, + "med": 92.1419, + "max": 314.9057, + "p(90)": 128.33068, + "p(95)": 144.61884999999998 + }, + "http_req_duration": { + "p(95)": 93.89481, + "avg": 45.12464623809525, + "min": 9.9675, + "med": 41.57665, + "max": 259.3636, + "p(90)": 77.57232000000005 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 93.89481, + "avg": 45.12464623809525, + "min": 9.9675, + "med": 41.57665, + "max": 259.3636, + "p(90)": 77.57232000000005 + } + } +} diff --git a/benchmarks/raw/exp-keepalive_on_hostname-warmup.txt b/benchmarks/raw/exp-keepalive_on_hostname-warmup.txt new file mode 100644 index 0000000..9a2040a --- /dev/null +++ b/benchmarks/raw/exp-keepalive_on_hostname-warmup.txt @@ -0,0 +1,82 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 40s max duration (incl. graceful stop): + * default: 20 looping VUs for 10s (gracefulStop: 30s) + + +running (01.0s), 20/20 VUs, 185 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 00.9s/10s + +running (02.0s), 20/20 VUs, 397 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 01.9s/10s + +running (03.0s), 20/20 VUs, 596 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 02.9s/10s + +running (04.0s), 20/20 VUs, 815 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 03.9s/10s + +running (05.0s), 20/20 VUs, 1036 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 04.9s/10s + +running (06.0s), 20/20 VUs, 1235 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 05.9s/10s + +running (07.0s), 20/20 VUs, 1453 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 06.9s/10s + +running (08.0s), 20/20 VUs, 1711 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 07.9s/10s + +running (09.0s), 20/20 VUs, 1881 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 08.9s/10s + +running (10.0s), 20/20 VUs, 2059 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 09.9s/10s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 2099 206.027703/s + checks_succeeded...: 100.00% 2099 out of 2099 + checks_failed......: 0.00% 0 out of 2099 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=45.12ms min=9.96ms med=41.57ms max=259.36ms p(90)=77.57ms p(95)=93.89ms + { expected_response:true }...: avg=45.12ms min=9.96ms med=41.57ms max=259.36ms p(90)=77.57ms p(95)=93.89ms + http_req_failed................: 0.00% 0 out of 2100 + http_reqs......................: 2100 206.125858/s + + EXECUTION + iteration_duration.............: avg=95.71ms min=60.29ms med=92.14ms max=314.9ms p(90)=128.33ms p(95)=144.61ms + iterations.....................: 2099 206.027703/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 655 kB 64 kB/s + data_sent......................: 974 kB 96 kB/s + + + + +running (10.2s), 00/20 VUs, 2099 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 10s diff --git a/benchmarks/raw/experiment-keepalive-dns.json b/benchmarks/raw/experiment-keepalive-dns.json new file mode 100644 index 0000000..4e5e28d --- /dev/null +++ b/benchmarks/raw/experiment-keepalive-dns.json @@ -0,0 +1,50 @@ +[ + { + "scenario": "keepalive_off_hostname", + "config": { + "keepAlive": false, + "targetUrl": "http://payment-service:8000" + }, + "vus": 20, + "durationSec": 31.31, + "acceptedReqs": 4227, + "acceptedRate": 139.76, + "p50": 79.63, + "p95": 168.05, + "gatewayActiveOpens": 4236, + "paymentPassiveOpens": 4235, + "newConnectionsPerSec": 135.28 + }, + { + "scenario": "keepalive_off_container_ip", + "config": { + "keepAlive": false, + "targetUrl": "http://172.18.0.3:8000" + }, + "vus": 20, + "durationSec": 30.92, + "acceptedReqs": 5730, + "acceptedRate": 190.18, + "p50": 43.69, + "p95": 96.15, + "gatewayActiveOpens": 5739, + "paymentPassiveOpens": 5738, + "newConnectionsPerSec": 185.6 + }, + { + "scenario": "keepalive_on_hostname", + "config": { + "keepAlive": true, + "targetUrl": "http://payment-service:8000" + }, + "vus": 20, + "durationSec": 30.87, + "acceptedReqs": 6615, + "acceptedRate": 219.56, + "p50": 32.32, + "p95": 78.03, + "gatewayActiveOpens": 34, + "paymentPassiveOpens": 35, + "newConnectionsPerSec": 1.1 + } +] \ No newline at end of file diff --git a/benchmarks/raw/experiment-runner.log b/benchmarks/raw/experiment-runner.log new file mode 100644 index 0000000..885f257 Binary files /dev/null and b/benchmarks/raw/experiment-runner.log differ diff --git a/benchmarks/raw/fix_a-100vu-run1.json b/benchmarks/raw/fix_a-100vu-run1.json new file mode 100644 index 0000000..ad6c569 --- /dev/null +++ b/benchmarks/raw/fix_a-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10163, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + } + }, + "metrics": { + "vus": { + "min": 0, + "max": 100, + "value": 100 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 10.0949, + "p(90)": 0, + "p(95)": 0, + "avg": 0.01736784730421094 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "data_received": { + "count": 3365822, + "rate": 106070.9001461319 + }, + "checks": { + "passes": 10163, + "fails": 0, + "value": 1 + }, + "http_req_receiving": { + "med": 0, + "max": 4.3367, + "p(90)": 0.5315, + "p(95)": 0.5484, + "avg": 0.0798985340417159, + "min": 0 + }, + "iterations": { + "count": 10163, + "rate": 320.27794642293577 + }, + "http_req_waiting": { + "p(90)": 373.04996000000006, + "p(95)": 429.0035500000001, + "avg": 245.52033835104345, + "min": 27.8763, + "med": 215.15314999999998, + "max": 4294.5947 + }, + "http_req_blocked": { + "avg": 0.031100275482093664, + "min": 0, + "med": 0, + "max": 36.0022, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "avg": 0.014743781975600155, + "min": 0, + "med": 0, + "max": 25.5222, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "min": 27.8763, + "med": 215.20229999999998, + "max": 4294.5947, + "p(90)": 373.09508000000005, + "p(95)": 429.09296500000005, + "avg": 245.6149806670612 + }, + "iteration_duration": { + "p(95)": 479.29416, + "avg": 296.07029688084214, + "min": 78.4634, + "med": 265.5764, + "max": 4350.193, + "p(90)": 424.2319200000002 + }, + "http_req_failed": { + "passes": 0, + "fails": 10164, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 429.09296500000005, + "avg": 245.6149806670612, + "min": 27.8763, + "med": 215.20229999999998, + "max": 4294.5947, + "p(90)": 373.09508000000005 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_reqs": { + "count": 10164, + "rate": 320.30946053751046 + }, + "data_sent": { + "count": 4614167, + "rate": 145411.38750491766 + } + } +} diff --git a/benchmarks/raw/fix_a-100vu-run1.txt b/benchmarks/raw/fix_a-100vu-run1.txt new file mode 100644 index 0000000..b9c1399 --- /dev/null +++ b/benchmarks/raw/fix_a-100vu-run1.txt @@ -0,0 +1,148 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m01.9s), 100/100 VUs, 64 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 00.4s/30s + +running (0m02.9s), 100/100 VUs, 313 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.4s/30s + +running (0m03.9s), 100/100 VUs, 598 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 02.4s/30s + +running (0m04.9s), 100/100 VUs, 1003 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 03.4s/30s + +running (0m05.9s), 100/100 VUs, 1290 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.4s/30s + +running (0m06.9s), 100/100 VUs, 1659 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 05.4s/30s + +running (0m07.9s), 100/100 VUs, 2032 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 06.4s/30s + +running (0m08.9s), 100/100 VUs, 2405 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.4s/30s + +running (0m09.9s), 100/100 VUs, 2744 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 08.4s/30s + +running (0m10.9s), 100/100 VUs, 3021 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 09.4s/30s + +running (0m11.9s), 100/100 VUs, 3336 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.4s/30s + +running (0m12.9s), 100/100 VUs, 3745 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 11.4s/30s + +running (0m13.9s), 100/100 VUs, 4069 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 12.4s/30s + +running (0m14.9s), 100/100 VUs, 4250 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.4s/30s + +running (0m15.9s), 100/100 VUs, 4546 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 14.4s/30s + +running (0m16.9s), 100/100 VUs, 4874 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 15.4s/30s + +running (0m17.9s), 100/100 VUs, 5273 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.4s/30s + +running (0m18.9s), 100/100 VUs, 5610 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 17.4s/30s + +running (0m19.9s), 100/100 VUs, 5946 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 18.4s/30s + +running (0m20.9s), 100/100 VUs, 6284 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.4s/30s + +running (0m21.9s), 100/100 VUs, 6661 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 20.4s/30s + +running (0m22.9s), 100/100 VUs, 7027 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 21.4s/30s + +running (0m23.9s), 100/100 VUs, 7397 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.4s/30s + +running (0m24.9s), 100/100 VUs, 7898 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 23.4s/30s + +running (0m25.9s), 100/100 VUs, 8292 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 24.4s/30s + +running (0m26.9s), 100/100 VUs, 8659 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.4s/30s + +running (0m27.9s), 100/100 VUs, 8950 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 26.4s/30s + +running (0m28.9s), 100/100 VUs, 9242 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 27.4s/30s + +running (0m29.9s), 100/100 VUs, 9536 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.4s/30s + +running (0m30.9s), 100/100 VUs, 9858 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 29.4s/30s + +running (0m31.7s), 000/100 VUs, 10163 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10163 320.277946/s + checks_succeeded...: 100.00% 10163 out of 10163 + checks_failed......: 0.00% 0 out of 10163 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=245.61ms min=27.87ms med=215.2ms max=4.29s p(90)=373.09ms p(95)=429.09ms + { expected_response:true }...: avg=245.61ms min=27.87ms med=215.2ms max=4.29s p(90)=373.09ms p(95)=429.09ms + http_req_failed................: 0.00% 0 out of 10164 + http_reqs......................: 10164 320.309461/s + + EXECUTION + iteration_duration.............: avg=296.07ms min=78.46ms med=265.57ms max=4.35s p(90)=424.23ms p(95)=479.29ms + iterations.....................: 10163 320.277946/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.4 MB 106 kB/s + data_sent......................: 4.6 MB 145 kB/s + + + + +running (0m31.7s), 000/100 VUs, 10163 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_a-100vu-run2.json b/benchmarks/raw/fix_a-100vu-run2.json new file mode 100644 index 0000000..433a3ec --- /dev/null +++ b/benchmarks/raw/fix_a-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_duration{expected_response:true}": { + "p(90)": 317.08673999999996, + "p(95)": 370.5308399999997, + "avg": 213.3502617913335, + "min": 62.3308, + "med": 196.7474, + "max": 1321.8988 + }, + "checks": { + "passes": 11376, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "fails": 11377, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration": { + "min": 62.3308, + "med": 196.7474, + "max": 1321.8988, + "p(90)": 317.08673999999996, + "p(95)": 370.5308399999997, + "avg": 213.3502617913335 + }, + "http_req_connecting": { + "max": 21.9953, + "p(90)": 0, + "p(95)": 0, + "avg": 0.027995772171925802, + "min": 0, + "med": 0 + }, + "http_req_sending": { + "avg": 0.01870034279687088, + "min": 0, + "med": 0, + "max": 26.7439, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 3744278, + "rate": 118883.19876965025 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 5166657, + "rate": 164044.63319913874 + }, + "iterations": { + "count": 11376, + "rate": 361.19520751491774 + }, + "http_req_blocked": { + "max": 38.308, + "p(90)": 0, + "p(95)": 0, + "avg": 0.057664067856201096, + "min": 0, + "med": 0 + }, + "http_reqs": { + "count": 11377, + "rate": 361.2269581484897 + }, + "http_req_waiting": { + "avg": 213.25362908499616, + "min": 62.3308, + "med": 196.656, + "max": 1320.2842, + "p(90)": 316.8287799999999, + "p(95)": 370.3380799999999 + }, + "http_req_receiving": { + "p(95)": 0.5456, + "avg": 0.07793236354047652, + "min": 0, + "med": 0, + "max": 9.7701, + "p(90)": 0.5307 + }, + "iteration_duration": { + "p(95)": 422.061675, + "avg": 263.85276101441616, + "min": 112.8667, + "med": 247.3914, + "max": 1060.7694, + "p(90)": 367.6963 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + } + }, + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 11376 + } + }, + "name": "", + "path": "" + } +} diff --git a/benchmarks/raw/fix_a-100vu-run2.txt b/benchmarks/raw/fix_a-100vu-run2.txt new file mode 100644 index 0000000..7793780 --- /dev/null +++ b/benchmarks/raw/fix_a-100vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 115 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.6s/30s + +running (0m03.0s), 100/100 VUs, 493 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.6s/30s + +running (0m04.0s), 100/100 VUs, 932 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.6s/30s + +running (0m05.0s), 100/100 VUs, 1339 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.6s/30s + +running (0m06.0s), 100/100 VUs, 1713 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.6s/30s + +running (0m07.0s), 100/100 VUs, 2070 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.6s/30s + +running (0m08.0s), 100/100 VUs, 2502 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.6s/30s + +running (0m09.0s), 100/100 VUs, 2911 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.6s/30s + +running (0m10.0s), 100/100 VUs, 3328 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.6s/30s + +running (0m11.0s), 100/100 VUs, 3744 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.6s/30s + +running (0m12.0s), 100/100 VUs, 4076 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.6s/30s + +running (0m13.0s), 100/100 VUs, 4483 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.6s/30s + +running (0m14.0s), 100/100 VUs, 4894 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.6s/30s + +running (0m15.0s), 100/100 VUs, 5309 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.6s/30s + +running (0m16.0s), 100/100 VUs, 5836 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.6s/30s + +running (0m17.0s), 100/100 VUs, 6233 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.6s/30s + +running (0m18.0s), 100/100 VUs, 6601 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.6s/30s + +running (0m19.0s), 100/100 VUs, 6993 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.6s/30s + +running (0m20.0s), 100/100 VUs, 7358 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.6s/30s + +running (0m21.0s), 100/100 VUs, 7737 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.6s/30s + +running (0m22.0s), 100/100 VUs, 8105 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.6s/30s + +running (0m23.0s), 100/100 VUs, 8546 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.6s/30s + +running (0m24.0s), 100/100 VUs, 8969 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.6s/30s + +running (0m25.0s), 100/100 VUs, 9290 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.6s/30s + +running (0m26.0s), 100/100 VUs, 9657 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.6s/30s + +running (0m27.0s), 100/100 VUs, 9978 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.6s/30s + +running (0m28.0s), 100/100 VUs, 10306 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.6s/30s + +running (0m29.0s), 100/100 VUs, 10498 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.6s/30s + +running (0m30.0s), 100/100 VUs, 10765 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.6s/30s + +running (0m31.0s), 100/100 VUs, 11117 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 11376 361.195208/s + checks_succeeded...: 100.00% 11376 out of 11376 + checks_failed......: 0.00% 0 out of 11376 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=213.35ms min=62.33ms med=196.74ms max=1.32s p(90)=317.08ms p(95)=370.53ms + { expected_response:true }...: avg=213.35ms min=62.33ms med=196.74ms max=1.32s p(90)=317.08ms p(95)=370.53ms + http_req_failed................: 0.00% 0 out of 11377 + http_reqs......................: 11377 361.226958/s + + EXECUTION + iteration_duration.............: avg=263.85ms min=112.86ms med=247.39ms max=1.06s p(90)=367.69ms p(95)=422.06ms + iterations.....................: 11376 361.195208/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.7 MB 119 kB/s + data_sent......................: 5.2 MB 164 kB/s + + + + +running (0m31.5s), 000/100 VUs, 11376 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_a-100vu-run3.json b/benchmarks/raw/fix_a-100vu-run3.json new file mode 100644 index 0000000..47bc2a2 --- /dev/null +++ b/benchmarks/raw/fix_a-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10604, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_failed": { + "passes": 0, + "fails": 10605, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "max": 21.5499, + "p(90)": 0, + "p(95)": 0, + "avg": 0.016258161244695885, + "min": 0, + "med": 0 + }, + "data_received": { + "count": 3503414, + "rate": 111976.96647414903 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_duration": { + "p(95)": 399.3746, + "avg": 232.4339994530892, + "min": 26.4648, + "med": 204.9555, + "max": 3472.5802, + "p(90)": 347.89726 + }, + "http_req_blocked": { + "max": 28.9825, + "p(90)": 0, + "p(95)": 0, + "avg": 0.030546468646864694, + "min": 0, + "med": 0 + }, + "http_req_sending": { + "avg": 0.017651400282885425, + "min": 0, + "med": 0, + "max": 39.3729, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 10604, + "fails": 0, + "value": 1 + }, + "http_req_duration{expected_response:true}": { + "med": 204.9555, + "max": 3472.5802, + "p(90)": 347.89726, + "p(95)": 399.3746, + "avg": 232.4339994530892, + "min": 26.4648 + }, + "data_sent": { + "count": 4814773, + "rate": 153890.94032324982 + }, + "iteration_duration": { + "max": 3524.5676, + "p(90)": 398.5231500000001, + "p(95)": 449.78031500000003, + "avg": 282.8761155224455, + "min": 77.22, + "med": 255.39524999999998 + }, + "http_reqs": { + "count": 10605, + "rate": 338.95957756016 + }, + "http_req_receiving": { + "avg": 0.08050098066949551, + "min": 0, + "med": 0, + "max": 2.3353, + "p(90)": 0.5317, + "p(95)": 0.5476 + }, + "http_req_waiting": { + "med": 204.822, + "max": 3472.5802, + "p(90)": 347.88838000000004, + "p(95)": 399.2443399999999, + "avg": 232.33584707213635, + "min": 26.4648 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 10604, + "rate": 338.92761531805155 + } + } +} diff --git a/benchmarks/raw/fix_a-100vu-run3.txt b/benchmarks/raw/fix_a-100vu-run3.txt new file mode 100644 index 0000000..e9cc42e --- /dev/null +++ b/benchmarks/raw/fix_a-100vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 166 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.8s/30s + +running (0m03.0s), 100/100 VUs, 544 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.8s/30s + +running (0m04.0s), 100/100 VUs, 845 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.8s/30s + +running (0m05.0s), 100/100 VUs, 1214 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.8s/30s + +running (0m06.0s), 100/100 VUs, 1607 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.8s/30s + +running (0m07.0s), 100/100 VUs, 1901 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.8s/30s + +running (0m08.0s), 100/100 VUs, 2257 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.8s/30s + +running (0m09.0s), 100/100 VUs, 2635 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.8s/30s + +running (0m10.0s), 100/100 VUs, 3014 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.8s/30s + +running (0m11.0s), 100/100 VUs, 3406 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.8s/30s + +running (0m12.0s), 100/100 VUs, 3706 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.8s/30s + +running (0m13.0s), 100/100 VUs, 4104 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.8s/30s + +running (0m14.0s), 100/100 VUs, 4451 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.8s/30s + +running (0m15.0s), 100/100 VUs, 4805 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.8s/30s + +running (0m16.0s), 100/100 VUs, 5140 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.8s/30s + +running (0m17.0s), 100/100 VUs, 5498 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.8s/30s + +running (0m18.0s), 100/100 VUs, 5915 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.8s/30s + +running (0m19.0s), 100/100 VUs, 6249 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.8s/30s + +running (0m20.0s), 100/100 VUs, 6571 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.8s/30s + +running (0m21.0s), 100/100 VUs, 6981 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.8s/30s + +running (0m22.0s), 100/100 VUs, 7296 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.8s/30s + +running (0m23.0s), 100/100 VUs, 7734 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.8s/30s + +running (0m24.0s), 100/100 VUs, 8069 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.8s/30s + +running (0m25.0s), 100/100 VUs, 8399 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.8s/30s + +running (0m26.0s), 100/100 VUs, 8726 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.8s/30s + +running (0m27.0s), 100/100 VUs, 9014 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.8s/30s + +running (0m28.0s), 100/100 VUs, 9363 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.8s/30s + +running (0m29.0s), 100/100 VUs, 9691 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.8s/30s + +running (0m30.0s), 100/100 VUs, 10072 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.8s/30s + +running (0m31.0s), 100/100 VUs, 10442 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10604 338.927615/s + checks_succeeded...: 100.00% 10604 out of 10604 + checks_failed......: 0.00% 0 out of 10604 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=232.43ms min=26.46ms med=204.95ms max=3.47s p(90)=347.89ms p(95)=399.37ms + { expected_response:true }...: avg=232.43ms min=26.46ms med=204.95ms max=3.47s p(90)=347.89ms p(95)=399.37ms + http_req_failed................: 0.00% 0 out of 10605 + http_reqs......................: 10605 338.959578/s + + EXECUTION + iteration_duration.............: avg=282.87ms min=77.22ms med=255.39ms max=3.52s p(90)=398.52ms p(95)=449.78ms + iterations.....................: 10604 338.927615/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.5 MB 112 kB/s + data_sent......................: 4.8 MB 154 kB/s + + + + +running (0m31.3s), 000/100 VUs, 10604 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_a-100vu-warmup.json b/benchmarks/raw/fix_a-100vu-warmup.json new file mode 100644 index 0000000..55b47c2 --- /dev/null +++ b/benchmarks/raw/fix_a-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7715, + "fails": 0 + } + } + }, + "metrics": { + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration": { + "max": 3448.0938, + "p(90)": 499.25705, + "p(95)": 722.274725, + "avg": 339.66020785381136, + "min": 42.941, + "med": 270.2573 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_req_waiting": { + "min": 42.941, + "med": 270.1894, + "max": 3447.5549, + "p(90)": 499.25705, + "p(95)": 722.274725, + "avg": 339.55250081648603 + }, + "iterations": { + "count": 7715, + "rate": 247.17193813767275 + }, + "http_req_sending": { + "avg": 0.02424279419388284, + "min": 0, + "med": 0, + "max": 39.0456, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 7715, + "fails": 0, + "value": 1 + }, + "data_received": { + "count": 2602046, + "rate": 83363.9342765235 + }, + "http_req_blocked": { + "med": 0, + "max": 32.7685, + "p(90)": 0, + "p(95)": 0, + "avg": 0.04465255313634004, + "min": 0 + }, + "http_req_connecting": { + "avg": 0.03178746759979262, + "min": 0, + "med": 0, + "max": 17.2314, + "p(90)": 0, + "p(95)": 0 + }, + "http_reqs": { + "rate": 247.2039759780017, + "count": 7716 + }, + "http_req_receiving": { + "p(95)": 0.549, + "avg": 0.08346424313115616, + "min": 0, + "med": 0, + "max": 2.7448, + "p(90)": 0.53505 + }, + "data_sent": { + "count": 3501787, + "rate": 112189.69277191273 + }, + "http_req_duration{expected_response:true}": { + "avg": 339.66020785381136, + "min": 42.941, + "med": 270.2573, + "max": 3448.0938, + "p(90)": 499.25705, + "p(95)": 722.274725 + }, + "http_req_failed": { + "passes": 0, + "fails": 7716, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "iteration_duration": { + "max": 3498.4884, + "p(90)": 550.3089600000003, + "p(95)": 771.6873399999996, + "avg": 390.2300615683751, + "min": 93.2244, + "med": 320.7806 + } + } +} diff --git a/benchmarks/raw/fix_a-100vu-warmup.txt b/benchmarks/raw/fix_a-100vu-warmup.txt new file mode 100644 index 0000000..e1bbc7e --- /dev/null +++ b/benchmarks/raw/fix_a-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 210 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 01.0s/30s + +running (0m03.0s), 100/100 VUs, 491 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.0s/30s + +running (0m04.0s), 100/100 VUs, 812 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 03.0s/30s + +running (0m05.0s), 100/100 VUs, 1143 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 04.0s/30s + +running (0m06.0s), 100/100 VUs, 1485 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.0s/30s + +running (0m07.0s), 100/100 VUs, 1809 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 06.0s/30s + +running (0m08.0s), 100/100 VUs, 2126 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 07.0s/30s + +running (0m09.0s), 100/100 VUs, 2403 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.0s/30s + +running (0m10.0s), 100/100 VUs, 2637 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 09.0s/30s + +running (0m11.0s), 100/100 VUs, 2904 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 10.0s/30s + +running (0m12.0s), 100/100 VUs, 3157 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.0s/30s + +running (0m13.0s), 100/100 VUs, 3398 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 12.0s/30s + +running (0m14.0s), 100/100 VUs, 3601 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 13.0s/30s + +running (0m15.0s), 100/100 VUs, 3767 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.0s/30s + +running (0m16.0s), 100/100 VUs, 4088 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 15.0s/30s + +running (0m17.0s), 100/100 VUs, 4280 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 16.0s/30s + +running (0m18.0s), 100/100 VUs, 4454 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.0s/30s + +running (0m19.0s), 100/100 VUs, 4565 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 18.0s/30s + +running (0m20.0s), 100/100 VUs, 4624 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 19.0s/30s + +running (0m21.0s), 100/100 VUs, 4632 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.0s/30s + +running (0m22.0s), 100/100 VUs, 4662 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 21.0s/30s + +running (0m23.0s), 100/100 VUs, 4780 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 22.0s/30s + +running (0m24.0s), 100/100 VUs, 5151 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.0s/30s + +running (0m25.0s), 100/100 VUs, 5493 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 24.0s/30s + +running (0m26.0s), 100/100 VUs, 5816 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 25.0s/30s + +running (0m27.0s), 100/100 VUs, 6119 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.0s/30s + +running (0m28.0s), 100/100 VUs, 6482 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 27.0s/30s + +running (0m29.0s), 100/100 VUs, 6856 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 28.0s/30s + +running (0m30.0s), 100/100 VUs, 7199 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.0s/30s + +running (0m31.0s), 100/100 VUs, 7608 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7715 247.171938/s + checks_succeeded...: 100.00% 7715 out of 7715 + checks_failed......: 0.00% 0 out of 7715 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=339.66ms min=42.94ms med=270.25ms max=3.44s p(90)=499.25ms p(95)=722.27ms + { expected_response:true }...: avg=339.66ms min=42.94ms med=270.25ms max=3.44s p(90)=499.25ms p(95)=722.27ms + http_req_failed................: 0.00% 0 out of 7716 + http_reqs......................: 7716 247.203976/s + + EXECUTION + iteration_duration.............: avg=390.23ms min=93.22ms med=320.78ms max=3.49s p(90)=550.3ms p(95)=771.68ms + iterations.....................: 7715 247.171938/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.6 MB 83 kB/s + data_sent......................: 3.5 MB 112 kB/s + + + + +running (0m31.2s), 000/100 VUs, 7715 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_a-20vu-run1.json b/benchmarks/raw/fix_a-20vu-run1.json new file mode 100644 index 0000000..03779a2 --- /dev/null +++ b/benchmarks/raw/fix_a-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6513 + } + } + }, + "metrics": { + "http_req_duration": { + "avg": 41.57579052809344, + "min": 7.5849, + "med": 38.5161, + "max": 937.5428, + "p(90)": 65.71912, + "p(95)": 79.72677999999995 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_receiving": { + "max": 6.3712, + "p(90)": 0.54487, + "p(95)": 0.5761, + "avg": 0.11608182376420027, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "med": 89.1721, + "max": 200.7722, + "p(90)": 116.86422, + "p(95)": 131.22269999999992, + "avg": 92.17791013357959, + "min": 58.6836 + }, + "http_req_duration{expected_response:true}": { + "avg": 41.57579052809344, + "min": 7.5849, + "med": 38.5161, + "max": 937.5428, + "p(90)": 65.71912, + "p(95)": 79.72677999999995 + }, + "http_reqs": { + "count": 6514, + "rate": 209.8918409363973 + }, + "http_req_sending": { + "avg": 0.021572536076143692, + "min": 0, + "med": 0, + "max": 7.5762, + "p(90)": 0, + "p(95)": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "checks": { + "passes": 6513, + "fails": 0, + "value": 1 + }, + "http_req_connecting": { + "med": 0, + "max": 16.9649, + "p(90)": 0, + "p(95)": 0, + "avg": 0.0078241786920479, + "min": 0 + }, + "http_req_waiting": { + "avg": 41.43813616825308, + "min": 7.5849, + "med": 38.38565, + "max": 936.4776, + "p(90)": 65.66682, + "p(95)": 79.56285499999997 + }, + "iterations": { + "count": 6513, + "rate": 209.8596192844267 + }, + "data_sent": { + "count": 2965905, + "rate": 95566.3586878209 + }, + "http_req_failed": { + "passes": 0, + "fails": 6514, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "data_received": { + "count": 2227022, + "rate": 71758.3278148384 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.019184878722751004, + "min": 0, + "med": 0, + "max": 34.3134 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + } + } +} diff --git a/benchmarks/raw/fix_a-20vu-run1.txt b/benchmarks/raw/fix_a-20vu-run1.txt new file mode 100644 index 0000000..02fd474 --- /dev/null +++ b/benchmarks/raw/fix_a-20vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 177 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 01.0s/30s + +running (0m03.0s), 20/20 VUs, 386 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.0s/30s + +running (0m04.0s), 20/20 VUs, 550 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.0s/30s + +running (0m05.0s), 20/20 VUs, 764 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 04.0s/30s + +running (0m06.0s), 20/20 VUs, 975 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.0s/30s + +running (0m07.0s), 20/20 VUs, 1232 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.0s/30s + +running (0m08.0s), 20/20 VUs, 1442 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 07.0s/30s + +running (0m09.0s), 20/20 VUs, 1670 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m10.0s), 20/20 VUs, 1897 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.0s/30s + +running (0m11.0s), 20/20 VUs, 2108 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 10.0s/30s + +running (0m12.0s), 20/20 VUs, 2299 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m13.0s), 20/20 VUs, 2526 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m14.0s), 20/20 VUs, 2773 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m15.0s), 20/20 VUs, 3013 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.0s/30s + +running (0m16.0s), 20/20 VUs, 3258 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.0s/30s + +running (0m17.0s), 20/20 VUs, 3500 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m18.0s), 20/20 VUs, 3725 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.0s/30s + +running (0m19.0s), 20/20 VUs, 3950 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.0s/30s + +running (0m20.0s), 20/20 VUs, 4130 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 19.0s/30s + +running (0m21.0s), 20/20 VUs, 4356 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.0s/30s + +running (0m22.0s), 20/20 VUs, 4584 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.0s/30s + +running (0m23.0s), 20/20 VUs, 4830 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 22.0s/30s + +running (0m24.0s), 20/20 VUs, 5070 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.0s/30s + +running (0m25.0s), 20/20 VUs, 5263 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.0s/30s + +running (0m26.0s), 20/20 VUs, 5500 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 25.0s/30s + +running (0m27.0s), 20/20 VUs, 5744 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.0s/30s + +running (0m28.0s), 20/20 VUs, 5918 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m29.0s), 20/20 VUs, 6128 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m30.0s), 20/20 VUs, 6296 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m31.0s), 20/20 VUs, 6493 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6513 209.859619/s + checks_succeeded...: 100.00% 6513 out of 6513 + checks_failed......: 0.00% 0 out of 6513 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=41.57ms min=7.58ms med=38.51ms max=937.54ms p(90)=65.71ms p(95)=79.72ms + { expected_response:true }...: avg=41.57ms min=7.58ms med=38.51ms max=937.54ms p(90)=65.71ms p(95)=79.72ms + http_req_failed................: 0.00% 0 out of 6514 + http_reqs......................: 6514 209.891841/s + + EXECUTION + iteration_duration.............: avg=92.17ms min=58.68ms med=89.17ms max=200.77ms p(90)=116.86ms p(95)=131.22ms + iterations.....................: 6513 209.859619/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.2 MB 72 kB/s + data_sent......................: 3.0 MB 96 kB/s + + + + +running (0m31.0s), 00/20 VUs, 6513 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/fix_a-20vu-run2.json b/benchmarks/raw/fix_a-20vu-run2.json new file mode 100644 index 0000000..16a5509 --- /dev/null +++ b/benchmarks/raw/fix_a-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 6867, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "http_req_receiving": { + "avg": 0.09937862550960988, + "min": 0, + "med": 0, + "max": 17.0154, + "p(90)": 0.5374, + "p(95)": 0.551565 + }, + "http_req_duration": { + "avg": 36.98505126674435, + "min": 8.0763, + "med": 32.6616, + "max": 1141.382, + "p(90)": 61.6576, + "p(95)": 76.4545 + }, + "http_req_failed": { + "passes": 0, + "fails": 6868, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "max": 3.0015, + "p(90)": 0, + "p(95)": 0, + "avg": 0.004344845661036692, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "avg": 87.42998631134404, + "min": 58.5288, + "med": 83.2475, + "max": 217.0258, + "p(90)": 112.26792000000002, + "p(95)": 127.9603 + }, + "http_req_blocked": { + "avg": 0.015240928945835756, + "min": 0, + "med": 0, + "max": 40.6906, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "med": 32.6616, + "max": 1141.382, + "p(90)": 61.6576, + "p(95)": 76.4545, + "avg": 36.98505126674435, + "min": 8.0763 + }, + "http_req_sending": { + "avg": 0.015377096680256264, + "min": 0, + "med": 0, + "max": 3.9507, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "avg": 36.870295544554445, + "min": 8.0763, + "med": 32.6002, + "max": 1138.5662, + "p(90)": 61.45570000000001, + "p(95)": 76.35686499999996 + }, + "data_received": { + "count": 2337470, + "rate": 74728.47838157298 + }, + "iterations": { + "count": 6867, + "rate": 219.53670466198994 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_reqs": { + "count": 6868, + "rate": 219.5686744748139 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "data_sent": { + "count": 3127329, + "rate": 99980.12276887671 + }, + "checks": { + "passes": 6867, + "fails": 0, + "value": 1 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + } + } +} diff --git a/benchmarks/raw/fix_a-20vu-run2.txt b/benchmarks/raw/fix_a-20vu-run2.txt new file mode 100644 index 0000000..a428c20 --- /dev/null +++ b/benchmarks/raw/fix_a-20vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 183 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.8s/30s + +running (0m03.0s), 20/20 VUs, 403 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.8s/30s + +running (0m04.0s), 20/20 VUs, 662 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 02.8s/30s + +running (0m05.0s), 20/20 VUs, 923 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.8s/30s + +running (0m06.0s), 20/20 VUs, 1176 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.8s/30s + +running (0m07.0s), 20/20 VUs, 1411 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 05.8s/30s + +running (0m08.0s), 20/20 VUs, 1611 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.8s/30s + +running (0m09.0s), 20/20 VUs, 1825 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.8s/30s + +running (0m10.0s), 20/20 VUs, 2086 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 08.8s/30s + +running (0m11.0s), 20/20 VUs, 2362 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.8s/30s + +running (0m12.0s), 20/20 VUs, 2615 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.8s/30s + +running (0m13.0s), 20/20 VUs, 2861 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 11.8s/30s + +running (0m14.0s), 20/20 VUs, 3105 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.8s/30s + +running (0m15.0s), 20/20 VUs, 3285 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.8s/30s + +running (0m16.0s), 20/20 VUs, 3460 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 14.8s/30s + +running (0m17.0s), 20/20 VUs, 3659 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.8s/30s + +running (0m18.0s), 20/20 VUs, 3869 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.8s/30s + +running (0m19.0s), 20/20 VUs, 4074 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 17.8s/30s + +running (0m20.0s), 20/20 VUs, 4321 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.8s/30s + +running (0m21.0s), 20/20 VUs, 4519 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.8s/30s + +running (0m22.0s), 20/20 VUs, 4758 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 20.8s/30s + +running (0m23.0s), 20/20 VUs, 4955 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.8s/30s + +running (0m24.0s), 20/20 VUs, 5185 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.8s/30s + +running (0m25.0s), 20/20 VUs, 5398 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 23.8s/30s + +running (0m26.0s), 20/20 VUs, 5652 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.8s/30s + +running (0m27.0s), 20/20 VUs, 5904 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.8s/30s + +running (0m28.0s), 20/20 VUs, 6152 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 26.8s/30s + +running (0m29.0s), 20/20 VUs, 6374 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.8s/30s + +running (0m30.0s), 20/20 VUs, 6624 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.8s/30s + +running (0m31.0s), 20/20 VUs, 6819 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6867 219.536705/s + checks_succeeded...: 100.00% 6867 out of 6867 + checks_failed......: 0.00% 0 out of 6867 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=36.98ms min=8.07ms med=32.66ms max=1.14s p(90)=61.65ms p(95)=76.45ms + { expected_response:true }...: avg=36.98ms min=8.07ms med=32.66ms max=1.14s p(90)=61.65ms p(95)=76.45ms + http_req_failed................: 0.00% 0 out of 6868 + http_reqs......................: 6868 219.568674/s + + EXECUTION + iteration_duration.............: avg=87.42ms min=58.52ms med=83.24ms max=217.02ms p(90)=112.26ms p(95)=127.96ms + iterations.....................: 6867 219.536705/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.3 MB 75 kB/s + data_sent......................: 3.1 MB 100 kB/s + + + + +running (0m31.3s), 00/20 VUs, 6867 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/fix_a-20vu-run3.json b/benchmarks/raw/fix_a-20vu-run3.json new file mode 100644 index 0000000..89c2859 --- /dev/null +++ b/benchmarks/raw/fix_a-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7155, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "http_reqs": { + "count": 7156, + "rate": 230.65579739792992 + }, + "http_req_duration": { + "avg": 33.473581749580774, + "min": 7.9103, + "med": 29.12825, + "max": 819.445, + "p(90)": 56.213449999999995, + "p(95)": 69.08915 + }, + "http_req_connecting": { + "med": 0, + "max": 16.2435, + "p(90)": 0, + "p(95)": 0, + "avg": 0.0066923281162660705, + "min": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "min": 7.4947, + "med": 29.02075, + "max": 817.7139, + "p(90)": 56.10325, + "p(95)": 69.06075, + "avg": 33.3620403577418 + }, + "http_req_blocked": { + "max": 89.3635, + "p(90)": 0, + "p(95)": 0, + "avg": 0.022015036333147, + "min": 0, + "med": 0 + }, + "data_sent": { + "count": 3258657, + "rate": 105034.67422880745 + }, + "http_req_receiving": { + "p(90)": 0.53805, + "p(95)": 0.5531250000000001, + "avg": 0.09967568474007825, + "min": 0, + "med": 0, + "max": 2.3365 + }, + "data_received": { + "count": 2427326, + "rate": 78238.79458841917 + }, + "http_req_failed": { + "passes": 0, + "fails": 7156, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "value": 12, + "min": 12, + "max": 20 + }, + "http_req_duration{expected_response:true}": { + "max": 819.445, + "p(90)": 56.213449999999995, + "p(95)": 69.08915, + "avg": 33.473581749580774, + "min": 7.9103, + "med": 29.12825 + }, + "http_req_sending": { + "avg": 0.011865707098937956, + "min": 0, + "med": 0, + "max": 2.1245, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "fails": 0, + "passes": 7155, + "value": 1 + }, + "iteration_duration": { + "avg": 83.9425037316563, + "min": 58.0026, + "med": 79.5953, + "max": 224.4441, + "p(90)": 106.91438000000001, + "p(95)": 119.91532999999997 + }, + "iterations": { + "count": 7155, + "rate": 230.62356489410126 + } + } +} diff --git a/benchmarks/raw/fix_a-20vu-run3.txt b/benchmarks/raw/fix_a-20vu-run3.txt new file mode 100644 index 0000000..21aa3e5 --- /dev/null +++ b/benchmarks/raw/fix_a-20vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 20 VUs 00.0s/30s + +running (0m02.0s), 20/20 VUs, 149 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 01.0s/30s + +running (0m03.0s), 20/20 VUs, 335 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.0s/30s + +running (0m04.0s), 20/20 VUs, 523 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.0s/30s + +running (0m05.0s), 20/20 VUs, 746 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 04.0s/30s + +running (0m06.0s), 20/20 VUs, 963 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.0s/30s + +running (0m07.0s), 20/20 VUs, 1236 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.0s/30s + +running (0m08.0s), 20/20 VUs, 1498 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 07.0s/30s + +running (0m09.0s), 20/20 VUs, 1776 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m10.0s), 20/20 VUs, 2018 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.0s/30s + +running (0m11.0s), 20/20 VUs, 2276 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 10.0s/30s + +running (0m12.0s), 20/20 VUs, 2493 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m13.0s), 20/20 VUs, 2710 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m14.0s), 20/20 VUs, 2944 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m15.0s), 20/20 VUs, 3222 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.0s/30s + +running (0m16.0s), 20/20 VUs, 3498 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.0s/30s + +running (0m17.0s), 20/20 VUs, 3777 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m18.0s), 20/20 VUs, 4036 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.0s/30s + +running (0m19.0s), 20/20 VUs, 4314 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.0s/30s + +running (0m20.0s), 20/20 VUs, 4556 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 19.0s/30s + +running (0m21.0s), 20/20 VUs, 4782 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.0s/30s + +running (0m22.0s), 20/20 VUs, 4972 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.0s/30s + +running (0m23.0s), 20/20 VUs, 5183 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 22.0s/30s + +running (0m24.0s), 20/20 VUs, 5435 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.0s/30s + +running (0m25.0s), 20/20 VUs, 5712 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.0s/30s + +running (0m26.0s), 20/20 VUs, 5987 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 25.0s/30s + +running (0m27.0s), 20/20 VUs, 6246 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.0s/30s + +running (0m28.0s), 20/20 VUs, 6509 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m29.0s), 20/20 VUs, 6731 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m30.0s), 20/20 VUs, 6926 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m31.0s), 12/20 VUs, 7143 complete and 0 interrupted iterations +default โ†“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7155 230.623565/s + checks_succeeded...: 100.00% 7155 out of 7155 + checks_failed......: 0.00% 0 out of 7155 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=33.47ms min=7.91ms med=29.12ms max=819.44ms p(90)=56.21ms p(95)=69.08ms + { expected_response:true }...: avg=33.47ms min=7.91ms med=29.12ms max=819.44ms p(90)=56.21ms p(95)=69.08ms + http_req_failed................: 0.00% 0 out of 7156 + http_reqs......................: 7156 230.655797/s + + EXECUTION + iteration_duration.............: avg=83.94ms min=58ms med=79.59ms max=224.44ms p(90)=106.91ms p(95)=119.91ms + iterations.....................: 7155 230.623565/s + vus............................: 12 min=12 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.4 MB 78 kB/s + data_sent......................: 3.3 MB 105 kB/s + + + + +running (0m31.0s), 00/20 VUs, 7155 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/fix_a-20vu-warmup.json b/benchmarks/raw/fix_a-20vu-warmup.json new file mode 100644 index 0000000..543c2fa --- /dev/null +++ b/benchmarks/raw/fix_a-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 5952, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "avg": 50.210527481941774, + "min": 9.5506, + "med": 41.612, + "max": 1279.7465, + "p(90)": 86.8867, + "p(95)": 114.79763999999997 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_sending": { + "med": 0, + "max": 15.8267, + "p(90)": 0, + "p(95)": 0, + "avg": 0.02868271459768181, + "min": 0 + }, + "data_sent": { + "count": 2710089, + "rate": 86208.00386972794 + }, + "iterations": { + "count": 5952, + "rate": 189.33327984159217 + }, + "http_req_blocked": { + "max": 71.4987, + "p(90)": 0, + "p(95)": 0, + "avg": 0.028496841928439463, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "med": 92.1952, + "max": 597.4994, + "p(90)": 137.75091, + "p(95)": 165.38443999999996, + "avg": 100.71096031585984, + "min": 59.6952 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 114.79763999999997, + "avg": 50.210527481941774, + "min": 9.5506, + "med": 41.612, + "max": 1279.7465, + "p(90)": 86.8867 + }, + "http_req_failed": { + "passes": 0, + "fails": 5953, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 5953, + "rate": 189.36508986844728 + }, + "http_req_connecting": { + "avg": 0.007583823282378632, + "min": 0, + "med": 0, + "max": 12.3476, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 2051990, + "rate": 65273.8570064094 + }, + "checks": { + "passes": 5952, + "fails": 0, + "value": 1 + }, + "http_req_receiving": { + "max": 7.3039, + "p(90)": 0.5422600000000001, + "p(95)": 0.5594399999999999, + "avg": 0.11737325718125317, + "min": 0, + "med": 0 + }, + "http_req_waiting": { + "max": 1276.23, + "p(90)": 86.81810000000002, + "p(95)": 114.10752, + "avg": 50.064471510162974, + "min": 9.5325, + "med": 41.5067 + } + } +} diff --git a/benchmarks/raw/fix_a-20vu-warmup.txt b/benchmarks/raw/fix_a-20vu-warmup.txt new file mode 100644 index 0000000..2ebccc4 --- /dev/null +++ b/benchmarks/raw/fix_a-20vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 13 complete and 0 interrupted iterations +default [ 2% ] 20 VUs 00.6s/30s + +running (0m03.0s), 20/20 VUs, 122 complete and 0 interrupted iterations +default [ 5% ] 20 VUs 01.6s/30s + +running (0m04.0s), 20/20 VUs, 252 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 02.6s/30s + +running (0m05.0s), 20/20 VUs, 371 complete and 0 interrupted iterations +default [ 12% ] 20 VUs 03.6s/30s + +running (0m06.0s), 20/20 VUs, 521 complete and 0 interrupted iterations +default [ 15% ] 20 VUs 04.6s/30s + +running (0m07.0s), 20/20 VUs, 682 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 05.6s/30s + +running (0m08.0s), 20/20 VUs, 924 complete and 0 interrupted iterations +default [ 22% ] 20 VUs 06.6s/30s + +running (0m09.0s), 20/20 VUs, 1126 complete and 0 interrupted iterations +default [ 25% ] 20 VUs 07.6s/30s + +running (0m10.0s), 20/20 VUs, 1367 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 08.6s/30s + +running (0m11.0s), 20/20 VUs, 1606 complete and 0 interrupted iterations +default [ 32% ] 20 VUs 09.6s/30s + +running (0m12.0s), 20/20 VUs, 1812 complete and 0 interrupted iterations +default [ 35% ] 20 VUs 10.6s/30s + +running (0m13.0s), 20/20 VUs, 2013 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 11.6s/30s + +running (0m14.0s), 20/20 VUs, 2229 complete and 0 interrupted iterations +default [ 42% ] 20 VUs 12.6s/30s + +running (0m15.0s), 20/20 VUs, 2458 complete and 0 interrupted iterations +default [ 45% ] 20 VUs 13.6s/30s + +running (0m16.0s), 20/20 VUs, 2700 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 14.6s/30s + +running (0m17.0s), 20/20 VUs, 2916 complete and 0 interrupted iterations +default [ 52% ] 20 VUs 15.6s/30s + +running (0m18.0s), 20/20 VUs, 3161 complete and 0 interrupted iterations +default [ 55% ] 20 VUs 16.6s/30s + +running (0m19.0s), 20/20 VUs, 3361 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 17.6s/30s + +running (0m20.0s), 20/20 VUs, 3564 complete and 0 interrupted iterations +default [ 62% ] 20 VUs 18.6s/30s + +running (0m21.0s), 20/20 VUs, 3770 complete and 0 interrupted iterations +default [ 65% ] 20 VUs 19.6s/30s + +running (0m22.0s), 20/20 VUs, 3958 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 20.6s/30s + +running (0m23.0s), 20/20 VUs, 4126 complete and 0 interrupted iterations +default [ 72% ] 20 VUs 21.6s/30s + +running (0m24.0s), 20/20 VUs, 4292 complete and 0 interrupted iterations +default [ 75% ] 20 VUs 22.6s/30s + +running (0m25.0s), 20/20 VUs, 4492 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 23.6s/30s + +running (0m26.0s), 20/20 VUs, 4706 complete and 0 interrupted iterations +default [ 82% ] 20 VUs 24.6s/30s + +running (0m27.0s), 20/20 VUs, 4962 complete and 0 interrupted iterations +default [ 85% ] 20 VUs 25.6s/30s + +running (0m28.0s), 20/20 VUs, 5225 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 26.6s/30s + +running (0m29.0s), 20/20 VUs, 5453 complete and 0 interrupted iterations +default [ 92% ] 20 VUs 27.6s/30s + +running (0m30.0s), 20/20 VUs, 5705 complete and 0 interrupted iterations +default [ 95% ] 20 VUs 28.6s/30s + +running (0m31.0s), 20/20 VUs, 5865 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5952 189.33328/s + checks_succeeded...: 100.00% 5952 out of 5952 + checks_failed......: 0.00% 0 out of 5952 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=50.21ms min=9.55ms med=41.61ms max=1.27s p(90)=86.88ms p(95)=114.79ms + { expected_response:true }...: avg=50.21ms min=9.55ms med=41.61ms max=1.27s p(90)=86.88ms p(95)=114.79ms + http_req_failed................: 0.00% 0 out of 5953 + http_reqs......................: 5953 189.36509/s + + EXECUTION + iteration_duration.............: avg=100.71ms min=59.69ms med=92.19ms max=597.49ms p(90)=137.75ms p(95)=165.38ms + iterations.....................: 5952 189.33328/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.1 MB 65 kB/s + data_sent......................: 2.7 MB 86 kB/s + + + + +running (0m31.4s), 00/20 VUs, 5952 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/fix_a-50vu-run1.json b/benchmarks/raw/fix_a-50vu-run1.json new file mode 100644 index 0000000..f921b2c --- /dev/null +++ b/benchmarks/raw/fix_a-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7833 + } + } + }, + "metrics": { + "vus": { + "value": 45, + "min": 45, + "max": 50 + }, + "http_req_connecting": { + "max": 5.1211, + "p(90)": 0, + "p(95)": 0, + "avg": 0.009710275721215219, + "min": 0, + "med": 0 + }, + "http_reqs": { + "count": 7834, + "rate": 251.92187707717372 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 10.2513, + "p(90)": 0.5404, + "p(95)": 0.5644449999999996, + "avg": 0.10977791677304054 + }, + "http_req_duration": { + "med": 133.23145, + "max": 1060.8199, + "p(90)": 205.97684999999998, + "p(95)": 240.92052499999997, + "avg": 141.10193007403544, + "min": 14.925 + }, + "data_received": { + "count": 2638862, + "rate": 84859.21220163707 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_duration{expected_response:true}": { + "avg": 141.10193007403544, + "min": 14.925, + "med": 133.23145, + "max": 1060.8199, + "p(90)": 205.97684999999998, + "p(95)": 240.92052499999997 + }, + "checks": { + "passes": 7833, + "fails": 0, + "value": 1 + }, + "iterations": { + "count": 7833, + "rate": 251.88971957435558 + }, + "http_req_sending": { + "avg": 0.02584808526933878, + "min": 0, + "med": 0, + "max": 11.6947, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "avg": 191.84118049278763, + "min": 65.0997, + "med": 183.7275, + "max": 1112.861, + "p(90)": 257.62304, + "p(95)": 292.53708 + }, + "data_sent": { + "count": 3561525, + "rate": 114529.75022431466 + }, + "http_req_failed": { + "passes": 0, + "fails": 7834, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_blocked": { + "max": 31.2489, + "p(90)": 0, + "p(95)": 0, + "avg": 0.022622210875670182, + "min": 0, + "med": 0 + }, + "http_req_waiting": { + "min": 14.925, + "med": 132.89125, + "max": 1059.6631, + "p(90)": 205.86191, + "p(95)": 240.92052499999997, + "avg": 140.9663040719931 + } + } +} diff --git a/benchmarks/raw/fix_a-50vu-run1.txt b/benchmarks/raw/fix_a-50vu-run1.txt new file mode 100644 index 0000000..eb20452 --- /dev/null +++ b/benchmarks/raw/fix_a-50vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 50 VUs 00.0s/30s + +running (0m02.0s), 50/50 VUs, 198 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 01.0s/30s + +running (0m03.0s), 50/50 VUs, 423 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.0s/30s + +running (0m04.0s), 50/50 VUs, 653 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.0s/30s + +running (0m05.0s), 50/50 VUs, 895 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 04.0s/30s + +running (0m06.0s), 50/50 VUs, 1164 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.0s/30s + +running (0m07.0s), 50/50 VUs, 1440 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.0s/30s + +running (0m08.0s), 50/50 VUs, 1693 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 07.0s/30s + +running (0m09.0s), 50/50 VUs, 1983 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.0s/30s + +running (0m10.0s), 50/50 VUs, 2301 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.0s/30s + +running (0m11.0s), 50/50 VUs, 2580 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 10.0s/30s + +running (0m12.0s), 50/50 VUs, 2835 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.0s/30s + +running (0m13.0s), 50/50 VUs, 3163 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.0s/30s + +running (0m14.0s), 50/50 VUs, 3485 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 13.0s/30s + +running (0m15.0s), 50/50 VUs, 3698 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.0s/30s + +running (0m16.0s), 50/50 VUs, 3942 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.0s/30s + +running (0m17.0s), 50/50 VUs, 4215 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 16.0s/30s + +running (0m18.0s), 50/50 VUs, 4506 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.0s/30s + +running (0m19.0s), 50/50 VUs, 4795 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.0s/30s + +running (0m20.0s), 50/50 VUs, 5059 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 19.0s/30s + +running (0m21.0s), 50/50 VUs, 5334 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.0s/30s + +running (0m22.0s), 50/50 VUs, 5592 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.0s/30s + +running (0m23.0s), 50/50 VUs, 5783 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 22.0s/30s + +running (0m24.0s), 50/50 VUs, 5989 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.0s/30s + +running (0m25.0s), 50/50 VUs, 6190 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.0s/30s + +running (0m26.0s), 50/50 VUs, 6407 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 25.0s/30s + +running (0m27.0s), 50/50 VUs, 6755 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.0s/30s + +running (0m28.0s), 50/50 VUs, 7049 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.0s/30s + +running (0m29.0s), 50/50 VUs, 7232 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 28.0s/30s + +running (0m30.0s), 50/50 VUs, 7505 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.0s/30s + +running (0m31.0s), 45/50 VUs, 7788 complete and 0 interrupted iterations +default โ†“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7833 251.88972/s + checks_succeeded...: 100.00% 7833 out of 7833 + checks_failed......: 0.00% 0 out of 7833 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=141.1ms min=14.92ms med=133.23ms max=1.06s p(90)=205.97ms p(95)=240.92ms + { expected_response:true }...: avg=141.1ms min=14.92ms med=133.23ms max=1.06s p(90)=205.97ms p(95)=240.92ms + http_req_failed................: 0.00% 0 out of 7834 + http_reqs......................: 7834 251.921877/s + + EXECUTION + iteration_duration.............: avg=191.84ms min=65.09ms med=183.72ms max=1.11s p(90)=257.62ms p(95)=292.53ms + iterations.....................: 7833 251.88972/s + vus............................: 45 min=45 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.6 MB 85 kB/s + data_sent......................: 3.6 MB 115 kB/s + + + + +running (0m31.1s), 00/50 VUs, 7833 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_a-50vu-run2.json b/benchmarks/raw/fix_a-50vu-run2.json new file mode 100644 index 0000000..c778287 --- /dev/null +++ b/benchmarks/raw/fix_a-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8870 + } + } + }, + "metrics": { + "iteration_duration": { + "p(95)": 262.7880149999998, + "avg": 168.61471560315687, + "min": 63.9086, + "med": 146.68914999999998, + "max": 1633.2137, + "p(90)": 215.22892000000002 + }, + "http_req_connecting": { + "max": 82.7247, + "p(90)": 0, + "p(95)": 0, + "avg": 0.038175684815691585, + "min": 0, + "med": 0 + }, + "http_req_duration": { + "min": 12.8566, + "med": 96.0771, + "max": 1546.743, + "p(90)": 164.1061, + "p(95)": 209.19445000000002, + "avg": 117.74554855145972 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "avg": 0.09399170330289704, + "min": 0, + "med": 0, + "max": 22.6893, + "p(90)": 0.5313, + "p(95)": 0.5492 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_duration{expected_response:true}": { + "avg": 117.74554855145972, + "min": 12.8566, + "med": 96.0771, + "max": 1546.743, + "p(90)": 164.1061, + "p(95)": 209.19445000000002 + }, + "http_req_sending": { + "max": 107.1535, + "p(90)": 0, + "p(95)": 0, + "avg": 0.02757892007665428, + "min": 0, + "med": 0 + }, + "data_received": { + "count": 2962406, + "rate": 94704.32298655961 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "iterations": { + "rate": 283.5625315675109, + "count": 8870 + }, + "http_req_blocked": { + "avg": 0.052016108668695736, + "min": 0, + "med": 0, + "max": 126.4092, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "p(95)": 208.88639999999998, + "avg": 117.62397792808027, + "min": 12.3205, + "med": 95.9414, + "max": 1546.743, + "p(90)": 164.1029 + }, + "http_req_failed": { + "passes": 0, + "fails": 8871, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 8871, + "rate": 283.5945002858387 + }, + "data_sent": { + "rate": 128974.50131548718, + "count": 4034397 + }, + "checks": { + "fails": 0, + "passes": 8870, + "value": 1 + } + } +} diff --git a/benchmarks/raw/fix_a-50vu-run2.txt b/benchmarks/raw/fix_a-50vu-run2.txt new file mode 100644 index 0000000..bf8b8c3 --- /dev/null +++ b/benchmarks/raw/fix_a-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 124 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m03.0s), 50/50 VUs, 483 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.8s/30s + +running (0m04.0s), 50/50 VUs, 818 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m05.0s), 50/50 VUs, 1105 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.8s/30s + +running (0m06.0s), 50/50 VUs, 1511 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m07.0s), 50/50 VUs, 1791 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.8s/30s + +running (0m08.0s), 50/50 VUs, 2117 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m09.0s), 50/50 VUs, 2340 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.8s/30s + +running (0m10.0s), 50/50 VUs, 2559 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.8s/30s + +running (0m11.0s), 50/50 VUs, 2849 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m12.0s), 50/50 VUs, 3134 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.8s/30s + +running (0m13.0s), 50/50 VUs, 3493 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.8s/30s + +running (0m14.0s), 50/50 VUs, 3633 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m15.0s), 50/50 VUs, 3854 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.8s/30s + +running (0m16.0s), 50/50 VUs, 4229 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m17.0s), 50/50 VUs, 4632 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.8s/30s + +running (0m18.0s), 50/50 VUs, 4919 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.8s/30s + +running (0m19.0s), 50/50 VUs, 5216 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m20.0s), 50/50 VUs, 5580 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.8s/30s + +running (0m21.0s), 50/50 VUs, 5914 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.8s/30s + +running (0m22.0s), 50/50 VUs, 6295 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m23.0s), 50/50 VUs, 6649 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m24.0s), 50/50 VUs, 6975 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m25.0s), 50/50 VUs, 7296 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.8s/30s + +running (0m26.0s), 50/50 VUs, 7625 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m27.0s), 50/50 VUs, 7979 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.8s/30s + +running (0m28.0s), 50/50 VUs, 8272 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.8s/30s + +running (0m29.0s), 50/50 VUs, 8410 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.8s/30s + +running (0m30.0s), 50/50 VUs, 8433 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m31.0s), 50/50 VUs, 8737 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8870 283.562532/s + checks_succeeded...: 100.00% 8870 out of 8870 + checks_failed......: 0.00% 0 out of 8870 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=117.74ms min=12.85ms med=96.07ms max=1.54s p(90)=164.1ms p(95)=209.19ms + { expected_response:true }...: avg=117.74ms min=12.85ms med=96.07ms max=1.54s p(90)=164.1ms p(95)=209.19ms + http_req_failed................: 0.00% 0 out of 8871 + http_reqs......................: 8871 283.5945/s + + EXECUTION + iteration_duration.............: avg=168.61ms min=63.9ms med=146.68ms max=1.63s p(90)=215.22ms p(95)=262.78ms + iterations.....................: 8870 283.562532/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.0 MB 95 kB/s + data_sent......................: 4.0 MB 129 kB/s + + + + +running (0m31.3s), 00/50 VUs, 8870 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_a-50vu-run3.json b/benchmarks/raw/fix_a-50vu-run3.json new file mode 100644 index 0000000..827cfce --- /dev/null +++ b/benchmarks/raw/fix_a-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 9075, + "fails": 0 + } + } + }, + "metrics": { + "iterations": { + "count": 9075, + "rate": 284.9044797689721 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 42.3857, + "p(90)": 0, + "p(95)": 0, + "avg": 0.02445184001762891 + }, + "checks": { + "fails": 0, + "passes": 9075, + "value": 1 + }, + "vus": { + "max": 50, + "value": 50, + "min": 0 + }, + "iteration_duration": { + "max": 876.6157, + "p(90)": 223.43756, + "p(95)": 256.7237399999998, + "avg": 165.32140782369126, + "min": 72.9117, + "med": 155.2945 + }, + "http_req_duration": { + "min": 22.245, + "med": 104.67945, + "max": 1689.9124, + "p(90)": 172.75315, + "p(95)": 205.876, + "avg": 114.91659490965195 + }, + "data_received": { + "count": 3026366, + "rate": 95011.04471851296 + }, + "data_sent": { + "rate": 129592.3580424579, + "count": 4127877 + }, + "http_req_sending": { + "avg": 0.016958153371529307, + "min": 0, + "med": 0, + "max": 14.5611, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 205.876, + "avg": 114.91659490965195, + "min": 22.245, + "med": 104.67945, + "max": 1689.9124, + "p(90)": 172.75315 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_connecting": { + "med": 0, + "max": 13.2134, + "p(90)": 0, + "p(95)": 0, + "avg": 0.0062846959012781, + "min": 0 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 9076, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_receiving": { + "p(95)": 0.5507249999999999, + "avg": 0.09140837373292186, + "min": 0, + "med": 0, + "max": 8.8164, + "p(90)": 0.53645 + }, + "http_reqs": { + "count": 9076, + "rate": 284.9358742020045 + }, + "http_req_waiting": { + "max": 1680.5528, + "p(90)": 172.6758, + "p(95)": 205.8299, + "avg": 114.80822838254733, + "min": 22.245, + "med": 104.5921 + } + } +} diff --git a/benchmarks/raw/fix_a-50vu-run3.txt b/benchmarks/raw/fix_a-50vu-run3.txt new file mode 100644 index 0000000..8607078 --- /dev/null +++ b/benchmarks/raw/fix_a-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 19 complete and 0 interrupted iterations +default [ 1% ] 50 VUs 00.2s/30s + +running (0m03.0s), 50/50 VUs, 267 complete and 0 interrupted iterations +default [ 4% ] 50 VUs 01.2s/30s + +running (0m04.0s), 50/50 VUs, 495 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.2s/30s + +running (0m05.0s), 50/50 VUs, 740 complete and 0 interrupted iterations +default [ 11% ] 50 VUs 03.2s/30s + +running (0m06.0s), 50/50 VUs, 985 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.2s/30s + +running (0m07.0s), 50/50 VUs, 1220 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.2s/30s + +running (0m08.0s), 50/50 VUs, 1511 complete and 0 interrupted iterations +default [ 21% ] 50 VUs 06.2s/30s + +running (0m09.0s), 50/50 VUs, 1804 complete and 0 interrupted iterations +default [ 24% ] 50 VUs 07.2s/30s + +running (0m10.0s), 50/50 VUs, 2113 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.2s/30s + +running (0m11.0s), 50/50 VUs, 2416 complete and 0 interrupted iterations +default [ 31% ] 50 VUs 09.2s/30s + +running (0m12.0s), 50/50 VUs, 2755 complete and 0 interrupted iterations +default [ 34% ] 50 VUs 10.2s/30s + +running (0m13.0s), 50/50 VUs, 3115 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.2s/30s + +running (0m14.0s), 50/50 VUs, 3492 complete and 0 interrupted iterations +default [ 41% ] 50 VUs 12.2s/30s + +running (0m15.0s), 50/50 VUs, 3848 complete and 0 interrupted iterations +default [ 44% ] 50 VUs 13.2s/30s + +running (0m16.0s), 50/50 VUs, 4160 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.2s/30s + +running (0m17.0s), 50/50 VUs, 4497 complete and 0 interrupted iterations +default [ 51% ] 50 VUs 15.2s/30s + +running (0m18.0s), 50/50 VUs, 4829 complete and 0 interrupted iterations +default [ 54% ] 50 VUs 16.2s/30s + +running (0m19.0s), 50/50 VUs, 5169 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.2s/30s + +running (0m20.0s), 50/50 VUs, 5447 complete and 0 interrupted iterations +default [ 61% ] 50 VUs 18.2s/30s + +running (0m21.0s), 50/50 VUs, 5778 complete and 0 interrupted iterations +default [ 64% ] 50 VUs 19.2s/30s + +running (0m22.0s), 50/50 VUs, 6075 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.2s/30s + +running (0m23.0s), 50/50 VUs, 6342 complete and 0 interrupted iterations +default [ 71% ] 50 VUs 21.2s/30s + +running (0m24.0s), 50/50 VUs, 6664 complete and 0 interrupted iterations +default [ 74% ] 50 VUs 22.2s/30s + +running (0m25.0s), 50/50 VUs, 7010 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.2s/30s + +running (0m26.0s), 50/50 VUs, 7196 complete and 0 interrupted iterations +default [ 81% ] 50 VUs 24.2s/30s + +running (0m27.0s), 50/50 VUs, 7485 complete and 0 interrupted iterations +default [ 84% ] 50 VUs 25.2s/30s + +running (0m28.0s), 50/50 VUs, 7735 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.2s/30s + +running (0m29.0s), 50/50 VUs, 8068 complete and 0 interrupted iterations +default [ 91% ] 50 VUs 27.2s/30s + +running (0m30.0s), 50/50 VUs, 8409 complete and 0 interrupted iterations +default [ 94% ] 50 VUs 28.2s/30s + +running (0m31.0s), 50/50 VUs, 8739 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.2s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9075 284.90448/s + checks_succeeded...: 100.00% 9075 out of 9075 + checks_failed......: 0.00% 0 out of 9075 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=114.91ms min=22.24ms med=104.67ms max=1.68s p(90)=172.75ms p(95)=205.87ms + { expected_response:true }...: avg=114.91ms min=22.24ms med=104.67ms max=1.68s p(90)=172.75ms p(95)=205.87ms + http_req_failed................: 0.00% 0 out of 9076 + http_reqs......................: 9076 284.935874/s + + EXECUTION + iteration_duration.............: avg=165.32ms min=72.91ms med=155.29ms max=876.61ms p(90)=223.43ms p(95)=256.72ms + iterations.....................: 9075 284.90448/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.0 MB 95 kB/s + data_sent......................: 4.1 MB 130 kB/s + + + + +running (0m31.9s), 00/50 VUs, 9075 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_a-50vu-warmup.json b/benchmarks/raw/fix_a-50vu-warmup.json new file mode 100644 index 0000000..bfde263 --- /dev/null +++ b/benchmarks/raw/fix_a-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 9961, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "data_received": { + "count": 3302798, + "rate": 106434.69157666195 + }, + "iteration_duration": { + "avg": 150.7030917879727, + "min": 59.0179, + "med": 143.816, + "max": 1501.328, + "p(90)": 193.7044, + "p(95)": 208.5685 + }, + "http_req_connecting": { + "avg": 0.01881788797430235, + "min": 0, + "med": 0, + "max": 27.2422, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "value": 6, + "min": 6, + "max": 50 + }, + "http_req_duration{expected_response:true}": { + "avg": 100.25090821120274, + "min": 8.5205, + "med": 93.37075, + "max": 1449.7302, + "p(90)": 143.11273, + "p(95)": 158.05692499999995 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 4.6508, + "p(90)": 0, + "p(95)": 0, + "avg": 0.008307137121060033 + }, + "iterations": { + "count": 9961, + "rate": 320.9993353499456 + }, + "http_reqs": { + "count": 9962, + "rate": 321.03156096337295 + }, + "data_sent": { + "count": 4531893, + "rate": 146043.03191216456 + }, + "vus_max": { + "min": 50, + "max": 50, + "value": 50 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_receiving": { + "p(90)": 0.5307, + "p(95)": 0.5488, + "avg": 0.0846584922706283, + "min": 0, + "med": 0, + "max": 9.5085 + }, + "checks": { + "passes": 9961, + "fails": 0, + "value": 1 + }, + "http_req_waiting": { + "med": 93.33275, + "max": 1449.7302, + "p(90)": 143.03869999999998, + "p(95)": 157.91233, + "avg": 100.15794258181104, + "min": 8.5205 + }, + "http_req_failed": { + "passes": 0, + "fails": 9962, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 34.0542, + "p(90)": 0, + "p(95)": 0, + "avg": 0.034848765308171055 + }, + "http_req_duration": { + "avg": 100.25090821120274, + "min": 8.5205, + "med": 93.37075, + "max": 1449.7302, + "p(90)": 143.11273, + "p(95)": 158.05692499999995 + } + } +} diff --git a/benchmarks/raw/fix_a-50vu-warmup.txt b/benchmarks/raw/fix_a-50vu-warmup.txt new file mode 100644 index 0000000..add9b5e --- /dev/null +++ b/benchmarks/raw/fix_a-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 50 VUs 00.1s/30s + +running (0m02.0s), 50/50 VUs, 202 complete and 0 interrupted iterations +default [ 4% ] 50 VUs 01.1s/30s + +running (0m03.0s), 50/50 VUs, 518 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.1s/30s + +running (0m04.0s), 50/50 VUs, 848 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.1s/30s + +running (0m05.0s), 50/50 VUs, 1182 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.1s/30s + +running (0m06.0s), 50/50 VUs, 1491 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.1s/30s + +running (0m07.0s), 50/50 VUs, 1796 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.1s/30s + +running (0m08.0s), 50/50 VUs, 2026 complete and 0 interrupted iterations +default [ 24% ] 50 VUs 07.1s/30s + +running (0m09.0s), 50/50 VUs, 2391 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.1s/30s + +running (0m10.0s), 50/50 VUs, 2702 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.1s/30s + +running (0m11.0s), 50/50 VUs, 3077 complete and 0 interrupted iterations +default [ 34% ] 50 VUs 10.1s/30s + +running (0m12.0s), 50/50 VUs, 3467 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.1s/30s + +running (0m13.0s), 50/50 VUs, 3864 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.1s/30s + +running (0m14.0s), 50/50 VUs, 4220 complete and 0 interrupted iterations +default [ 44% ] 50 VUs 13.1s/30s + +running (0m15.0s), 50/50 VUs, 4519 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.1s/30s + +running (0m16.0s), 50/50 VUs, 4838 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.1s/30s + +running (0m17.0s), 50/50 VUs, 5235 complete and 0 interrupted iterations +default [ 54% ] 50 VUs 16.1s/30s + +running (0m18.0s), 50/50 VUs, 5547 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.1s/30s + +running (0m19.0s), 50/50 VUs, 5893 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.1s/30s + +running (0m20.0s), 50/50 VUs, 6271 complete and 0 interrupted iterations +default [ 64% ] 50 VUs 19.1s/30s + +running (0m21.0s), 50/50 VUs, 6603 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.1s/30s + +running (0m22.0s), 50/50 VUs, 6967 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.1s/30s + +running (0m23.0s), 50/50 VUs, 7294 complete and 0 interrupted iterations +default [ 74% ] 50 VUs 22.1s/30s + +running (0m24.0s), 50/50 VUs, 7564 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.1s/30s + +running (0m25.0s), 50/50 VUs, 7870 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.1s/30s + +running (0m26.0s), 50/50 VUs, 8218 complete and 0 interrupted iterations +default [ 84% ] 50 VUs 25.1s/30s + +running (0m27.0s), 50/50 VUs, 8518 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.1s/30s + +running (0m28.0s), 50/50 VUs, 8841 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.1s/30s + +running (0m29.0s), 50/50 VUs, 9244 complete and 0 interrupted iterations +default [ 94% ] 50 VUs 28.1s/30s + +running (0m30.0s), 50/50 VUs, 9599 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.1s/30s + +running (0m31.0s), 06/50 VUs, 9955 complete and 0 interrupted iterations +default โ†“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9961 320.999335/s + checks_succeeded...: 100.00% 9961 out of 9961 + checks_failed......: 0.00% 0 out of 9961 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=100.25ms min=8.52ms med=93.37ms max=1.44s p(90)=143.11ms p(95)=158.05ms + { expected_response:true }...: avg=100.25ms min=8.52ms med=93.37ms max=1.44s p(90)=143.11ms p(95)=158.05ms + http_req_failed................: 0.00% 0 out of 9962 + http_reqs......................: 9962 321.031561/s + + EXECUTION + iteration_duration.............: avg=150.7ms min=59.01ms med=143.81ms max=1.5s p(90)=193.7ms p(95)=208.56ms + iterations.....................: 9961 320.999335/s + vus............................: 6 min=6 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.3 MB 106 kB/s + data_sent......................: 4.5 MB 146 kB/s + + + + +running (0m31.0s), 00/50 VUs, 9961 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b-100vu-run1.json b/benchmarks/raw/fix_b-100vu-run1.json new file mode 100644 index 0000000..eed1b68 --- /dev/null +++ b/benchmarks/raw/fix_b-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 12053 + } + } + }, + "metrics": { + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_req_waiting": { + "min": 14.7693, + "med": 176.62105000000003, + "max": 3149.8399, + "p(90)": 293.75294, + "p(95)": 393.631965, + "avg": 199.30334712958359 + }, + "http_req_connecting": { + "med": 0, + "max": 15.1671, + "p(90)": 0, + "p(95)": 0, + "avg": 0.017243056246889, + "min": 0 + }, + "data_received": { + "count": 3955502, + "rate": 125949.1860836877 + }, + "http_req_failed": { + "passes": 0, + "fails": 12054, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_duration{expected_response:true}": { + "med": 176.6354, + "max": 3150.3701, + "p(90)": 293.8420600000001, + "p(95)": 393.7101650000001, + "avg": 199.38494825783957, + "min": 14.7693 + }, + "iterations": { + "count": 12053, + "rate": 383.7858102123796 + }, + "http_req_receiving": { + "max": 22.7996, + "p(90)": 0.5251, + "p(95)": 0.5448, + "avg": 0.07150814667330362, + "min": 0, + "med": 0 + }, + "http_req_sending": { + "avg": 0.010092981582877062, + "min": 0, + "med": 0, + "max": 25.2839, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "p(90)": 293.8420600000001, + "p(95)": 393.7101650000001, + "avg": 199.38494825783957, + "min": 14.7693, + "med": 176.6354, + "max": 3150.3701 + }, + "http_reqs": { + "count": 12054, + "rate": 383.8176517298617 + }, + "data_sent": { + "count": 5475345, + "rate": 174343.29353831423 + }, + "vus_max": { + "min": 100, + "max": 100, + "value": 100 + }, + "checks": { + "passes": 12053, + "fails": 0, + "value": 1 + }, + "http_req_blocked": { + "med": 0, + "max": 34.1925, + "p(90)": 0, + "p(95)": 0, + "avg": 0.027560842873734854, + "min": 0 + }, + "iteration_duration": { + "min": 64.9693, + "med": 226.9917, + "max": 3201.8211, + "p(90)": 344.33336, + "p(95)": 444.1287799999999, + "avg": 249.781232473243 + } + } +} diff --git a/benchmarks/raw/fix_b-100vu-run1.txt b/benchmarks/raw/fix_b-100vu-run1.txt new file mode 100644 index 0000000..37663a4 --- /dev/null +++ b/benchmarks/raw/fix_b-100vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 288 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.8s/30s + +running (0m03.0s), 100/100 VUs, 635 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.8s/30s + +running (0m04.0s), 100/100 VUs, 1101 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.8s/30s + +running (0m05.0s), 100/100 VUs, 1549 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.8s/30s + +running (0m06.0s), 100/100 VUs, 2004 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.8s/30s + +running (0m07.0s), 100/100 VUs, 2430 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.8s/30s + +running (0m08.0s), 100/100 VUs, 2806 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.8s/30s + +running (0m09.0s), 100/100 VUs, 3168 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.8s/30s + +running (0m10.0s), 100/100 VUs, 3653 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.8s/30s + +running (0m11.0s), 100/100 VUs, 4038 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.8s/30s + +running (0m12.0s), 100/100 VUs, 4332 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.8s/30s + +running (0m13.0s), 100/100 VUs, 4624 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.8s/30s + +running (0m14.0s), 100/100 VUs, 5047 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.8s/30s + +running (0m15.0s), 100/100 VUs, 5437 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.8s/30s + +running (0m16.0s), 100/100 VUs, 5855 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.8s/30s + +running (0m17.0s), 100/100 VUs, 6317 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.8s/30s + +running (0m18.0s), 100/100 VUs, 6813 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.8s/30s + +running (0m19.0s), 100/100 VUs, 7237 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.8s/30s + +running (0m20.0s), 100/100 VUs, 7638 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.8s/30s + +running (0m21.0s), 100/100 VUs, 8046 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.8s/30s + +running (0m22.0s), 100/100 VUs, 8411 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.8s/30s + +running (0m23.0s), 100/100 VUs, 8734 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.8s/30s + +running (0m24.0s), 100/100 VUs, 9102 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.8s/30s + +running (0m25.0s), 100/100 VUs, 9492 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.8s/30s + +running (0m26.0s), 100/100 VUs, 9942 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.8s/30s + +running (0m27.0s), 100/100 VUs, 10321 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.8s/30s + +running (0m28.0s), 100/100 VUs, 10731 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.8s/30s + +running (0m29.0s), 100/100 VUs, 11179 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.8s/30s + +running (0m30.0s), 100/100 VUs, 11475 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.8s/30s + +running (0m31.0s), 100/100 VUs, 11869 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 12053 383.78581/s + checks_succeeded...: 100.00% 12053 out of 12053 + checks_failed......: 0.00% 0 out of 12053 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=199.38ms min=14.76ms med=176.63ms max=3.15s p(90)=293.84ms p(95)=393.71ms + { expected_response:true }...: avg=199.38ms min=14.76ms med=176.63ms max=3.15s p(90)=293.84ms p(95)=393.71ms + http_req_failed................: 0.00% 0 out of 12054 + http_reqs......................: 12054 383.817652/s + + EXECUTION + iteration_duration.............: avg=249.78ms min=64.96ms med=226.99ms max=3.2s p(90)=344.33ms p(95)=444.12ms + iterations.....................: 12053 383.78581/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 4.0 MB 126 kB/s + data_sent......................: 5.5 MB 174 kB/s + + + + +running (0m31.4s), 000/100 VUs, 12053 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b-100vu-run2.json b/benchmarks/raw/fix_b-100vu-run2.json new file mode 100644 index 0000000..3e4b5c5 --- /dev/null +++ b/benchmarks/raw/fix_b-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 11119, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "http_req_duration": { + "avg": 219.95785604316671, + "min": 19.1533, + "med": 188.8449, + "max": 4035.4625, + "p(90)": 319.95088, + "p(95)": 390.6495 + }, + "data_sent": { + "rate": 161153.6038741861, + "count": 5049501 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 319.95088, + "p(95)": 390.6495, + "avg": 219.95785604316671, + "min": 19.1533, + "med": 188.8449, + "max": 4035.4625 + }, + "http_req_waiting": { + "max": 4035.4625, + "p(90)": 319.83815000000004, + "p(95)": 390.24882499999967, + "avg": 219.86050929856225, + "min": 19.1533, + "med": 188.76485000000002 + }, + "data_received": { + "count": 3664094, + "rate": 116938.6743430256 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_connecting": { + "avg": 0.024079190647482006, + "min": 0, + "med": 0, + "max": 23.9382, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.021735125899280568, + "min": 0, + "med": 0, + "max": 38.8304 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.045052059352517965, + "min": 0, + "med": 0, + "max": 35.2596 + }, + "checks": { + "passes": 11119, + "fails": 0, + "value": 1 + }, + "iterations": { + "count": 11119, + "rate": 354.8601973694184 + }, + "http_req_failed": { + "passes": 0, + "fails": 11120, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "rate": 354.89211212770323, + "count": 11120 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "iteration_duration": { + "p(90)": 370.37542, + "p(95)": 440.7908300000001, + "avg": 270.3869198219265, + "min": 69.6819, + "med": 239.2017, + "max": 4094.2199 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "med": 0, + "max": 6.0524, + "p(90)": 0.53071, + "p(95)": 0.5466, + "avg": 0.07561161870503591, + "min": 0 + } + } +} diff --git a/benchmarks/raw/fix_b-100vu-run2.txt b/benchmarks/raw/fix_b-100vu-run2.txt new file mode 100644 index 0000000..98f7caf --- /dev/null +++ b/benchmarks/raw/fix_b-100vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 226 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.8s/30s + +running (0m03.0s), 100/100 VUs, 513 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.8s/30s + +running (0m04.0s), 100/100 VUs, 860 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.8s/30s + +running (0m05.0s), 100/100 VUs, 1258 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.8s/30s + +running (0m06.0s), 100/100 VUs, 1736 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.8s/30s + +running (0m07.0s), 100/100 VUs, 2174 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.8s/30s + +running (0m08.0s), 100/100 VUs, 2634 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.8s/30s + +running (0m09.0s), 100/100 VUs, 3052 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.8s/30s + +running (0m10.0s), 100/100 VUs, 3431 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.8s/30s + +running (0m11.0s), 100/100 VUs, 3556 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.8s/30s + +running (0m12.0s), 100/100 VUs, 3968 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.8s/30s + +running (0m13.0s), 100/100 VUs, 4328 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.8s/30s + +running (0m14.0s), 100/100 VUs, 4634 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.8s/30s + +running (0m15.0s), 100/100 VUs, 5058 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.8s/30s + +running (0m16.0s), 100/100 VUs, 5357 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.8s/30s + +running (0m17.0s), 100/100 VUs, 5662 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.8s/30s + +running (0m18.0s), 100/100 VUs, 6027 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.8s/30s + +running (0m19.0s), 100/100 VUs, 6354 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.8s/30s + +running (0m20.0s), 100/100 VUs, 6707 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.8s/30s + +running (0m21.0s), 100/100 VUs, 7021 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.8s/30s + +running (0m22.0s), 100/100 VUs, 7343 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.8s/30s + +running (0m23.0s), 100/100 VUs, 7764 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.8s/30s + +running (0m24.0s), 100/100 VUs, 8177 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.8s/30s + +running (0m25.0s), 100/100 VUs, 8528 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.8s/30s + +running (0m26.0s), 100/100 VUs, 8791 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.8s/30s + +running (0m27.0s), 100/100 VUs, 9156 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.8s/30s + +running (0m28.0s), 100/100 VUs, 9557 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.8s/30s + +running (0m29.0s), 100/100 VUs, 10017 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.8s/30s + +running (0m30.0s), 100/100 VUs, 10439 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.8s/30s + +running (0m31.0s), 100/100 VUs, 10935 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 11119 354.860197/s + checks_succeeded...: 100.00% 11119 out of 11119 + checks_failed......: 0.00% 0 out of 11119 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=219.95ms min=19.15ms med=188.84ms max=4.03s p(90)=319.95ms p(95)=390.64ms + { expected_response:true }...: avg=219.95ms min=19.15ms med=188.84ms max=4.03s p(90)=319.95ms p(95)=390.64ms + http_req_failed................: 0.00% 0 out of 11120 + http_reqs......................: 11120 354.892112/s + + EXECUTION + iteration_duration.............: avg=270.38ms min=69.68ms med=239.2ms max=4.09s p(90)=370.37ms p(95)=440.79ms + iterations.....................: 11119 354.860197/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.7 MB 117 kB/s + data_sent......................: 5.0 MB 161 kB/s + + + + +running (0m31.3s), 000/100 VUs, 11119 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b-100vu-run3.json b/benchmarks/raw/fix_b-100vu-run3.json new file mode 100644 index 0000000..bd45675 --- /dev/null +++ b/benchmarks/raw/fix_b-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 12445 + } + }, + "name": "" + }, + "metrics": { + "http_reqs": { + "count": 12446, + "rate": 399.7492493660774 + }, + "http_req_waiting": { + "max": 3557.6412, + "p(90)": 283.9987, + "p(95)": 339.79274999999996, + "avg": 191.15421244576737, + "min": 13.1791, + "med": 169.85449999999997 + }, + "iteration_duration": { + "max": 3610.9411, + "p(90)": 334.53228, + "p(95)": 390.50953999999984, + "avg": 241.65845309762867, + "min": 63.5904, + "med": 220.3796 + }, + "http_req_receiving": { + "med": 0, + "max": 1.6423, + "p(90)": 0.52825, + "p(95)": 0.5453, + "avg": 0.07271909047083394, + "min": 0 + }, + "data_received": { + "count": 4077806, + "rate": 130973.7978113841 + }, + "http_req_sending": { + "max": 12.2994, + "p(90)": 0, + "p(95)": 0, + "avg": 0.008640069098505546, + "min": 0, + "med": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 12446, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "iterations": { + "count": 12445, + "rate": 399.7171306733756 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "p(90)": 284.1037, + "p(95)": 340.01734999999996, + "avg": 191.2355716053367, + "min": 13.1791, + "med": 169.9332, + "max": 3558.3212 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 43.531, + "p(90)": 0, + "p(95)": 0, + "avg": 0.025872866784509067 + }, + "checks": { + "passes": 12445, + "fails": 0, + "value": 1 + }, + "vus": { + "max": 100, + "value": 100, + "min": 100 + }, + "http_req_duration{expected_response:true}": { + "min": 13.1791, + "med": 169.9332, + "max": 3558.3212, + "p(90)": 284.1037, + "p(95)": 340.01734999999996, + "avg": 191.2355716053367 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.011626948417162131, + "min": 0, + "med": 0, + "max": 9.2473, + "p(90)": 0 + }, + "data_sent": { + "count": 5654097, + "rate": 181602.20404893058 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + } + } +} diff --git a/benchmarks/raw/fix_b-100vu-run3.txt b/benchmarks/raw/fix_b-100vu-run3.txt new file mode 100644 index 0000000..cfa03b1 --- /dev/null +++ b/benchmarks/raw/fix_b-100vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 100 VUs 00.0s/30s + +running (0m02.0s), 100/100 VUs, 369 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 01.0s/30s + +running (0m03.0s), 100/100 VUs, 761 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.0s/30s + +running (0m04.0s), 100/100 VUs, 1154 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 03.0s/30s + +running (0m05.0s), 100/100 VUs, 1574 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 04.0s/30s + +running (0m06.0s), 100/100 VUs, 2026 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.0s/30s + +running (0m07.0s), 100/100 VUs, 2486 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 06.0s/30s + +running (0m08.0s), 100/100 VUs, 2941 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 07.0s/30s + +running (0m09.0s), 100/100 VUs, 3372 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.0s/30s + +running (0m10.0s), 100/100 VUs, 3818 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 09.0s/30s + +running (0m11.0s), 100/100 VUs, 4247 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 10.0s/30s + +running (0m12.0s), 100/100 VUs, 4583 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.0s/30s + +running (0m13.0s), 100/100 VUs, 4939 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 12.0s/30s + +running (0m14.0s), 100/100 VUs, 5382 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 13.0s/30s + +running (0m15.0s), 100/100 VUs, 5828 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.0s/30s + +running (0m16.0s), 100/100 VUs, 6163 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 15.0s/30s + +running (0m17.0s), 100/100 VUs, 6592 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 16.0s/30s + +running (0m18.0s), 100/100 VUs, 7050 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.0s/30s + +running (0m19.0s), 100/100 VUs, 7405 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 18.0s/30s + +running (0m20.0s), 100/100 VUs, 7784 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 19.0s/30s + +running (0m21.0s), 100/100 VUs, 8271 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.0s/30s + +running (0m22.0s), 100/100 VUs, 8668 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 21.0s/30s + +running (0m23.0s), 100/100 VUs, 9024 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 22.0s/30s + +running (0m24.0s), 100/100 VUs, 9503 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.0s/30s + +running (0m25.0s), 100/100 VUs, 9959 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 24.0s/30s + +running (0m26.0s), 100/100 VUs, 10385 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 25.0s/30s + +running (0m27.0s), 100/100 VUs, 10626 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.0s/30s + +running (0m28.0s), 100/100 VUs, 10912 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 27.0s/30s + +running (0m29.0s), 100/100 VUs, 11378 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 28.0s/30s + +running (0m30.0s), 100/100 VUs, 11877 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.0s/30s + +running (0m31.0s), 100/100 VUs, 12345 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 12445 399.717131/s + checks_succeeded...: 100.00% 12445 out of 12445 + checks_failed......: 0.00% 0 out of 12445 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=191.23ms min=13.17ms med=169.93ms max=3.55s p(90)=284.1ms p(95)=340.01ms + { expected_response:true }...: avg=191.23ms min=13.17ms med=169.93ms max=3.55s p(90)=284.1ms p(95)=340.01ms + http_req_failed................: 0.00% 0 out of 12446 + http_reqs......................: 12446 399.749249/s + + EXECUTION + iteration_duration.............: avg=241.65ms min=63.59ms med=220.37ms max=3.61s p(90)=334.53ms p(95)=390.5ms + iterations.....................: 12445 399.717131/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 4.1 MB 131 kB/s + data_sent......................: 5.7 MB 182 kB/s + + + + +running (0m31.1s), 000/100 VUs, 12445 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b-100vu-warmup.json b/benchmarks/raw/fix_b-100vu-warmup.json new file mode 100644 index 0000000..8de2e4c --- /dev/null +++ b/benchmarks/raw/fix_b-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 2.2916, + "p(90)": 0.5254, + "p(95)": 0.5454, + "avg": 0.07020836886547953 + }, + "data_received": { + "count": 3926486, + "rate": 126053.1434178517 + }, + "checks": { + "passes": 11960, + "fails": 0, + "value": 1 + }, + "http_req_waiting": { + "med": 174.3099, + "max": 3800.9551, + "p(90)": 294.472, + "p(95)": 361.1787, + "avg": 200.77330032606028, + "min": 14.2772 + }, + "iteration_duration": { + "avg": 251.2750100836128, + "min": 64.6816, + "med": 224.89679999999998, + "max": 3853.3337, + "p(90)": 345.05071, + "p(95)": 411.37787999999995 + }, + "http_req_duration": { + "min": 14.2772, + "med": 174.4979, + "max": 3800.9551, + "p(90)": 294.472, + "p(95)": 361.2556, + "avg": 200.8608366775359 + }, + "http_req_sending": { + "avg": 0.017327982610149634, + "min": 0, + "med": 0, + "max": 33.6355, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 21.5218, + "p(90)": 0, + "p(95)": 0, + "avg": 0.017367143215450204 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 5432955, + "rate": 174415.76406938277 + }, + "http_reqs": { + "count": 11961, + "rate": 383.9875268677703 + }, + "http_req_duration{expected_response:true}": { + "max": 3800.9551, + "p(90)": 294.472, + "p(95)": 361.2556, + "avg": 200.8608366775359, + "min": 14.2772, + "med": 174.4979 + }, + "vus": { + "min": 80, + "max": 100, + "value": 98 + }, + "http_req_failed": { + "passes": 0, + "fails": 11961, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_blocked": { + "max": 31.7602, + "p(90)": 0, + "p(95)": 0, + "avg": 0.02710535072318369, + "min": 0, + "med": 0 + }, + "iterations": { + "count": 11960, + "rate": 383.9554235714851 + } + }, + "root_group": { + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 11960, + "fails": 0 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + } +} diff --git a/benchmarks/raw/fix_b-100vu-warmup.txt b/benchmarks/raw/fix_b-100vu-warmup.txt new file mode 100644 index 0000000..4c6671f --- /dev/null +++ b/benchmarks/raw/fix_b-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 080/100 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 100 VUs 00.0s/30s + +running (0m02.0s), 100/100 VUs, 357 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 01.0s/30s + +running (0m03.0s), 100/100 VUs, 673 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.0s/30s + +running (0m04.0s), 100/100 VUs, 1012 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 03.0s/30s + +running (0m05.0s), 100/100 VUs, 1326 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 04.0s/30s + +running (0m06.0s), 100/100 VUs, 1672 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.0s/30s + +running (0m07.0s), 100/100 VUs, 2087 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 06.0s/30s + +running (0m08.0s), 100/100 VUs, 2499 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 07.0s/30s + +running (0m09.0s), 100/100 VUs, 2923 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.0s/30s + +running (0m10.0s), 100/100 VUs, 3342 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 09.0s/30s + +running (0m11.0s), 100/100 VUs, 3855 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 10.0s/30s + +running (0m12.0s), 100/100 VUs, 4360 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.0s/30s + +running (0m13.0s), 100/100 VUs, 4696 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 12.0s/30s + +running (0m14.0s), 100/100 VUs, 4957 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 13.0s/30s + +running (0m15.0s), 100/100 VUs, 5259 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.0s/30s + +running (0m16.0s), 100/100 VUs, 5643 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 15.0s/30s + +running (0m17.0s), 100/100 VUs, 6067 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 16.0s/30s + +running (0m18.0s), 100/100 VUs, 6518 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.0s/30s + +running (0m19.0s), 100/100 VUs, 6936 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 18.0s/30s + +running (0m20.0s), 100/100 VUs, 7325 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 19.0s/30s + +running (0m21.0s), 100/100 VUs, 7685 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.0s/30s + +running (0m22.0s), 100/100 VUs, 8119 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 21.0s/30s + +running (0m23.0s), 100/100 VUs, 8559 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 22.0s/30s + +running (0m24.0s), 100/100 VUs, 9022 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.0s/30s + +running (0m25.0s), 100/100 VUs, 9424 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 24.0s/30s + +running (0m26.0s), 100/100 VUs, 9864 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 25.0s/30s + +running (0m27.0s), 100/100 VUs, 10241 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.0s/30s + +running (0m28.0s), 100/100 VUs, 10579 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 27.0s/30s + +running (0m29.0s), 100/100 VUs, 10957 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 28.0s/30s + +running (0m30.0s), 100/100 VUs, 11433 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.0s/30s + +running (0m31.0s), 098/100 VUs, 11862 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 11960 383.955424/s + checks_succeeded...: 100.00% 11960 out of 11960 + checks_failed......: 0.00% 0 out of 11960 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=200.86ms min=14.27ms med=174.49ms max=3.8s p(90)=294.47ms p(95)=361.25ms + { expected_response:true }...: avg=200.86ms min=14.27ms med=174.49ms max=3.8s p(90)=294.47ms p(95)=361.25ms + http_req_failed................: 0.00% 0 out of 11961 + http_reqs......................: 11961 383.987527/s + + EXECUTION + iteration_duration.............: avg=251.27ms min=64.68ms med=224.89ms max=3.85s p(90)=345.05ms p(95)=411.37ms + iterations.....................: 11960 383.955424/s + vus............................: 98 min=80 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.9 MB 126 kB/s + data_sent......................: 5.4 MB 174 kB/s + + + + +running (0m31.1s), 000/100 VUs, 11960 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b-20vu-run1.json b/benchmarks/raw/fix_b-20vu-run1.json new file mode 100644 index 0000000..cfd565a --- /dev/null +++ b/benchmarks/raw/fix_b-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7860 + } + } + }, + "metrics": { + "http_req_connecting": { + "avg": 0.0025194122885129123, + "min": 0, + "med": 0, + "max": 1.5239, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 7860, + "rate": 252.51952967087448 + }, + "http_reqs": { + "count": 7861, + "rate": 252.55165683749925 + }, + "checks": { + "passes": 7860, + "fails": 0, + "value": 1 + }, + "http_req_blocked": { + "med": 0, + "max": 31.0366, + "p(90)": 0, + "p(95)": 0, + "avg": 0.007999669253275665, + "min": 0 + }, + "data_sent": { + "count": 3580137, + "rate": 115019.65793858722 + }, + "data_received": { + "count": 2647286, + "rate": 85049.79842548227 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration": { + "p(95)": 56.4901, + "avg": 26.120749942755328, + "min": 7.2862, + "med": 22.4962, + "max": 982.0118, + "p(90)": 43.0367 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "avg": 0.005894529958020609, + "min": 0, + "med": 0, + "max": 1.9608, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 7861, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_waiting": { + "avg": 26.02711899249454, + "min": 6.4115, + "med": 22.395, + "max": 975.2123, + "p(90)": 42.9461, + "p(95)": 56.2833 + }, + "iteration_duration": { + "avg": 76.47821715012697, + "min": 57.8396, + "med": 72.9785, + "max": 246.3833, + "p(90)": 93.56839000000001, + "p(95)": 106.9744799999999 + }, + "http_req_receiving": { + "max": 6.7995, + "p(90)": 0.5322, + "p(95)": 0.5484, + "avg": 0.08773642030276062, + "min": 0, + "med": 0 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 56.4901, + "avg": 26.120749942755328, + "min": 7.2862, + "med": 22.4962, + "max": 982.0118, + "p(90)": 43.0367 + } + } +} diff --git a/benchmarks/raw/fix_b-20vu-run1.txt b/benchmarks/raw/fix_b-20vu-run1.txt new file mode 100644 index 0000000..f06bd87 --- /dev/null +++ b/benchmarks/raw/fix_b-20vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 264 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 01.0s/30s + +running (0m03.0s), 20/20 VUs, 531 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.0s/30s + +running (0m04.0s), 20/20 VUs, 813 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.0s/30s + +running (0m05.0s), 20/20 VUs, 1062 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 04.0s/30s + +running (0m06.0s), 20/20 VUs, 1345 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.0s/30s + +running (0m07.0s), 20/20 VUs, 1597 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.0s/30s + +running (0m08.0s), 20/20 VUs, 1847 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 07.0s/30s + +running (0m09.0s), 20/20 VUs, 2106 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m10.0s), 20/20 VUs, 2399 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.0s/30s + +running (0m11.0s), 20/20 VUs, 2683 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 10.0s/30s + +running (0m12.0s), 20/20 VUs, 2972 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m13.0s), 20/20 VUs, 3246 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m14.0s), 20/20 VUs, 3545 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m15.0s), 20/20 VUs, 3836 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.0s/30s + +running (0m16.0s), 20/20 VUs, 4092 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.0s/30s + +running (0m17.0s), 20/20 VUs, 4316 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m18.0s), 20/20 VUs, 4604 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.0s/30s + +running (0m19.0s), 20/20 VUs, 4818 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.0s/30s + +running (0m20.0s), 20/20 VUs, 5057 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 19.0s/30s + +running (0m21.0s), 20/20 VUs, 5339 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.0s/30s + +running (0m22.0s), 20/20 VUs, 5628 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.0s/30s + +running (0m23.0s), 20/20 VUs, 5881 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 22.0s/30s + +running (0m24.0s), 20/20 VUs, 6149 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.0s/30s + +running (0m25.0s), 20/20 VUs, 6408 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.0s/30s + +running (0m26.0s), 20/20 VUs, 6652 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 25.0s/30s + +running (0m27.0s), 20/20 VUs, 6853 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.0s/30s + +running (0m28.0s), 20/20 VUs, 7100 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m29.0s), 20/20 VUs, 7344 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m30.0s), 20/20 VUs, 7608 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m31.0s), 20/20 VUs, 7825 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7860 252.51953/s + checks_succeeded...: 100.00% 7860 out of 7860 + checks_failed......: 0.00% 0 out of 7860 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=26.12ms min=7.28ms med=22.49ms max=982.01ms p(90)=43.03ms p(95)=56.49ms + { expected_response:true }...: avg=26.12ms min=7.28ms med=22.49ms max=982.01ms p(90)=43.03ms p(95)=56.49ms + http_req_failed................: 0.00% 0 out of 7861 + http_reqs......................: 7861 252.551657/s + + EXECUTION + iteration_duration.............: avg=76.47ms min=57.83ms med=72.97ms max=246.38ms p(90)=93.56ms p(95)=106.97ms + iterations.....................: 7860 252.51953/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.6 MB 85 kB/s + data_sent......................: 3.6 MB 115 kB/s + + + + +running (0m31.1s), 00/20 VUs, 7860 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/fix_b-20vu-run2.json b/benchmarks/raw/fix_b-20vu-run2.json new file mode 100644 index 0000000..1561422 --- /dev/null +++ b/benchmarks/raw/fix_b-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 7662, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "iteration_duration": { + "avg": 78.33655207517612, + "min": 57.5396, + "med": 73.0237, + "max": 464.1048, + "p(90)": 98.68244000000004, + "p(95)": 109.29693999999999 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_failed": { + "passes": 0, + "fails": 7663, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "iterations": { + "count": 7662, + "rate": 246.73107489816104 + }, + "http_req_sending": { + "avg": 0.006832559049980424, + "min": 0, + "med": 0, + "max": 3.0838, + "p(90)": 0, + "p(95)": 0 + }, + "http_reqs": { + "count": 7663, + "rate": 246.76327681344404 + }, + "http_req_waiting": { + "max": 940.5111, + "p(90)": 48.08346, + "p(95)": 58.64579, + "avg": 27.88733827482715, + "min": 7.1645, + "med": 22.4665 + }, + "http_req_duration": { + "p(95)": 58.741479999999974, + "avg": 27.980922119274464, + "min": 7.1645, + "med": 22.5201, + "max": 942.1374, + "p(90)": 48.15602000000001 + }, + "data_sent": { + "rate": 112379.82184837802, + "count": 3489849 + }, + "http_req_connecting": { + "max": 3.5989, + "p(90)": 0, + "p(95)": 0, + "avg": 0.004002440297533603, + "min": 0, + "med": 0 + }, + "http_req_duration{expected_response:true}": { + "avg": 27.980922119274464, + "min": 7.1645, + "med": 22.5201, + "max": 942.1374, + "p(90)": 48.15602000000001, + "p(95)": 58.741479999999974 + }, + "vus": { + "max": 20, + "value": 20, + "min": 0 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 1.7144, + "p(90)": 0.5331, + "p(95)": 0.5465, + "avg": 0.08675128539736401 + }, + "data_received": { + "count": 2585510, + "rate": 83258.37398328692 + }, + "http_req_blocked": { + "med": 0, + "max": 38.6267, + "p(90)": 0, + "p(95)": 0, + "avg": 0.010695236852407673, + "min": 0 + }, + "checks": { + "passes": 7662, + "fails": 0, + "value": 1 + } + } +} diff --git a/benchmarks/raw/fix_b-20vu-run2.txt b/benchmarks/raw/fix_b-20vu-run2.txt new file mode 100644 index 0000000..967e672 --- /dev/null +++ b/benchmarks/raw/fix_b-20vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 191 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 01.0s/30s + +running (0m03.0s), 20/20 VUs, 315 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.0s/30s + +running (0m04.0s), 20/20 VUs, 550 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.0s/30s + +running (0m05.0s), 20/20 VUs, 828 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 04.0s/30s + +running (0m06.0s), 20/20 VUs, 1112 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.0s/30s + +running (0m07.0s), 20/20 VUs, 1359 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.0s/30s + +running (0m08.0s), 20/20 VUs, 1636 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 07.0s/30s + +running (0m09.0s), 20/20 VUs, 1888 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m10.0s), 20/20 VUs, 2121 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.0s/30s + +running (0m11.0s), 20/20 VUs, 2360 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 10.0s/30s + +running (0m12.0s), 20/20 VUs, 2626 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m13.0s), 20/20 VUs, 2893 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m14.0s), 20/20 VUs, 3170 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m15.0s), 20/20 VUs, 3404 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.0s/30s + +running (0m16.0s), 20/20 VUs, 3688 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.0s/30s + +running (0m17.0s), 20/20 VUs, 3926 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m18.0s), 20/20 VUs, 4155 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.0s/30s + +running (0m19.0s), 20/20 VUs, 4387 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.0s/30s + +running (0m20.0s), 20/20 VUs, 4583 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 19.0s/30s + +running (0m21.0s), 20/20 VUs, 4858 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.0s/30s + +running (0m22.0s), 20/20 VUs, 5159 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.0s/30s + +running (0m23.0s), 20/20 VUs, 5445 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 22.0s/30s + +running (0m24.0s), 20/20 VUs, 5739 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.0s/30s + +running (0m25.0s), 20/20 VUs, 6021 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.0s/30s + +running (0m26.0s), 20/20 VUs, 6250 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 25.0s/30s + +running (0m27.0s), 20/20 VUs, 6477 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.0s/30s + +running (0m28.0s), 20/20 VUs, 6769 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m29.0s), 20/20 VUs, 7056 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m30.0s), 20/20 VUs, 7347 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m31.0s), 20/20 VUs, 7642 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7662 246.731075/s + checks_succeeded...: 100.00% 7662 out of 7662 + checks_failed......: 0.00% 0 out of 7662 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=27.98ms min=7.16ms med=22.52ms max=942.13ms p(90)=48.15ms p(95)=58.74ms + { expected_response:true }...: avg=27.98ms min=7.16ms med=22.52ms max=942.13ms p(90)=48.15ms p(95)=58.74ms + http_req_failed................: 0.00% 0 out of 7663 + http_reqs......................: 7663 246.763277/s + + EXECUTION + iteration_duration.............: avg=78.33ms min=57.53ms med=73.02ms max=464.1ms p(90)=98.68ms p(95)=109.29ms + iterations.....................: 7662 246.731075/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.6 MB 83 kB/s + data_sent......................: 3.5 MB 112 kB/s + + + + +running (0m31.1s), 00/20 VUs, 7662 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/fix_b-20vu-run3.json b/benchmarks/raw/fix_b-20vu-run3.json new file mode 100644 index 0000000..6f69d4b --- /dev/null +++ b/benchmarks/raw/fix_b-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8046, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "http_req_receiving": { + "max": 2.1318, + "p(90)": 0.52764, + "p(95)": 0.5455, + "avg": 0.08113939356281853, + "min": 0, + "med": 0 + }, + "http_reqs": { + "count": 8047, + "rate": 260.03340946212364 + }, + "iteration_duration": { + "p(90)": 92.21615, + "p(95)": 102.983375, + "avg": 74.6452020755653, + "min": 56.9596, + "med": 70.72985, + "max": 184.0295 + }, + "http_req_failed": { + "passes": 0, + "fails": 8047, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "max": 29.6218, + "p(90)": 0, + "p(95)": 0, + "avg": 0.00798037778053933, + "min": 0, + "med": 0 + }, + "http_req_waiting": { + "avg": 24.205525748726178, + "min": 6.5597, + "med": 20.1593, + "max": 842.3385, + "p(90)": 41.446380000000026, + "p(95)": 52.26531999999999 + }, + "checks": { + "passes": 8046, + "fails": 0, + "value": 1 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_sending": { + "avg": 0.0032564806760283335, + "min": 0, + "med": 0, + "max": 3.3029, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 52.50977999999998, + "avg": 24.28992162296503, + "min": 6.5597, + "med": 20.2871, + "max": 844.4703, + "p(90)": 41.70184000000002 + }, + "http_req_connecting": { + "med": 0, + "max": 2.0915, + "p(90)": 0, + "p(95)": 0, + "avg": 0.0025875978625574747, + "min": 0 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration": { + "p(90)": 41.70184000000002, + "p(95)": 52.50977999999998, + "avg": 24.28992162296503, + "min": 6.5597, + "med": 20.2871, + "max": 844.4703 + }, + "data_sent": { + "count": 3664953, + "rate": 118430.49883291144 + }, + "data_received": { + "count": 2705318, + "rate": 87420.53724608592 + }, + "iterations": { + "count": 8046, + "rate": 260.0010951326267 + } + } +} diff --git a/benchmarks/raw/fix_b-20vu-run3.txt b/benchmarks/raw/fix_b-20vu-run3.txt new file mode 100644 index 0000000..b037943 --- /dev/null +++ b/benchmarks/raw/fix_b-20vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 8 complete and 0 interrupted iterations +default [ 0% ] 20 VUs 00.1s/30s + +running (0m02.0s), 20/20 VUs, 310 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.1s/30s + +running (0m03.0s), 20/20 VUs, 518 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.1s/30s + +running (0m04.0s), 20/20 VUs, 703 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.1s/30s + +running (0m05.0s), 20/20 VUs, 897 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.1s/30s + +running (0m06.0s), 20/20 VUs, 1107 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.1s/30s + +running (0m07.0s), 20/20 VUs, 1308 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.1s/30s + +running (0m08.0s), 20/20 VUs, 1592 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.1s/30s + +running (0m09.0s), 20/20 VUs, 1894 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.1s/30s + +running (0m10.0s), 20/20 VUs, 2168 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.1s/30s + +running (0m11.0s), 20/20 VUs, 2461 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.1s/30s + +running (0m12.0s), 20/20 VUs, 2750 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.1s/30s + +running (0m13.0s), 20/20 VUs, 3012 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.1s/30s + +running (0m14.0s), 20/20 VUs, 3281 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.1s/30s + +running (0m15.0s), 20/20 VUs, 3572 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.1s/30s + +running (0m16.0s), 20/20 VUs, 3872 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.1s/30s + +running (0m17.0s), 20/20 VUs, 4173 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.1s/30s + +running (0m18.0s), 20/20 VUs, 4443 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.1s/30s + +running (0m19.0s), 20/20 VUs, 4727 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.1s/30s + +running (0m20.0s), 20/20 VUs, 4996 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.1s/30s + +running (0m21.0s), 20/20 VUs, 5265 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.1s/30s + +running (0m22.0s), 20/20 VUs, 5534 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.1s/30s + +running (0m23.0s), 20/20 VUs, 5813 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.1s/30s + +running (0m24.0s), 20/20 VUs, 6097 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.1s/30s + +running (0m25.0s), 20/20 VUs, 6402 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.1s/30s + +running (0m26.0s), 20/20 VUs, 6682 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.1s/30s + +running (0m27.0s), 20/20 VUs, 6973 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.1s/30s + +running (0m28.0s), 20/20 VUs, 7235 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.1s/30s + +running (0m29.0s), 20/20 VUs, 7496 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.1s/30s + +running (0m30.0s), 20/20 VUs, 7775 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.1s/30s + +running (0m30.9s), 00/20 VUs, 8046 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8046 260.001095/s + checks_succeeded...: 100.00% 8046 out of 8046 + checks_failed......: 0.00% 0 out of 8046 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=24.28ms min=6.55ms med=20.28ms max=844.47ms p(90)=41.7ms p(95)=52.5ms + { expected_response:true }...: avg=24.28ms min=6.55ms med=20.28ms max=844.47ms p(90)=41.7ms p(95)=52.5ms + http_req_failed................: 0.00% 0 out of 8047 + http_reqs......................: 8047 260.033409/s + + EXECUTION + iteration_duration.............: avg=74.64ms min=56.95ms med=70.72ms max=184.02ms p(90)=92.21ms p(95)=102.98ms + iterations.....................: 8046 260.001095/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.7 MB 87 kB/s + data_sent......................: 3.7 MB 118 kB/s + + + + +running (0m30.9s), 00/20 VUs, 8046 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/fix_b-20vu-warmup.json b/benchmarks/raw/fix_b-20vu-warmup.json new file mode 100644 index 0000000..2ee28d3 --- /dev/null +++ b/benchmarks/raw/fix_b-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6499, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "http_req_duration{expected_response:true}": { + "avg": 42.02562413846141, + "min": 6.6856, + "med": 24.2202, + "max": 1965.3214, + "p(90)": 62.58686000000001, + "p(95)": 91.32602499999994 + }, + "iteration_duration": { + "p(95)": 141.77002999999993, + "avg": 92.39047058008907, + "min": 57.185, + "med": 74.6096, + "max": 2015.8077, + "p(90)": 113.15531999999999 + }, + "checks": { + "passes": 6499, + "fails": 0, + "value": 1 + }, + "iterations": { + "rate": 210.34239884582578, + "count": 6499 + }, + "http_req_connecting": { + "avg": 0.0029591538461538466, + "min": 0, + "med": 0, + "max": 2.5262, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 6500, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration": { + "p(90)": 62.58686000000001, + "p(95)": 91.32602499999994, + "avg": 42.02562413846141, + "min": 6.6856, + "med": 24.2202, + "max": 1965.3214 + }, + "http_reqs": { + "count": 6500, + "rate": 210.37476419416336 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.008858707692307689, + "min": 0, + "med": 0, + "max": 26.8335 + }, + "http_req_waiting": { + "avg": 41.931871246153754, + "min": 6.6856, + "med": 24.0945, + "max": 1965.3214, + "p(90)": 62.503600000000034, + "p(95)": 91.20931499999992 + }, + "http_req_receiving": { + "avg": 0.08521603076923076, + "min": 0, + "med": 0, + "max": 5.4494, + "p(90)": 0.5311, + "p(95)": 0.5467 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 2222654, + "rate": 71936.97094387907 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 32.0378, + "p(90)": 0, + "p(95)": 0, + "avg": 0.008536861538461537 + }, + "data_sent": { + "rate": 95785.92807733454, + "count": 2959521 + } + } +} diff --git a/benchmarks/raw/fix_b-20vu-warmup.txt b/benchmarks/raw/fix_b-20vu-warmup.txt new file mode 100644 index 0000000..ac7a95e --- /dev/null +++ b/benchmarks/raw/fix_b-20vu-warmup.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 1% ] 20 VUs 00.2s/30s + +running (0m02.0s), 20/20 VUs, 154 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.2s/30s + +running (0m03.0s), 20/20 VUs, 331 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.2s/30s + +running (0m04.0s), 20/20 VUs, 538 complete and 0 interrupted iterations +default [ 11% ] 20 VUs 03.2s/30s + +running (0m05.0s), 20/20 VUs, 805 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.2s/30s + +running (0m06.0s), 20/20 VUs, 1080 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.2s/30s + +running (0m07.0s), 20/20 VUs, 1355 complete and 0 interrupted iterations +default [ 21% ] 20 VUs 06.2s/30s + +running (0m08.0s), 20/20 VUs, 1636 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.2s/30s + +running (0m09.0s), 20/20 VUs, 1867 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.2s/30s + +running (0m10.0s), 20/20 VUs, 2102 complete and 0 interrupted iterations +default [ 31% ] 20 VUs 09.2s/30s + +running (0m11.0s), 20/20 VUs, 2335 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.2s/30s + +running (0m12.0s), 20/20 VUs, 2511 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.2s/30s + +running (0m13.0s), 20/20 VUs, 2627 complete and 0 interrupted iterations +default [ 41% ] 20 VUs 12.2s/30s + +running (0m14.0s), 20/20 VUs, 2673 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.2s/30s + +running (0m15.0s), 20/20 VUs, 2676 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.2s/30s + +running (0m16.0s), 20/20 VUs, 2713 complete and 0 interrupted iterations +default [ 51% ] 20 VUs 15.2s/30s + +running (0m17.0s), 20/20 VUs, 2753 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.2s/30s + +running (0m18.0s), 20/20 VUs, 2987 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.2s/30s + +running (0m19.0s), 20/20 VUs, 3244 complete and 0 interrupted iterations +default [ 61% ] 20 VUs 18.2s/30s + +running (0m20.0s), 20/20 VUs, 3512 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.2s/30s + +running (0m21.0s), 20/20 VUs, 3781 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.2s/30s + +running (0m22.0s), 20/20 VUs, 4017 complete and 0 interrupted iterations +default [ 71% ] 20 VUs 21.2s/30s + +running (0m23.0s), 20/20 VUs, 4287 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.2s/30s + +running (0m24.0s), 20/20 VUs, 4562 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.2s/30s + +running (0m25.0s), 20/20 VUs, 4850 complete and 0 interrupted iterations +default [ 81% ] 20 VUs 24.2s/30s + +running (0m26.0s), 20/20 VUs, 5126 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.2s/30s + +running (0m27.0s), 20/20 VUs, 5431 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.2s/30s + +running (0m28.0s), 20/20 VUs, 5716 complete and 0 interrupted iterations +default [ 91% ] 20 VUs 27.2s/30s + +running (0m29.0s), 20/20 VUs, 5968 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.2s/30s + +running (0m30.0s), 20/20 VUs, 6256 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.2s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6499 210.342399/s + checks_succeeded...: 100.00% 6499 out of 6499 + checks_failed......: 0.00% 0 out of 6499 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=42.02ms min=6.68ms med=24.22ms max=1.96s p(90)=62.58ms p(95)=91.32ms + { expected_response:true }...: avg=42.02ms min=6.68ms med=24.22ms max=1.96s p(90)=62.58ms p(95)=91.32ms + http_req_failed................: 0.00% 0 out of 6500 + http_reqs......................: 6500 210.374764/s + + EXECUTION + iteration_duration.............: avg=92.39ms min=57.18ms med=74.6ms max=2.01s p(90)=113.15ms p(95)=141.77ms + iterations.....................: 6499 210.342399/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.2 MB 72 kB/s + data_sent......................: 3.0 MB 96 kB/s + + + + +running (0m30.9s), 00/20 VUs, 6499 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/fix_b-50vu-run1.json b/benchmarks/raw/fix_b-50vu-run1.json new file mode 100644 index 0000000..cc7d230 --- /dev/null +++ b/benchmarks/raw/fix_b-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "iterations": { + "count": 12143, + "rate": 391.4781307333529 + }, + "http_req_failed": { + "fails": 12144, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_receiving": { + "max": 2.2737, + "p(90)": 0.52827, + "p(95)": 0.546, + "avg": 0.0797510951910407, + "min": 0, + "med": 0 + }, + "data_sent": { + "count": 5526885, + "rate": 178181.2244567411 + }, + "checks": { + "passes": 12143, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 12144, + "rate": 391.51036972954273 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 14.4377, + "p(90)": 0, + "p(95)": 0, + "avg": 0.006760037878787878 + }, + "data_received": { + "count": 3983582, + "rate": 128426.68491995646 + }, + "vus_max": { + "max": 50, + "value": 50, + "min": 50 + }, + "iteration_duration": { + "med": 119.038, + "max": 490.5846, + "p(90)": 160.96104, + "p(95)": 178.12864, + "avg": 123.62204825002098, + "min": 61.5496 + }, + "http_req_waiting": { + "avg": 73.14695233860336, + "min": 11.0064, + "med": 68.48695000000001, + "max": 887.33, + "p(90)": 110.41434000000001, + "p(95)": 127.5620500000001 + }, + "vus": { + "max": 50, + "value": 30, + "min": 30 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 28.0096, + "p(90)": 0, + "p(95)": 0, + "avg": 0.01115803689064559 + }, + "http_req_connecting": { + "avg": 0.006218453557312255, + "min": 0, + "med": 0, + "max": 13.9562, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "med": 68.58695, + "max": 888.4486, + "p(90)": 110.44942, + "p(95)": 127.70579000000002, + "avg": 73.23346347167323, + "min": 11.0064 + }, + "http_req_duration{expected_response:true}": { + "avg": 73.23346347167323, + "min": 11.0064, + "med": 68.58695, + "max": 888.4486, + "p(90)": 110.44942, + "p(95)": 127.70579000000002 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 12143, + "fails": 0 + } + } + } +} diff --git a/benchmarks/raw/fix_b-50vu-run1.txt b/benchmarks/raw/fix_b-50vu-run1.txt new file mode 100644 index 0000000..6e45e7e --- /dev/null +++ b/benchmarks/raw/fix_b-50vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 50 VUs 00.1s/30s + +running (0m02.0s), 50/50 VUs, 383 complete and 0 interrupted iterations +default [ 4% ] 50 VUs 01.1s/30s + +running (0m03.0s), 50/50 VUs, 764 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.1s/30s + +running (0m04.0s), 50/50 VUs, 1103 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.1s/30s + +running (0m05.0s), 50/50 VUs, 1526 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.1s/30s + +running (0m06.0s), 50/50 VUs, 1983 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.1s/30s + +running (0m07.0s), 50/50 VUs, 2426 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.1s/30s + +running (0m08.0s), 50/50 VUs, 2867 complete and 0 interrupted iterations +default [ 24% ] 50 VUs 07.1s/30s + +running (0m09.0s), 50/50 VUs, 3348 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.1s/30s + +running (0m10.0s), 50/50 VUs, 3772 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.1s/30s + +running (0m11.0s), 50/50 VUs, 4111 complete and 0 interrupted iterations +default [ 34% ] 50 VUs 10.1s/30s + +running (0m12.0s), 50/50 VUs, 4448 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.1s/30s + +running (0m13.0s), 50/50 VUs, 4763 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.1s/30s + +running (0m14.0s), 50/50 VUs, 5206 complete and 0 interrupted iterations +default [ 44% ] 50 VUs 13.1s/30s + +running (0m15.0s), 50/50 VUs, 5658 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.1s/30s + +running (0m16.0s), 50/50 VUs, 6095 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.1s/30s + +running (0m17.0s), 50/50 VUs, 6509 complete and 0 interrupted iterations +default [ 54% ] 50 VUs 16.1s/30s + +running (0m18.0s), 50/50 VUs, 6974 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.1s/30s + +running (0m19.0s), 50/50 VUs, 7371 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.1s/30s + +running (0m20.0s), 50/50 VUs, 7754 complete and 0 interrupted iterations +default [ 64% ] 50 VUs 19.1s/30s + +running (0m21.0s), 50/50 VUs, 8155 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.1s/30s + +running (0m22.0s), 50/50 VUs, 8592 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.1s/30s + +running (0m23.0s), 50/50 VUs, 8971 complete and 0 interrupted iterations +default [ 74% ] 50 VUs 22.1s/30s + +running (0m24.0s), 50/50 VUs, 9437 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.1s/30s + +running (0m25.0s), 50/50 VUs, 9884 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.1s/30s + +running (0m26.0s), 50/50 VUs, 10296 complete and 0 interrupted iterations +default [ 84% ] 50 VUs 25.1s/30s + +running (0m27.0s), 50/50 VUs, 10645 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.1s/30s + +running (0m28.0s), 50/50 VUs, 10962 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.1s/30s + +running (0m29.0s), 50/50 VUs, 11310 complete and 0 interrupted iterations +default [ 94% ] 50 VUs 28.1s/30s + +running (0m30.0s), 50/50 VUs, 11726 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.1s/30s + +running (0m31.0s), 30/50 VUs, 12113 complete and 0 interrupted iterations +default โ†“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 12143 391.478131/s + checks_succeeded...: 100.00% 12143 out of 12143 + checks_failed......: 0.00% 0 out of 12143 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=73.23ms min=11ms med=68.58ms max=888.44ms p(90)=110.44ms p(95)=127.7ms + { expected_response:true }...: avg=73.23ms min=11ms med=68.58ms max=888.44ms p(90)=110.44ms p(95)=127.7ms + http_req_failed................: 0.00% 0 out of 12144 + http_reqs......................: 12144 391.51037/s + + EXECUTION + iteration_duration.............: avg=123.62ms min=61.54ms med=119.03ms max=490.58ms p(90)=160.96ms p(95)=178.12ms + iterations.....................: 12143 391.478131/s + vus............................: 30 min=30 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 4.0 MB 128 kB/s + data_sent......................: 5.5 MB 178 kB/s + + + + +running (0m31.0s), 00/50 VUs, 12143 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b-50vu-run2.json b/benchmarks/raw/fix_b-50vu-run2.json new file mode 100644 index 0000000..5c1f2e5 --- /dev/null +++ b/benchmarks/raw/fix_b-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 10395, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "data_received": { + "rate": 111071.14088990404, + "count": 3438206 + }, + "checks": { + "passes": 10395, + "fails": 0, + "value": 1 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "iterations": { + "count": 10395, + "rate": 335.8101607496911 + }, + "iteration_duration": { + "avg": 144.3283287349692, + "min": 58.7434, + "med": 135.9111, + "max": 515.0959, + "p(90)": 198.22114, + "p(95)": 219.6351799999999 + }, + "http_req_duration": { + "min": 8.6531, + "med": 85.3989, + "max": 846.4653, + "p(90)": 147.72655, + "p(95)": 169.13959999999997, + "avg": 93.89926515005754 + }, + "http_req_duration{expected_response:true}": { + "med": 85.3989, + "max": 846.4653, + "p(90)": 147.72655, + "p(95)": 169.13959999999997, + "avg": 93.89926515005754, + "min": 8.6531 + }, + "http_req_sending": { + "avg": 0.006211639091958447, + "min": 0, + "med": 0, + "max": 3.8365, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "min": 50, + "max": 50, + "value": 50 + }, + "http_req_receiving": { + "med": 0, + "max": 1.9675, + "p(90)": 0.5315, + "p(95)": 0.5472, + "avg": 0.08118315698345531, + "min": 0 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_reqs": { + "count": 10396, + "rate": 335.84246571946017 + }, + "http_req_connecting": { + "avg": 0.006408195459792228, + "min": 0, + "med": 0, + "max": 18.9098, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "avg": 93.81187035398193, + "min": 8.133, + "med": 85.30425, + "max": 844.8402, + "p(90)": 147.7126, + "p(95)": 168.982325 + }, + "data_sent": { + "count": 4729797, + "rate": 152795.94909893282 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.01387740477106579, + "min": 0, + "med": 0, + "max": 35.0354 + }, + "http_req_failed": { + "passes": 0, + "fails": 10396, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + } + } +} diff --git a/benchmarks/raw/fix_b-50vu-run2.txt b/benchmarks/raw/fix_b-50vu-run2.txt new file mode 100644 index 0000000..22d153a --- /dev/null +++ b/benchmarks/raw/fix_b-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 1 complete and 0 interrupted iterations +default [ 0% ] 50 VUs 00.1s/30s + +running (0m02.0s), 50/50 VUs, 399 complete and 0 interrupted iterations +default [ 4% ] 50 VUs 01.1s/30s + +running (0m03.0s), 50/50 VUs, 801 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.1s/30s + +running (0m04.0s), 50/50 VUs, 1215 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.1s/30s + +running (0m05.0s), 50/50 VUs, 1553 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.1s/30s + +running (0m06.0s), 50/50 VUs, 1867 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.1s/30s + +running (0m07.0s), 50/50 VUs, 2169 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.1s/30s + +running (0m08.0s), 50/50 VUs, 2422 complete and 0 interrupted iterations +default [ 24% ] 50 VUs 07.1s/30s + +running (0m09.0s), 50/50 VUs, 2690 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.1s/30s + +running (0m10.0s), 50/50 VUs, 2951 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.1s/30s + +running (0m11.0s), 50/50 VUs, 3243 complete and 0 interrupted iterations +default [ 34% ] 50 VUs 10.1s/30s + +running (0m12.0s), 50/50 VUs, 3552 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.1s/30s + +running (0m13.0s), 50/50 VUs, 3770 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.1s/30s + +running (0m14.0s), 50/50 VUs, 4169 complete and 0 interrupted iterations +default [ 44% ] 50 VUs 13.1s/30s + +running (0m15.0s), 50/50 VUs, 4479 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.1s/30s + +running (0m16.0s), 50/50 VUs, 4800 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.1s/30s + +running (0m17.0s), 50/50 VUs, 5226 complete and 0 interrupted iterations +default [ 54% ] 50 VUs 16.1s/30s + +running (0m18.0s), 50/50 VUs, 5533 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.1s/30s + +running (0m19.0s), 50/50 VUs, 5859 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.1s/30s + +running (0m20.0s), 50/50 VUs, 6230 complete and 0 interrupted iterations +default [ 64% ] 50 VUs 19.1s/30s + +running (0m21.0s), 50/50 VUs, 6636 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.1s/30s + +running (0m22.0s), 50/50 VUs, 7029 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.1s/30s + +running (0m23.0s), 50/50 VUs, 7369 complete and 0 interrupted iterations +default [ 74% ] 50 VUs 22.1s/30s + +running (0m24.0s), 50/50 VUs, 7731 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.1s/30s + +running (0m25.0s), 50/50 VUs, 8119 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.1s/30s + +running (0m26.0s), 50/50 VUs, 8509 complete and 0 interrupted iterations +default [ 84% ] 50 VUs 25.1s/30s + +running (0m27.0s), 50/50 VUs, 8892 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.1s/30s + +running (0m28.0s), 50/50 VUs, 9284 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.1s/30s + +running (0m29.0s), 50/50 VUs, 9691 complete and 0 interrupted iterations +default [ 94% ] 50 VUs 28.1s/30s + +running (0m30.0s), 50/50 VUs, 10062 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.1s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10395 335.810161/s + checks_succeeded...: 100.00% 10395 out of 10395 + checks_failed......: 0.00% 0 out of 10395 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=93.89ms min=8.65ms med=85.39ms max=846.46ms p(90)=147.72ms p(95)=169.13ms + { expected_response:true }...: avg=93.89ms min=8.65ms med=85.39ms max=846.46ms p(90)=147.72ms p(95)=169.13ms + http_req_failed................: 0.00% 0 out of 10396 + http_reqs......................: 10396 335.842466/s + + EXECUTION + iteration_duration.............: avg=144.32ms min=58.74ms med=135.91ms max=515.09ms p(90)=198.22ms p(95)=219.63ms + iterations.....................: 10395 335.810161/s + vus............................: 50 min=50 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.4 MB 111 kB/s + data_sent......................: 4.7 MB 153 kB/s + + + + +running (0m31.0s), 00/50 VUs, 10395 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s + +running (0m31.0s), 00/50 VUs, 10395 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b-50vu-run3.json b/benchmarks/raw/fix_b-50vu-run3.json new file mode 100644 index 0000000..d4d50b0 --- /dev/null +++ b/benchmarks/raw/fix_b-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "iteration_duration": { + "p(90)": 159.93326000000002, + "p(95)": 176.40725499999996, + "avg": 124.38219946147417, + "min": 58.263, + "med": 118.4704, + "max": 571.8709 + }, + "data_received": { + "count": 3960806, + "rate": 127656.66993035967 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 29.5609, + "p(90)": 0, + "p(95)": 0, + "avg": 0.008123941678402783 + }, + "http_req_duration": { + "avg": 74.00896488277677, + "min": 7.4351, + "med": 68.0193, + "max": 899.2318, + "p(90)": 109.5673, + "p(95)": 125.588 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 5.525, + "p(90)": 0, + "p(95)": 0, + "avg": 0.003580564990473035 + }, + "checks": { + "fails": 0, + "passes": 12070, + "value": 1 + }, + "data_sent": { + "count": 5493597, + "rate": 177058.482278459 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "iterations": { + "rate": 389.0157725623121, + "count": 12070 + }, + "http_req_failed": { + "passes": 0, + "fails": 12071, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "value": 31, + "min": 31, + "max": 50 + }, + "http_reqs": { + "count": 12071, + "rate": 389.0480025351839 + }, + "http_req_receiving": { + "avg": 0.07594944080854947, + "min": 0, + "med": 0, + "max": 1.6175, + "p(90)": 0.5268, + "p(95)": 0.545 + }, + "http_req_connecting": { + "med": 0, + "max": 2.1146, + "p(90)": 0, + "p(95)": 0, + "avg": 0.003941910363681553, + "min": 0 + }, + "http_req_duration{expected_response:true}": { + "avg": 74.00896488277677, + "min": 7.4351, + "med": 68.0193, + "max": 899.2318, + "p(90)": 109.5673, + "p(95)": 125.588 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_waiting": { + "min": 7.4351, + "med": 67.9146, + "max": 897.6463, + "p(90)": 109.339, + "p(95)": 125.50425, + "avg": 73.92943487697794 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 12070, + "fails": 0, + "name": "status is 200" + } + } + } +} diff --git a/benchmarks/raw/fix_b-50vu-run3.txt b/benchmarks/raw/fix_b-50vu-run3.txt new file mode 100644 index 0000000..3c80887 --- /dev/null +++ b/benchmarks/raw/fix_b-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 50 VUs 00.0s/30s + +running (0m02.0s), 50/50 VUs, 357 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 01.0s/30s + +running (0m03.0s), 50/50 VUs, 715 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.0s/30s + +running (0m04.0s), 50/50 VUs, 1147 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.0s/30s + +running (0m05.0s), 50/50 VUs, 1550 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 04.0s/30s + +running (0m06.0s), 50/50 VUs, 1872 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.0s/30s + +running (0m07.0s), 50/50 VUs, 2226 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.0s/30s + +running (0m08.0s), 50/50 VUs, 2652 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 07.0s/30s + +running (0m09.0s), 50/50 VUs, 3085 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.0s/30s + +running (0m10.0s), 50/50 VUs, 3445 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.0s/30s + +running (0m11.0s), 50/50 VUs, 3801 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 10.0s/30s + +running (0m12.0s), 50/50 VUs, 4155 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.0s/30s + +running (0m13.0s), 50/50 VUs, 4433 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.0s/30s + +running (0m14.0s), 50/50 VUs, 4864 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 13.0s/30s + +running (0m15.0s), 50/50 VUs, 5324 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.0s/30s + +running (0m16.0s), 50/50 VUs, 5789 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.0s/30s + +running (0m17.0s), 50/50 VUs, 6220 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 16.0s/30s + +running (0m18.0s), 50/50 VUs, 6592 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.0s/30s + +running (0m19.0s), 50/50 VUs, 7027 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.0s/30s + +running (0m20.0s), 50/50 VUs, 7428 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 19.0s/30s + +running (0m21.0s), 50/50 VUs, 7812 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.0s/30s + +running (0m22.0s), 50/50 VUs, 8191 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.0s/30s + +running (0m23.0s), 50/50 VUs, 8617 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 22.0s/30s + +running (0m24.0s), 50/50 VUs, 9056 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.0s/30s + +running (0m25.0s), 50/50 VUs, 9424 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.0s/30s + +running (0m26.0s), 50/50 VUs, 9816 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 25.0s/30s + +running (0m27.0s), 50/50 VUs, 10296 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.0s/30s + +running (0m28.0s), 50/50 VUs, 10724 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.0s/30s + +running (0m29.0s), 50/50 VUs, 11193 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 28.0s/30s + +running (0m30.0s), 50/50 VUs, 11609 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.0s/30s + +running (0m31.0s), 31/50 VUs, 12039 complete and 0 interrupted iterations +default โ†“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 12070 389.015773/s + checks_succeeded...: 100.00% 12070 out of 12070 + checks_failed......: 0.00% 0 out of 12070 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=74ms min=7.43ms med=68.01ms max=899.23ms p(90)=109.56ms p(95)=125.58ms + { expected_response:true }...: avg=74ms min=7.43ms med=68.01ms max=899.23ms p(90)=109.56ms p(95)=125.58ms + http_req_failed................: 0.00% 0 out of 12071 + http_reqs......................: 12071 389.048003/s + + EXECUTION + iteration_duration.............: avg=124.38ms min=58.26ms med=118.47ms max=571.87ms p(90)=159.93ms p(95)=176.4ms + iterations.....................: 12070 389.015773/s + vus............................: 31 min=31 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 4.0 MB 128 kB/s + data_sent......................: 5.5 MB 177 kB/s + + + + +running (0m31.0s), 00/50 VUs, 12070 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b-50vu-warmup.json b/benchmarks/raw/fix_b-50vu-warmup.json new file mode 100644 index 0000000..db5b3a3 --- /dev/null +++ b/benchmarks/raw/fix_b-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10196, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_sending": { + "avg": 0.009193370599195843, + "min": 0, + "med": 0, + "max": 13.1751, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 2.6745, + "p(90)": 0.5285, + "p(95)": 0.5462, + "avg": 0.0798324703344121 + }, + "http_req_failed": { + "fails": 10197, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 130.34344000000002, + "p(95)": 267.7814, + "avg": 96.88043868784935, + "min": 15.6935, + "med": 72.5156, + "max": 961.3269 + }, + "http_reqs": { + "count": 10197, + "rate": 327.82534774587344 + }, + "iteration_duration": { + "p(95)": 317.448825, + "avg": 147.2649560317771, + "min": 65.9618, + "med": 122.94069999999999, + "max": 817.3438, + "p(90)": 180.8517 + }, + "checks": { + "passes": 10196, + "fails": 0, + "value": 1 + }, + "http_req_waiting": { + "max": 958.6524, + "p(90)": 130.1838, + "p(95)": 267.7814, + "avg": 96.7914128469157, + "min": 15.6935, + "med": 72.3853 + }, + "http_req_connecting": { + "avg": 0.007434186525448661, + "min": 0, + "med": 0, + "max": 8.0034, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "avg": 96.88043868784935, + "min": 15.6935, + "med": 72.5156, + "max": 961.3269, + "p(90)": 130.34344000000002, + "p(95)": 267.7814 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "data_sent": { + "count": 4639053, + "rate": 149141.82239252108 + }, + "iterations": { + "rate": 327.79319855025255, + "count": 10196 + }, + "data_received": { + "count": 3376118, + "rate": 108539.4780210947 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.014128920270667844, + "min": 0, + "med": 0, + "max": 39.42, + "p(90)": 0 + } + } +} diff --git a/benchmarks/raw/fix_b-50vu-warmup.txt b/benchmarks/raw/fix_b-50vu-warmup.txt new file mode 100644 index 0000000..60b2d3e --- /dev/null +++ b/benchmarks/raw/fix_b-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 340 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 01.0s/30s + +running (0m03.0s), 50/50 VUs, 735 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.0s/30s + +running (0m04.0s), 50/50 VUs, 1112 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.0s/30s + +running (0m05.0s), 50/50 VUs, 1550 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 04.0s/30s + +running (0m06.0s), 50/50 VUs, 1970 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.0s/30s + +running (0m07.0s), 50/50 VUs, 2285 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.0s/30s + +running (0m08.0s), 50/50 VUs, 2620 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 07.0s/30s + +running (0m09.0s), 50/50 VUs, 2934 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.0s/30s + +running (0m10.0s), 50/50 VUs, 3315 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.0s/30s + +running (0m11.0s), 50/50 VUs, 3761 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 10.0s/30s + +running (0m12.0s), 50/50 VUs, 4233 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.0s/30s + +running (0m13.0s), 50/50 VUs, 4680 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.0s/30s + +running (0m14.0s), 50/50 VUs, 5133 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 13.0s/30s + +running (0m15.0s), 50/50 VUs, 5571 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.0s/30s + +running (0m16.0s), 50/50 VUs, 5941 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.0s/30s + +running (0m17.0s), 50/50 VUs, 6190 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 16.0s/30s + +running (0m18.0s), 50/50 VUs, 6591 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.0s/30s + +running (0m19.0s), 50/50 VUs, 7035 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.0s/30s + +running (0m20.0s), 50/50 VUs, 7453 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 19.0s/30s + +running (0m21.0s), 50/50 VUs, 7891 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.0s/30s + +running (0m22.0s), 50/50 VUs, 8315 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.0s/30s + +running (0m23.0s), 50/50 VUs, 8697 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 22.0s/30s + +running (0m24.0s), 50/50 VUs, 9010 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.0s/30s + +running (0m25.0s), 50/50 VUs, 9396 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.0s/30s + +running (0m26.0s), 50/50 VUs, 9569 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 25.0s/30s + +running (0m27.0s), 50/50 VUs, 9656 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.0s/30s + +running (0m28.0s), 50/50 VUs, 9743 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.0s/30s + +running (0m29.0s), 50/50 VUs, 9830 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 28.0s/30s + +running (0m30.0s), 50/50 VUs, 9917 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.0s/30s + +running (0m31.0s), 50/50 VUs, 10140 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10196 327.793199/s + checks_succeeded...: 100.00% 10196 out of 10196 + checks_failed......: 0.00% 0 out of 10196 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=96.88ms min=15.69ms med=72.51ms max=961.32ms p(90)=130.34ms p(95)=267.78ms + { expected_response:true }...: avg=96.88ms min=15.69ms med=72.51ms max=961.32ms p(90)=130.34ms p(95)=267.78ms + http_req_failed................: 0.00% 0 out of 10197 + http_reqs......................: 10197 327.825348/s + + EXECUTION + iteration_duration.............: avg=147.26ms min=65.96ms med=122.94ms max=817.34ms p(90)=180.85ms p(95)=317.44ms + iterations.....................: 10196 327.793199/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.4 MB 109 kB/s + data_sent......................: 4.6 MB 149 kB/s + + + + +running (0m31.1s), 00/50 VUs, 10196 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_after-100vu-run1.json b/benchmarks/raw/fix_b_downstream_after-100vu-run1.json new file mode 100644 index 0000000..09adc17 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "p(90)": 0.5353, + "p(95)": 0.5481, + "avg": 0.08260111642743234, + "min": 0, + "med": 0, + "max": 22.7708 + }, + "http_req_blocked": { + "med": 0, + "max": 37.8283, + "p(90)": 0, + "p(95)": 0, + "avg": 0.0274284068757753, + "min": 0 + }, + "checks": { + "passes": 11285, + "fails": 0, + "value": 1 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_connecting": { + "avg": 0.019108240297713987, + "min": 0, + "med": 0, + "max": 18.7677, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 3715886, + "rate": 117966.13028177212 + }, + "data_sent": { + "count": 5125353, + "rate": 162711.68161188788 + }, + "http_req_failed": { + "passes": 0, + "fails": 11286, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 11286, + "rate": 358.29025604124564 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.01042465886939571, + "min": 0, + "med": 0, + "max": 9.2571, + "p(90)": 0 + }, + "http_req_duration": { + "avg": 215.41889328371443, + "min": 11.836, + "med": 202.4786, + "max": 1681.9082, + "p(90)": 311.79135, + "p(95)": 359.4674 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_waiting": { + "min": 11.3178, + "med": 202.4655, + "max": 1681.9082, + "p(90)": 311.49385, + "p(95)": 359.4674, + "avg": 215.3258675084176 + }, + "http_req_duration{expected_response:true}": { + "avg": 215.41889328371443, + "min": 11.836, + "med": 202.4786, + "max": 1681.9082, + "p(90)": 311.79135, + "p(95)": 359.4674 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "avg": 265.9337590872843, + "min": 62.3465, + "med": 253.068, + "max": 1733.0889, + "p(90)": 362.15782, + "p(95)": 410.35838 + }, + "iterations": { + "count": 11285, + "rate": 358.2585096070758 + } + }, + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 11285, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + }, + "name": "", + "path": "" + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_after-100vu-run1.txt b/benchmarks/raw/fix_b_downstream_after-100vu-run1.txt new file mode 100644 index 0000000..64258ed --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-100vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 176 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.6s/30s + +running (0m03.0s), 100/100 VUs, 471 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.6s/30s + +running (0m04.0s), 100/100 VUs, 901 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.6s/30s + +running (0m05.0s), 100/100 VUs, 1240 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.6s/30s + +running (0m06.0s), 100/100 VUs, 1645 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.6s/30s + +running (0m07.0s), 100/100 VUs, 1927 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.6s/30s + +running (0m08.0s), 100/100 VUs, 2256 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.6s/30s + +running (0m09.0s), 100/100 VUs, 2645 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.6s/30s + +running (0m10.0s), 100/100 VUs, 3077 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.6s/30s + +running (0m11.0s), 100/100 VUs, 3473 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.6s/30s + +running (0m12.0s), 100/100 VUs, 3806 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.6s/30s + +running (0m13.0s), 100/100 VUs, 4159 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.6s/30s + +running (0m14.0s), 100/100 VUs, 4525 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.6s/30s + +running (0m15.0s), 100/100 VUs, 4824 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.6s/30s + +running (0m16.0s), 100/100 VUs, 5146 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.6s/30s + +running (0m17.0s), 100/100 VUs, 5567 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.6s/30s + +running (0m18.0s), 100/100 VUs, 5967 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.6s/30s + +running (0m19.0s), 100/100 VUs, 6355 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.6s/30s + +running (0m20.0s), 100/100 VUs, 6803 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.6s/30s + +running (0m21.0s), 100/100 VUs, 7246 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.6s/30s + +running (0m22.0s), 100/100 VUs, 7647 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.6s/30s + +running (0m23.0s), 100/100 VUs, 7935 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.6s/30s + +running (0m24.0s), 100/100 VUs, 8259 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.6s/30s + +running (0m25.0s), 100/100 VUs, 8533 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.6s/30s + +running (0m26.0s), 100/100 VUs, 8978 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.6s/30s + +running (0m27.0s), 100/100 VUs, 9419 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.6s/30s + +running (0m28.0s), 100/100 VUs, 9871 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.6s/30s + +running (0m29.0s), 100/100 VUs, 10325 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.6s/30s + +running (0m30.0s), 100/100 VUs, 10724 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.6s/30s + +running (0m31.0s), 100/100 VUs, 11055 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 11285 358.25851/s + checks_succeeded...: 100.00% 11285 out of 11285 + checks_failed......: 0.00% 0 out of 11285 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=215.41ms min=11.83ms med=202.47ms max=1.68s p(90)=311.79ms p(95)=359.46ms + { expected_response:true }...: avg=215.41ms min=11.83ms med=202.47ms max=1.68s p(90)=311.79ms p(95)=359.46ms + http_req_failed................: 0.00% 0 out of 11286 + http_reqs......................: 11286 358.290256/s + + EXECUTION + iteration_duration.............: avg=265.93ms min=62.34ms med=253.06ms max=1.73s p(90)=362.15ms p(95)=410.35ms + iterations.....................: 11285 358.25851/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.7 MB 118 kB/s + data_sent......................: 5.1 MB 163 kB/s + + + + +running (0m31.5s), 000/100 VUs, 11285 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_after-100vu-run2.json b/benchmarks/raw/fix_b_downstream_after-100vu-run2.json new file mode 100644 index 0000000..56275d6 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10551, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_duration": { + "p(90)": 329.48783999999995, + "p(95)": 453.3508049999998, + "avg": 233.66261283168944, + "min": 26.0262, + "med": 194.67165, + "max": 1626.146 + }, + "http_req_connecting": { + "med": 0, + "max": 27.3194, + "p(90)": 0, + "p(95)": 0, + "avg": 0.02438853297952994, + "min": 0 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "max": 1676.1663, + "p(90)": 380.0166, + "p(95)": 503.5023, + "avg": 284.12197321580913, + "min": 76.4358, + "med": 245.1067 + }, + "data_sent": { + "count": 4790483, + "rate": 154871.9423521167 + }, + "data_received": { + "count": 3486878, + "rate": 112727.58271031626 + }, + "http_req_failed": { + "passes": 0, + "fails": 10552, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "min": 100, + "max": 100, + "value": 100 + }, + "http_req_duration{expected_response:true}": { + "avg": 233.66261283168944, + "min": 26.0262, + "med": 194.67165, + "max": 1626.146, + "p(90)": 329.48783999999995, + "p(95)": 453.3508049999998 + }, + "checks": { + "passes": 10551, + "fails": 0, + "value": 1 + }, + "http_req_blocked": { + "avg": 0.03830764783927216, + "min": 0, + "med": 0, + "max": 29.445, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 10551, + "rate": 341.10419841948783 + }, + "http_req_receiving": { + "avg": 0.08072895185746778, + "min": 0, + "med": 0, + "max": 4.4436, + "p(90)": 0.5315, + "p(95)": 0.5459449999999999 + }, + "http_req_sending": { + "avg": 0.015177246019711889, + "min": 0, + "med": 0, + "max": 34.9783, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "p(90)": 329.33514999999994, + "p(95)": 453.23121499999996, + "avg": 233.56670663381215, + "min": 26.0262, + "med": 194.5044, + "max": 1626.146 + }, + "http_reqs": { + "count": 10552, + "rate": 341.13652750662834 + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_after-100vu-run2.txt b/benchmarks/raw/fix_b_downstream_after-100vu-run2.txt new file mode 100644 index 0000000..25b85bc --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-100vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 1 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 00.2s/30s + +running (0m02.0s), 100/100 VUs, 376 complete and 0 interrupted iterations +default [ 4% ] 100 VUs 01.2s/30s + +running (0m03.0s), 100/100 VUs, 483 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.2s/30s + +running (0m04.0s), 100/100 VUs, 669 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 03.2s/30s + +running (0m05.0s), 100/100 VUs, 917 complete and 0 interrupted iterations +default [ 14% ] 100 VUs 04.2s/30s + +running (0m06.0s), 100/100 VUs, 1251 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.2s/30s + +running (0m07.0s), 100/100 VUs, 1696 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 06.2s/30s + +running (0m08.0s), 100/100 VUs, 2118 complete and 0 interrupted iterations +default [ 24% ] 100 VUs 07.2s/30s + +running (0m09.0s), 100/100 VUs, 2524 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.2s/30s + +running (0m10.0s), 100/100 VUs, 2913 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 09.2s/30s + +running (0m11.0s), 100/100 VUs, 3102 complete and 0 interrupted iterations +default [ 34% ] 100 VUs 10.2s/30s + +running (0m12.0s), 100/100 VUs, 3567 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.2s/30s + +running (0m13.0s), 100/100 VUs, 3946 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 12.2s/30s + +running (0m14.0s), 100/100 VUs, 4338 complete and 0 interrupted iterations +default [ 44% ] 100 VUs 13.2s/30s + +running (0m15.0s), 100/100 VUs, 4720 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.2s/30s + +running (0m16.0s), 100/100 VUs, 5127 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 15.2s/30s + +running (0m17.0s), 100/100 VUs, 5405 complete and 0 interrupted iterations +default [ 54% ] 100 VUs 16.2s/30s + +running (0m18.0s), 100/100 VUs, 5668 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.2s/30s + +running (0m19.0s), 100/100 VUs, 5973 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 18.2s/30s + +running (0m20.0s), 100/100 VUs, 6382 complete and 0 interrupted iterations +default [ 64% ] 100 VUs 19.2s/30s + +running (0m21.0s), 100/100 VUs, 6747 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.2s/30s + +running (0m22.0s), 100/100 VUs, 7106 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 21.2s/30s + +running (0m23.0s), 100/100 VUs, 7508 complete and 0 interrupted iterations +default [ 74% ] 100 VUs 22.2s/30s + +running (0m24.0s), 100/100 VUs, 7948 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.2s/30s + +running (0m25.0s), 100/100 VUs, 8356 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 24.2s/30s + +running (0m26.0s), 100/100 VUs, 8688 complete and 0 interrupted iterations +default [ 84% ] 100 VUs 25.2s/30s + +running (0m27.0s), 100/100 VUs, 9064 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.2s/30s + +running (0m28.0s), 100/100 VUs, 9334 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 27.2s/30s + +running (0m29.0s), 100/100 VUs, 9757 complete and 0 interrupted iterations +default [ 94% ] 100 VUs 28.2s/30s + +running (0m30.0s), 100/100 VUs, 10140 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.2s/30s + +running (0m30.9s), 000/100 VUs, 10551 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10551 341.104198/s + checks_succeeded...: 100.00% 10551 out of 10551 + checks_failed......: 0.00% 0 out of 10551 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=233.66ms min=26.02ms med=194.67ms max=1.62s p(90)=329.48ms p(95)=453.35ms + { expected_response:true }...: avg=233.66ms min=26.02ms med=194.67ms max=1.62s p(90)=329.48ms p(95)=453.35ms + http_req_failed................: 0.00% 0 out of 10552 + http_reqs......................: 10552 341.136528/s + + EXECUTION + iteration_duration.............: avg=284.12ms min=76.43ms med=245.1ms max=1.67s p(90)=380.01ms p(95)=503.5ms + iterations.....................: 10551 341.104198/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.5 MB 113 kB/s + data_sent......................: 4.8 MB 155 kB/s + + + + +running (0m30.9s), 000/100 VUs, 10551 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_after-100vu-run3.json b/benchmarks/raw/fix_b_downstream_after-100vu-run3.json new file mode 100644 index 0000000..1b98370 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_blocked": { + "med": 0, + "max": 62.3187, + "p(90)": 0, + "p(95)": 0, + "avg": 0.09551893009118546, + "min": 0 + }, + "http_reqs": { + "count": 8225, + "rate": 259.15641194459687 + }, + "data_received": { + "rate": 86990.03240643015, + "count": 2760854 + }, + "iterations": { + "rate": 259.12490356624494, + "count": 8224 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_connecting": { + "avg": 0.05186978723404256, + "min": 0, + "med": 0, + "max": 26.0339, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "p(95)": 628.2436199999999, + "avg": 314.032717762917, + "min": 34.4092, + "med": 267.8295, + "max": 4534.2936, + "p(90)": 527.6291 + }, + "iteration_duration": { + "med": 318.8733, + "max": 4585.742, + "p(90)": 583.1493899999999, + "p(95)": 680.3992899999995, + "avg": 365.3721428623542, + "min": 85.2154 + }, + "http_req_failed": { + "passes": 0, + "fails": 8225, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_receiving": { + "p(90)": 0.5404, + "p(95)": 0.5613599999999999, + "avg": 0.11790560486322188, + "min": 0, + "med": 0, + "max": 18.265 + }, + "data_sent": { + "count": 3732873, + "rate": 117616.77482369156 + }, + "http_req_duration": { + "med": 268.0872, + "max": 4534.2936, + "p(90)": 527.8995000000001, + "p(95)": 629.0783599999993, + "avg": 314.19581957446724, + "min": 34.4092 + }, + "checks": { + "passes": 8224, + "fails": 0, + "value": 1 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 629.0783599999993, + "avg": 314.19581957446724, + "min": 34.4092, + "med": 268.0872, + "max": 4534.2936, + "p(90)": 527.8995000000001 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.04519620668693009, + "min": 0, + "med": 0, + "max": 77.2633, + "p(90)": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8224, + "fails": 0 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_after-100vu-run3.txt b/benchmarks/raw/fix_b_downstream_after-100vu-run3.txt new file mode 100644 index 0000000..c1d3072 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-100vu-run3.txt @@ -0,0 +1,148 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 106 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.6s/30s + +running (0m03.0s), 100/100 VUs, 450 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.6s/30s + +running (0m04.0s), 100/100 VUs, 715 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.6s/30s + +running (0m05.0s), 100/100 VUs, 1003 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.6s/30s + +running (0m06.0s), 100/100 VUs, 1330 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.6s/30s + +running (0m07.0s), 100/100 VUs, 1513 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.6s/30s + +running (0m08.0s), 100/100 VUs, 1698 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.6s/30s + +running (0m09.0s), 100/100 VUs, 2092 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.6s/30s + +running (0m10.0s), 100/100 VUs, 2543 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.6s/30s + +running (0m11.0s), 100/100 VUs, 2888 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.6s/30s + +running (0m12.0s), 100/100 VUs, 3204 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.6s/30s + +running (0m13.0s), 100/100 VUs, 3494 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.6s/30s + +running (0m14.0s), 100/100 VUs, 3760 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.6s/30s + +running (0m15.0s), 100/100 VUs, 3986 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.6s/30s + +running (0m16.0s), 100/100 VUs, 4348 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.6s/30s + +running (0m17.0s), 100/100 VUs, 4698 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.6s/30s + +running (0m18.0s), 100/100 VUs, 5059 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.6s/30s + +running (0m19.0s), 100/100 VUs, 5428 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.6s/30s + +running (0m20.0s), 100/100 VUs, 5731 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.6s/30s + +running (0m21.0s), 100/100 VUs, 5948 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.6s/30s + +running (0m22.0s), 100/100 VUs, 6096 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.6s/30s + +running (0m23.0s), 100/100 VUs, 6314 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.6s/30s + +running (0m24.0s), 100/100 VUs, 6570 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.6s/30s + +running (0m25.0s), 100/100 VUs, 6843 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.6s/30s + +running (0m26.0s), 100/100 VUs, 7061 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.6s/30s + +running (0m27.0s), 100/100 VUs, 7330 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.6s/30s + +running (0m28.0s), 100/100 VUs, 7534 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.6s/30s + +running (0m29.0s), 100/100 VUs, 7689 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.6s/30s + +running (0m30.0s), 100/100 VUs, 7873 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.6s/30s + +running (0m31.0s), 100/100 VUs, 8055 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.6s/30s + +running (0m31.7s), 000/100 VUs, 8224 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8224 259.124904/s + checks_succeeded...: 100.00% 8224 out of 8224 + checks_failed......: 0.00% 0 out of 8224 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=314.19ms min=34.4ms med=268.08ms max=4.53s p(90)=527.89ms p(95)=629.07ms + { expected_response:true }...: avg=314.19ms min=34.4ms med=268.08ms max=4.53s p(90)=527.89ms p(95)=629.07ms + http_req_failed................: 0.00% 0 out of 8225 + http_reqs......................: 8225 259.156412/s + + EXECUTION + iteration_duration.............: avg=365.37ms min=85.21ms med=318.87ms max=4.58s p(90)=583.14ms p(95)=680.39ms + iterations.....................: 8224 259.124904/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.8 MB 87 kB/s + data_sent......................: 3.7 MB 118 kB/s + + + + +running (0m31.7s), 000/100 VUs, 8224 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_after-100vu-warmup.json b/benchmarks/raw/fix_b_downstream_after-100vu-warmup.json new file mode 100644 index 0000000..fef7eff --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8393, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_blocked": { + "avg": 0.08094367405289499, + "min": 0, + "med": 0, + "max": 70.0714, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "p(90)": 0.53477, + "p(95)": 0.554, + "avg": 0.10017507743626397, + "min": 0, + "med": 0, + "max": 39.7649 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration": { + "med": 241.4555, + "max": 2571.1449, + "p(90)": 502.2275399999999, + "p(95)": 675.3287649999996, + "avg": 309.8748025732674, + "min": 28.7377 + }, + "http_req_duration{expected_response:true}": { + "min": 28.7377, + "med": 241.4555, + "max": 2571.1449, + "p(90)": 502.2275399999999, + "p(95)": 675.3287649999996, + "avg": 309.8748025732674 + }, + "checks": { + "passes": 8393, + "fails": 0, + "value": 1 + }, + "iteration_duration": { + "avg": 360.7698989157632, + "min": 80.3089, + "med": 291.8225, + "max": 2651.1577, + "p(90)": 556.2343, + "p(95)": 724.8795599999997 + }, + "http_req_connecting": { + "avg": 0.037707386228258255, + "min": 0, + "med": 0, + "max": 17.5068, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 3809599, + "rate": 119959.85147772433 + }, + "data_received": { + "count": 2813582, + "rate": 88596.43202352755 + }, + "iterations": { + "count": 8393, + "rate": 264.2858299397234 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 8394, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.05056373600190614, + "min": 0, + "med": 0, + "max": 53.2208, + "p(90)": 0 + }, + "http_req_waiting": { + "p(90)": 501.51363999999995, + "p(95)": 675.3287649999996, + "avg": 309.7240637598296, + "min": 28.7377, + "med": 241.4555, + "max": 2571.1449 + }, + "http_reqs": { + "rate": 264.31731877922533, + "count": 8394 + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_after-100vu-warmup.txt b/benchmarks/raw/fix_b_downstream_after-100vu-warmup.txt new file mode 100644 index 0000000..05b1933 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 33 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 01.0s/30s + +running (0m03.0s), 100/100 VUs, 64 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.7s/30s + +running (0m04.0s), 100/100 VUs, 240 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.7s/30s + +running (0m05.0s), 100/100 VUs, 475 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.7s/30s + +running (0m06.0s), 100/100 VUs, 593 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.7s/30s + +running (0m07.0s), 100/100 VUs, 959 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.7s/30s + +running (0m08.0s), 100/100 VUs, 1228 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.7s/30s + +running (0m09.0s), 100/100 VUs, 1567 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.7s/30s + +running (0m10.0s), 100/100 VUs, 1805 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.7s/30s + +running (0m11.0s), 100/100 VUs, 2089 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.7s/30s + +running (0m12.0s), 100/100 VUs, 2394 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.7s/30s + +running (0m13.0s), 100/100 VUs, 2757 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.7s/30s + +running (0m14.0s), 100/100 VUs, 3155 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.7s/30s + +running (0m15.0s), 100/100 VUs, 3568 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.7s/30s + +running (0m16.0s), 100/100 VUs, 4023 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.7s/30s + +running (0m17.0s), 100/100 VUs, 4326 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.7s/30s + +running (0m18.0s), 100/100 VUs, 4475 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.7s/30s + +running (0m19.0s), 100/100 VUs, 4703 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.7s/30s + +running (0m20.0s), 100/100 VUs, 4872 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.7s/30s + +running (0m21.0s), 100/100 VUs, 5064 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.7s/30s + +running (0m22.0s), 100/100 VUs, 5405 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.7s/30s + +running (0m23.0s), 100/100 VUs, 5726 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.7s/30s + +running (0m24.0s), 100/100 VUs, 6103 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.7s/30s + +running (0m25.0s), 100/100 VUs, 6489 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.7s/30s + +running (0m26.0s), 100/100 VUs, 6835 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.7s/30s + +running (0m27.0s), 100/100 VUs, 7139 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.7s/30s + +running (0m28.0s), 100/100 VUs, 7373 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.7s/30s + +running (0m29.0s), 100/100 VUs, 7609 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.7s/30s + +running (0m30.0s), 100/100 VUs, 7911 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.7s/30s + +running (0m31.0s), 100/100 VUs, 8217 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8393 264.28583/s + checks_succeeded...: 100.00% 8393 out of 8393 + checks_failed......: 0.00% 0 out of 8393 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=309.87ms min=28.73ms med=241.45ms max=2.57s p(90)=502.22ms p(95)=675.32ms + { expected_response:true }...: avg=309.87ms min=28.73ms med=241.45ms max=2.57s p(90)=502.22ms p(95)=675.32ms + http_req_failed................: 0.00% 0 out of 8394 + http_reqs......................: 8394 264.317319/s + + EXECUTION + iteration_duration.............: avg=360.76ms min=80.3ms med=291.82ms max=2.65s p(90)=556.23ms p(95)=724.87ms + iterations.....................: 8393 264.28583/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.8 MB 89 kB/s + data_sent......................: 3.8 MB 120 kB/s + + + + +running (0m31.8s), 000/100 VUs, 8393 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_after-50vu-run1.json b/benchmarks/raw/fix_b_downstream_after-50vu-run1.json new file mode 100644 index 0000000..b40496b --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8442, + "fails": 0 + } + } + }, + "metrics": { + "http_req_duration": { + "avg": 126.92316399384116, + "min": 12.1783, + "med": 118.7467, + "max": 1321.1201, + "p(90)": 195.07182000000003, + "p(95)": 224.78942999999998 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "data_sent": { + "count": 3839229, + "rate": 122001.6087617187 + }, + "http_req_waiting": { + "avg": 126.77808579888664, + "min": 12.1783, + "med": 118.5339, + "max": 1316.3755, + "p(90)": 194.84228000000002, + "p(95)": 224.76989999999998 + }, + "http_req_receiving": { + "p(95)": 0.55929, + "avg": 0.11368835721899805, + "min": 0, + "med": 0, + "max": 5.1568, + "p(90)": 0.5419 + }, + "checks": { + "passes": 8442, + "fails": 0, + "value": 1 + }, + "iteration_duration": { + "avg": 177.6831667495849, + "min": 62.9517, + "med": 169.49025, + "max": 793.9934, + "p(90)": 246.84090000000003, + "p(95)": 276.572285 + }, + "http_req_blocked": { + "med": 0, + "max": 35.4294, + "p(90)": 0, + "p(95)": 0, + "avg": 0.03514787397844366, + "min": 0 + }, + "data_received": { + "count": 2828870, + "rate": 89894.79163075794 + }, + "http_req_duration{expected_response:true}": { + "avg": 126.92316399384116, + "min": 12.1783, + "med": 118.7467, + "max": 1321.1201, + "p(90)": 195.07182000000003, + "p(95)": 224.78942999999998 + }, + "http_req_failed": { + "passes": 0, + "fails": 8443, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "min": 0, + "max": 50, + "value": 50 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.01365329859054838, + "min": 0, + "med": 0, + "max": 12.7588, + "p(90)": 0 + }, + "http_reqs": { + "count": 8443, + "rate": 268.2985523330833 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.031389837735402125, + "min": 0, + "med": 0, + "max": 44.3552 + }, + "iterations": { + "count": 8442, + "rate": 268.26677470044876 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_after-50vu-run1.txt b/benchmarks/raw/fix_b_downstream_after-50vu-run1.txt new file mode 100644 index 0000000..f92968d --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-50vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 140 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.6s/30s + +running (0m03.0s), 50/50 VUs, 364 complete and 0 interrupted iterations +default [ 5% ] 50 VUs 01.6s/30s + +running (0m04.0s), 50/50 VUs, 550 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.6s/30s + +running (0m05.0s), 50/50 VUs, 752 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.6s/30s + +running (0m06.0s), 50/50 VUs, 998 complete and 0 interrupted iterations +default [ 15% ] 50 VUs 04.6s/30s + +running (0m07.0s), 50/50 VUs, 1231 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.6s/30s + +running (0m08.0s), 50/50 VUs, 1427 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.6s/30s + +running (0m09.0s), 50/50 VUs, 1665 complete and 0 interrupted iterations +default [ 25% ] 50 VUs 07.6s/30s + +running (0m10.0s), 50/50 VUs, 1934 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.6s/30s + +running (0m11.0s), 50/50 VUs, 2273 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.6s/30s + +running (0m12.0s), 50/50 VUs, 2564 complete and 0 interrupted iterations +default [ 35% ] 50 VUs 10.6s/30s + +running (0m13.0s), 50/50 VUs, 2856 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.6s/30s + +running (0m14.0s), 50/50 VUs, 3154 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.6s/30s + +running (0m15.0s), 50/50 VUs, 3463 complete and 0 interrupted iterations +default [ 45% ] 50 VUs 13.6s/30s + +running (0m16.0s), 50/50 VUs, 3703 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.6s/30s + +running (0m17.0s), 50/50 VUs, 3956 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.6s/30s + +running (0m18.0s), 50/50 VUs, 4188 complete and 0 interrupted iterations +default [ 55% ] 50 VUs 16.6s/30s + +running (0m19.0s), 50/50 VUs, 4449 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.6s/30s + +running (0m20.0s), 50/50 VUs, 4784 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.6s/30s + +running (0m21.0s), 50/50 VUs, 5064 complete and 0 interrupted iterations +default [ 65% ] 50 VUs 19.6s/30s + +running (0m22.0s), 50/50 VUs, 5355 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.6s/30s + +running (0m23.0s), 50/50 VUs, 5714 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.6s/30s + +running (0m24.0s), 50/50 VUs, 6039 complete and 0 interrupted iterations +default [ 75% ] 50 VUs 22.6s/30s + +running (0m25.0s), 50/50 VUs, 6284 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.6s/30s + +running (0m26.0s), 50/50 VUs, 6511 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.6s/30s + +running (0m27.0s), 50/50 VUs, 6807 complete and 0 interrupted iterations +default [ 85% ] 50 VUs 25.6s/30s + +running (0m28.0s), 50/50 VUs, 7086 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.6s/30s + +running (0m29.0s), 50/50 VUs, 7490 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.6s/30s + +running (0m30.0s), 50/50 VUs, 7870 complete and 0 interrupted iterations +default [ 95% ] 50 VUs 28.6s/30s + +running (0m31.0s), 50/50 VUs, 8245 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8442 268.266775/s + checks_succeeded...: 100.00% 8442 out of 8442 + checks_failed......: 0.00% 0 out of 8442 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=126.92ms min=12.17ms med=118.74ms max=1.32s p(90)=195.07ms p(95)=224.78ms + { expected_response:true }...: avg=126.92ms min=12.17ms med=118.74ms max=1.32s p(90)=195.07ms p(95)=224.78ms + http_req_failed................: 0.00% 0 out of 8443 + http_reqs......................: 8443 268.298552/s + + EXECUTION + iteration_duration.............: avg=177.68ms min=62.95ms med=169.49ms max=793.99ms p(90)=246.84ms p(95)=276.57ms + iterations.....................: 8442 268.266775/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.8 MB 90 kB/s + data_sent......................: 3.8 MB 122 kB/s + + + + +running (0m31.5s), 00/50 VUs, 8442 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_after-50vu-run2.json b/benchmarks/raw/fix_b_downstream_after-50vu-run2.json new file mode 100644 index 0000000..ce8eece --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "iterations": { + "count": 8497, + "rate": 273.2535841499157 + }, + "http_req_blocked": { + "avg": 0.01940522475876677, + "min": 0, + "med": 0, + "max": 26.4775, + "p(90)": 0, + "p(95)": 0 + }, + "http_reqs": { + "count": 8498, + "rate": 273.28574298057947 + }, + "http_req_sending": { + "avg": 0.015469839962344082, + "min": 0, + "med": 0, + "max": 4.691, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "avg": 126.46191036714539, + "min": 13.5843, + "med": 101.3282, + "max": 2472.1513, + "p(90)": 166.88861000000003, + "p(95)": 211.74491999999992 + }, + "iteration_duration": { + "avg": 177.0123971048597, + "min": 64.1249, + "med": 151.9443, + "max": 2522.5386, + "p(90)": 217.97802000000001, + "p(95)": 263.36547999999993 + }, + "vus_max": { + "min": 50, + "max": 50, + "value": 50 + }, + "http_req_duration": { + "p(95)": 211.74491999999992, + "avg": 126.46191036714539, + "min": 13.5843, + "med": 101.3282, + "max": 2472.1513, + "p(90)": 166.88861000000003 + }, + "http_req_receiving": { + "med": 0, + "max": 17.5785, + "p(90)": 0.5376, + "p(95)": 0.553215, + "avg": 0.09912175806072031, + "min": 0 + }, + "data_sent": { + "rate": 124271.65876341963, + "count": 3864309 + }, + "http_req_waiting": { + "min": 13.0655, + "med": 101.2228, + "max": 2472.1513, + "p(90)": 166.7811, + "p(95)": 211.60720499999994, + "avg": 126.34731876912221 + }, + "data_received": { + "count": 2846030, + "rate": 91524.99683396312 + }, + "vus": { + "value": 38, + "min": 38, + "max": 50 + }, + "http_req_connecting": { + "avg": 0.009119180983760886, + "min": 0, + "med": 0, + "max": 6.6196, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "fails": 8498, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 8497, + "fails": 0, + "value": 1 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8497, + "fails": 0 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_after-50vu-run2.txt b/benchmarks/raw/fix_b_downstream_after-50vu-run2.txt new file mode 100644 index 0000000..dfcf571 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 50 VUs 00.1s/30s + +running (0m02.0s), 50/50 VUs, 320 complete and 0 interrupted iterations +default [ 4% ] 50 VUs 01.1s/30s + +running (0m03.0s), 50/50 VUs, 661 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.1s/30s + +running (0m04.0s), 50/50 VUs, 1021 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.1s/30s + +running (0m05.0s), 50/50 VUs, 1362 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.1s/30s + +running (0m06.0s), 50/50 VUs, 1662 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.1s/30s + +running (0m07.0s), 50/50 VUs, 1978 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.1s/30s + +running (0m08.0s), 50/50 VUs, 2352 complete and 0 interrupted iterations +default [ 24% ] 50 VUs 07.1s/30s + +running (0m09.0s), 50/50 VUs, 2682 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.1s/30s + +running (0m10.0s), 50/50 VUs, 3051 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.1s/30s + +running (0m11.0s), 50/50 VUs, 3344 complete and 0 interrupted iterations +default [ 34% ] 50 VUs 10.1s/30s + +running (0m12.0s), 50/50 VUs, 3594 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.1s/30s + +running (0m13.0s), 50/50 VUs, 3863 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.1s/30s + +running (0m14.0s), 50/50 VUs, 4082 complete and 0 interrupted iterations +default [ 44% ] 50 VUs 13.1s/30s + +running (0m15.0s), 50/50 VUs, 4219 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.1s/30s + +running (0m16.0s), 50/50 VUs, 4309 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.1s/30s + +running (0m17.0s), 50/50 VUs, 4326 complete and 0 interrupted iterations +default [ 54% ] 50 VUs 16.1s/30s + +running (0m18.0s), 50/50 VUs, 4338 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.1s/30s + +running (0m19.0s), 50/50 VUs, 4553 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.1s/30s + +running (0m20.0s), 50/50 VUs, 4883 complete and 0 interrupted iterations +default [ 64% ] 50 VUs 19.1s/30s + +running (0m21.0s), 50/50 VUs, 5207 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.1s/30s + +running (0m22.0s), 50/50 VUs, 5521 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.1s/30s + +running (0m23.0s), 50/50 VUs, 5785 complete and 0 interrupted iterations +default [ 74% ] 50 VUs 22.1s/30s + +running (0m24.0s), 50/50 VUs, 6104 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.1s/30s + +running (0m25.0s), 50/50 VUs, 6444 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.1s/30s + +running (0m26.0s), 50/50 VUs, 6802 complete and 0 interrupted iterations +default [ 84% ] 50 VUs 25.1s/30s + +running (0m27.0s), 50/50 VUs, 7137 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.1s/30s + +running (0m28.0s), 50/50 VUs, 7507 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.1s/30s + +running (0m29.0s), 50/50 VUs, 7858 complete and 0 interrupted iterations +default [ 94% ] 50 VUs 28.1s/30s + +running (0m30.0s), 50/50 VUs, 8205 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.1s/30s + +running (0m31.0s), 38/50 VUs, 8459 complete and 0 interrupted iterations +default โ†“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8497 273.253584/s + checks_succeeded...: 100.00% 8497 out of 8497 + checks_failed......: 0.00% 0 out of 8497 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=126.46ms min=13.58ms med=101.32ms max=2.47s p(90)=166.88ms p(95)=211.74ms + { expected_response:true }...: avg=126.46ms min=13.58ms med=101.32ms max=2.47s p(90)=166.88ms p(95)=211.74ms + http_req_failed................: 0.00% 0 out of 8498 + http_reqs......................: 8498 273.285743/s + + EXECUTION + iteration_duration.............: avg=177.01ms min=64.12ms med=151.94ms max=2.52s p(90)=217.97ms p(95)=263.36ms + iterations.....................: 8497 273.253584/s + vus............................: 38 min=38 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.8 MB 92 kB/s + data_sent......................: 3.9 MB 124 kB/s + + + + +running (0m31.1s), 00/50 VUs, 8497 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_after-50vu-run3.json b/benchmarks/raw/fix_b_downstream_after-50vu-run3.json new file mode 100644 index 0000000..5409f74 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7827, + "fails": 0, + "name": "status is 200" + } + }, + "name": "", + "path": "" + }, + "metrics": { + "data_sent": { + "count": 3558789, + "rate": 114562.91936631006 + }, + "http_reqs": { + "count": 7828, + "rate": 251.9954211388973 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 7828, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "avg": 0.027386037301992853, + "min": 0, + "med": 0, + "max": 30.0954, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "max": 918.1752, + "p(90)": 228.29953000000006, + "p(95)": 270.446385, + "avg": 140.3162210526313, + "min": 19.9831, + "med": 121.6489 + }, + "vus": { + "value": 41, + "min": 41, + "max": 50 + }, + "http_req_duration": { + "p(90)": 228.49857000000003, + "p(95)": 270.53541499999994, + "avg": 140.4713413898825, + "min": 19.9831, + "med": 121.76495, + "max": 919.2618 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 11.5512, + "p(90)": 0, + "p(95)": 0, + "avg": 0.012526060296371997 + }, + "http_req_receiving": { + "max": 5.7991, + "p(90)": 0.5422, + "p(95)": 0.565865, + "avg": 0.11722787429739395, + "min": 0, + "med": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "checks": { + "passes": 7827, + "fails": 0, + "value": 1 + }, + "http_req_sending": { + "avg": 0.037892462953500246, + "min": 0, + "med": 0, + "max": 13.9941, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "rate": 84888.78456681922, + "count": 2636990 + }, + "http_req_duration{expected_response:true}": { + "max": 919.2618, + "p(90)": 228.49857000000003, + "p(95)": 270.53541499999994, + "avg": 140.4713413898825, + "min": 19.9831, + "med": 121.76495 + }, + "iteration_duration": { + "min": 70.1813, + "med": 172.6929, + "max": 693.9836, + "p(90)": 283.2746, + "p(95)": 323.60344, + "avg": 191.74561987990293 + }, + "iterations": { + "count": 7827, + "rate": 251.96322959301855 + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_after-50vu-run3.txt b/benchmarks/raw/fix_b_downstream_after-50vu-run3.txt new file mode 100644 index 0000000..8f798ac --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 50 VUs 00.0s/30s + +running (0m02.0s), 50/50 VUs, 324 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 01.0s/30s + +running (0m03.0s), 50/50 VUs, 629 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.0s/30s + +running (0m04.0s), 50/50 VUs, 916 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.0s/30s + +running (0m05.0s), 50/50 VUs, 1174 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 04.0s/30s + +running (0m06.0s), 50/50 VUs, 1435 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.0s/30s + +running (0m07.0s), 50/50 VUs, 1676 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.0s/30s + +running (0m08.0s), 50/50 VUs, 1840 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 07.0s/30s + +running (0m09.0s), 50/50 VUs, 2014 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.0s/30s + +running (0m10.0s), 50/50 VUs, 2141 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.0s/30s + +running (0m11.0s), 50/50 VUs, 2348 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 10.0s/30s + +running (0m12.0s), 50/50 VUs, 2576 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.0s/30s + +running (0m13.0s), 50/50 VUs, 2802 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.0s/30s + +running (0m14.0s), 50/50 VUs, 3104 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 13.0s/30s + +running (0m15.0s), 50/50 VUs, 3404 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.0s/30s + +running (0m16.0s), 50/50 VUs, 3682 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.0s/30s + +running (0m17.0s), 50/50 VUs, 3867 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 16.0s/30s + +running (0m18.0s), 50/50 VUs, 4254 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.0s/30s + +running (0m19.0s), 50/50 VUs, 4592 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.0s/30s + +running (0m20.0s), 50/50 VUs, 4964 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 19.0s/30s + +running (0m21.0s), 50/50 VUs, 5222 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.0s/30s + +running (0m22.0s), 50/50 VUs, 5529 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.0s/30s + +running (0m23.0s), 50/50 VUs, 5900 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 22.0s/30s + +running (0m24.0s), 50/50 VUs, 6145 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.0s/30s + +running (0m25.0s), 50/50 VUs, 6376 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.0s/30s + +running (0m26.0s), 50/50 VUs, 6556 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 25.0s/30s + +running (0m27.0s), 50/50 VUs, 6799 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.0s/30s + +running (0m28.0s), 50/50 VUs, 7056 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.0s/30s + +running (0m29.0s), 50/50 VUs, 7331 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 28.0s/30s + +running (0m30.0s), 50/50 VUs, 7504 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.0s/30s + +running (0m31.0s), 41/50 VUs, 7786 complete and 0 interrupted iterations +default โ†“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7827 251.96323/s + checks_succeeded...: 100.00% 7827 out of 7827 + checks_failed......: 0.00% 0 out of 7827 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=140.47ms min=19.98ms med=121.76ms max=919.26ms p(90)=228.49ms p(95)=270.53ms + { expected_response:true }...: avg=140.47ms min=19.98ms med=121.76ms max=919.26ms p(90)=228.49ms p(95)=270.53ms + http_req_failed................: 0.00% 0 out of 7828 + http_reqs......................: 7828 251.995421/s + + EXECUTION + iteration_duration.............: avg=191.74ms min=70.18ms med=172.69ms max=693.98ms p(90)=283.27ms p(95)=323.6ms + iterations.....................: 7827 251.96323/s + vus............................: 41 min=41 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.6 MB 85 kB/s + data_sent......................: 3.6 MB 115 kB/s + + + + +running (0m31.1s), 00/50 VUs, 7827 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_after-50vu-warmup.json b/benchmarks/raw/fix_b_downstream_after-50vu-warmup.json new file mode 100644 index 0000000..afffde9 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7208, + "fails": 0 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + }, + "metrics": { + "checks": { + "passes": 7208, + "fails": 0, + "value": 1 + }, + "http_req_duration": { + "avg": 157.42718482452497, + "min": 24.8335, + "med": 138.2221, + "max": 1418.5843, + "p(90)": 234.67746, + "p(95)": 290.4324799999998 + }, + "data_received": { + "count": 2443862, + "rate": 77416.15223437073 + }, + "http_req_blocked": { + "avg": 0.03266812317935915, + "min": 0, + "med": 0, + "max": 32.2503, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "max": 50, + "value": 50, + "min": 0 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "avg": 208.2129581714766, + "min": 74.8674, + "med": 189.18685, + "max": 1166.0987, + "p(90)": 285.7704100000001, + "p(95)": 342.9563799999999 + }, + "http_req_duration{expected_response:true}": { + "avg": 157.42718482452497, + "min": 24.8335, + "med": 138.2221, + "max": 1418.5843, + "p(90)": 234.67746, + "p(95)": 290.4324799999998 + }, + "http_req_connecting": { + "med": 0, + "max": 9.1059, + "p(90)": 0, + "p(95)": 0, + "avg": 0.01762276321265086, + "min": 0 + }, + "http_req_waiting": { + "p(95)": 289.87583999999987, + "avg": 157.274737994174, + "min": 24.8335, + "med": 138.1206, + "max": 1416.9479, + "p(90)": 234.55856 + }, + "http_req_sending": { + "avg": 0.031735830212234695, + "min": 0, + "med": 0, + "max": 7.321, + "p(90)": 0, + "p(95)": 0 + }, + "http_reqs": { + "rate": 228.3652028868973, + "count": 7209 + }, + "http_req_receiving": { + "p(90)": 0.5431, + "p(95)": 0.5752399999999998, + "avg": 0.12071100013871547, + "min": 0, + "med": 0, + "max": 7.3462 + }, + "data_sent": { + "count": 3276525, + "rate": 103793.07759592053 + }, + "http_req_failed": { + "passes": 0, + "fails": 7209, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "max": 50, + "value": 50, + "min": 50 + }, + "iterations": { + "count": 7208, + "rate": 228.33352509484752 + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_after-50vu-warmup.txt b/benchmarks/raw/fix_b_downstream_after-50vu-warmup.txt new file mode 100644 index 0000000..a2c0d92 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_after-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 8 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.5s/30s + +running (0m03.0s), 50/50 VUs, 135 complete and 0 interrupted iterations +default [ 5% ] 50 VUs 01.5s/30s + +running (0m04.0s), 50/50 VUs, 331 complete and 0 interrupted iterations +default [ 8% ] 50 VUs 02.5s/30s + +running (0m05.0s), 50/50 VUs, 452 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.5s/30s + +running (0m06.0s), 50/50 VUs, 549 complete and 0 interrupted iterations +default [ 15% ] 50 VUs 04.5s/30s + +running (0m07.0s), 50/50 VUs, 755 complete and 0 interrupted iterations +default [ 18% ] 50 VUs 05.5s/30s + +running (0m08.0s), 50/50 VUs, 989 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.5s/30s + +running (0m09.0s), 50/50 VUs, 1187 complete and 0 interrupted iterations +default [ 25% ] 50 VUs 07.5s/30s + +running (0m10.0s), 50/50 VUs, 1335 complete and 0 interrupted iterations +default [ 28% ] 50 VUs 08.5s/30s + +running (0m11.0s), 50/50 VUs, 1545 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.5s/30s + +running (0m12.0s), 50/50 VUs, 1780 complete and 0 interrupted iterations +default [ 35% ] 50 VUs 10.5s/30s + +running (0m13.0s), 50/50 VUs, 2063 complete and 0 interrupted iterations +default [ 38% ] 50 VUs 11.5s/30s + +running (0m14.0s), 50/50 VUs, 2306 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.5s/30s + +running (0m15.0s), 50/50 VUs, 2611 complete and 0 interrupted iterations +default [ 45% ] 50 VUs 13.5s/30s + +running (0m16.0s), 50/50 VUs, 2932 complete and 0 interrupted iterations +default [ 48% ] 50 VUs 14.5s/30s + +running (0m17.0s), 50/50 VUs, 3191 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.5s/30s + +running (0m18.0s), 50/50 VUs, 3478 complete and 0 interrupted iterations +default [ 55% ] 50 VUs 16.5s/30s + +running (0m19.0s), 50/50 VUs, 3723 complete and 0 interrupted iterations +default [ 58% ] 50 VUs 17.5s/30s + +running (0m20.0s), 50/50 VUs, 3930 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.5s/30s + +running (0m21.0s), 50/50 VUs, 4184 complete and 0 interrupted iterations +default [ 65% ] 50 VUs 19.5s/30s + +running (0m22.0s), 50/50 VUs, 4449 complete and 0 interrupted iterations +default [ 68% ] 50 VUs 20.5s/30s + +running (0m23.0s), 50/50 VUs, 4709 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.5s/30s + +running (0m24.0s), 50/50 VUs, 4977 complete and 0 interrupted iterations +default [ 75% ] 50 VUs 22.5s/30s + +running (0m25.0s), 50/50 VUs, 5328 complete and 0 interrupted iterations +default [ 78% ] 50 VUs 23.5s/30s + +running (0m26.0s), 50/50 VUs, 5671 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.5s/30s + +running (0m27.0s), 50/50 VUs, 5880 complete and 0 interrupted iterations +default [ 85% ] 50 VUs 25.5s/30s + +running (0m28.0s), 50/50 VUs, 6159 complete and 0 interrupted iterations +default [ 88% ] 50 VUs 26.5s/30s + +running (0m29.0s), 50/50 VUs, 6448 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.5s/30s + +running (0m30.0s), 50/50 VUs, 6779 complete and 0 interrupted iterations +default [ 95% ] 50 VUs 28.5s/30s + +running (0m31.0s), 50/50 VUs, 7053 complete and 0 interrupted iterations +default [ 98% ] 50 VUs 29.5s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7208 228.333525/s + checks_succeeded...: 100.00% 7208 out of 7208 + checks_failed......: 0.00% 0 out of 7208 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=157.42ms min=24.83ms med=138.22ms max=1.41s p(90)=234.67ms p(95)=290.43ms + { expected_response:true }...: avg=157.42ms min=24.83ms med=138.22ms max=1.41s p(90)=234.67ms p(95)=290.43ms + http_req_failed................: 0.00% 0 out of 7209 + http_reqs......................: 7209 228.365203/s + + EXECUTION + iteration_duration.............: avg=208.21ms min=74.86ms med=189.18ms max=1.16s p(90)=285.77ms p(95)=342.95ms + iterations.....................: 7208 228.333525/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.4 MB 77 kB/s + data_sent......................: 3.3 MB 104 kB/s + + + + +running (0m31.6s), 00/50 VUs, 7208 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_before-100vu-run1.json b/benchmarks/raw/fix_b_downstream_before-100vu-run1.json new file mode 100644 index 0000000..8883660 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "data_sent": { + "count": 3607569, + "rate": 109050.09582758253 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.021703258271480688, + "min": 0, + "med": 0, + "max": 11.4321 + }, + "vus_max": { + "min": 100, + "max": 100, + "value": 100 + }, + "data_received": { + "count": 2674742, + "rate": 80852.47195938864 + }, + "http_req_duration{expected_response:true}": { + "med": 268.714, + "max": 4499.4416, + "p(90)": 476.02687999999995, + "p(95)": 617.4035, + "avg": 350.7644171719724, + "min": 41.6943 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.03496902755063531, + "min": 0, + "med": 0, + "max": 26.888 + }, + "http_req_failed": { + "passes": 0, + "fails": 7949, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 7949, + "rate": 240.2834739220382 + }, + "iteration_duration": { + "min": 94.181, + "med": 319.8718, + "max": 4558.5727, + "p(90)": 527.07369, + "p(95)": 667.5962, + "avg": 401.5726539884246 + }, + "checks": { + "passes": 7948, + "fails": 0, + "value": 1 + }, + "http_req_duration": { + "avg": 350.7644171719724, + "min": 41.6943, + "med": 268.714, + "max": 4499.4416, + "p(90)": 476.02687999999995, + "p(95)": 617.4035 + }, + "http_req_waiting": { + "p(90)": 476.02687999999995, + "p(95)": 617.4035, + "avg": 350.63484772927416, + "min": 41.0112, + "med": 268.656, + "max": 4499.4416 + }, + "http_req_receiving": { + "avg": 0.09460041514655924, + "min": 0, + "med": 0, + "max": 26.2738, + "p(90)": 0.5339200000000001, + "p(95)": 0.54936 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 7948, + "rate": 240.25324578341423 + }, + "vus": { + "value": 39, + "min": 39, + "max": 100 + }, + "http_req_blocked": { + "avg": 0.038297395898855204, + "min": 0, + "med": 0, + "max": 29.1404, + "p(90)": 0, + "p(95)": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7948, + "fails": 0 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_before-100vu-run1.txt b/benchmarks/raw/fix_b_downstream_before-100vu-run1.txt new file mode 100644 index 0000000..ed6263b --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-100vu-run1.txt @@ -0,0 +1,151 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 100 VUs 00.1s/30s + +running (0m02.0s), 100/100 VUs, 187 complete and 0 interrupted iterations +default [ 4% ] 100 VUs 01.1s/30s + +running (0m03.0s), 100/100 VUs, 463 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.1s/30s + +running (0m04.0s), 100/100 VUs, 714 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 03.1s/30s + +running (0m05.0s), 100/100 VUs, 1019 complete and 0 interrupted iterations +default [ 14% ] 100 VUs 04.1s/30s + +running (0m06.0s), 100/100 VUs, 1311 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.1s/30s + +running (0m07.0s), 100/100 VUs, 1585 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 06.1s/30s + +running (0m08.0s), 100/100 VUs, 1803 complete and 0 interrupted iterations +default [ 24% ] 100 VUs 07.1s/30s + +running (0m09.0s), 100/100 VUs, 2131 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.1s/30s + +running (0m10.0s), 100/100 VUs, 2479 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 09.1s/30s + +running (0m11.0s), 100/100 VUs, 2826 complete and 0 interrupted iterations +default [ 34% ] 100 VUs 10.1s/30s + +running (0m12.0s), 100/100 VUs, 3153 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.1s/30s + +running (0m13.0s), 100/100 VUs, 3408 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 12.1s/30s + +running (0m14.0s), 100/100 VUs, 3712 complete and 0 interrupted iterations +default [ 44% ] 100 VUs 13.1s/30s + +running (0m15.0s), 100/100 VUs, 3984 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.1s/30s + +running (0m16.0s), 100/100 VUs, 4237 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 15.1s/30s + +running (0m17.0s), 100/100 VUs, 4524 complete and 0 interrupted iterations +default [ 54% ] 100 VUs 16.1s/30s + +running (0m18.0s), 100/100 VUs, 4860 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.1s/30s + +running (0m19.0s), 100/100 VUs, 5180 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 18.1s/30s + +running (0m20.0s), 100/100 VUs, 5541 complete and 0 interrupted iterations +default [ 64% ] 100 VUs 19.1s/30s + +running (0m21.0s), 100/100 VUs, 5774 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.1s/30s + +running (0m22.0s), 100/100 VUs, 5874 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 21.1s/30s + +running (0m23.0s), 100/100 VUs, 6144 complete and 0 interrupted iterations +default [ 74% ] 100 VUs 22.1s/30s + +running (0m24.0s), 100/100 VUs, 6382 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.1s/30s + +running (0m25.0s), 100/100 VUs, 6648 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 24.1s/30s + +running (0m26.0s), 100/100 VUs, 6863 complete and 0 interrupted iterations +default [ 84% ] 100 VUs 25.1s/30s + +running (0m27.0s), 100/100 VUs, 7160 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.1s/30s + +running (0m28.0s), 100/100 VUs, 7454 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 27.1s/30s + +running (0m29.0s), 100/100 VUs, 7719 complete and 0 interrupted iterations +default [ 94% ] 100 VUs 28.1s/30s + +running (0m30.0s), 100/100 VUs, 7848 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.1s/30s + +running (0m31.3s), 100/100 VUs, 7848 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + +running (0m32.0s), 100/100 VUs, 7848 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + +running (0m33.0s), 039/100 VUs, 7909 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7948 240.253246/s + checks_succeeded...: 100.00% 7948 out of 7948 + checks_failed......: 0.00% 0 out of 7948 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=350.76ms min=41.69ms med=268.71ms max=4.49s p(90)=476.02ms p(95)=617.4ms + { expected_response:true }...: avg=350.76ms min=41.69ms med=268.71ms max=4.49s p(90)=476.02ms p(95)=617.4ms + http_req_failed................: 0.00% 0 out of 7949 + http_reqs......................: 7949 240.283474/s + + EXECUTION + iteration_duration.............: avg=401.57ms min=94.18ms med=319.87ms max=4.55s p(90)=527.07ms p(95)=667.59ms + iterations.....................: 7948 240.253246/s + vus............................: 39 min=39 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.7 MB 81 kB/s + data_sent......................: 3.6 MB 109 kB/s + + + + +running (0m33.1s), 000/100 VUs, 7948 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_before-100vu-run2.json b/benchmarks/raw/fix_b_downstream_before-100vu-run2.json new file mode 100644 index 0000000..e30af6b --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8833, + "fails": 0, + "name": "status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + }, + "metrics": { + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 2950862, + "rate": 94415.2788944678 + }, + "http_req_connecting": { + "avg": 0.026532295675798047, + "min": 0, + "med": 0, + "max": 24.8379, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 8833, + "rate": 282.61916635709633 + }, + "http_req_sending": { + "avg": 0.029421304052524338, + "min": 0, + "med": 0, + "max": 62.2563, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "min": 100, + "max": 100, + "value": 100 + }, + "checks": { + "passes": 8833, + "fails": 0, + "value": 1 + }, + "vus_max": { + "min": 100, + "max": 100, + "value": 100 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 6.1837, + "p(90)": 0.5423, + "p(95)": 0.555535, + "avg": 0.10444177043242003 + }, + "http_reqs": { + "count": 8834, + "rate": 282.6511621870926 + }, + "http_req_blocked": { + "med": 0, + "max": 26.5747, + "p(90)": 0, + "p(95)": 0, + "avg": 0.03668417477926193, + "min": 0 + }, + "data_sent": { + "count": 4009447, + "rate": 128285.58459107448 + }, + "iteration_duration": { + "max": 5974.2934, + "p(90)": 473.80916, + "p(95)": 519.62136, + "avg": 340.6553081399281, + "min": 102.694, + "med": 302.5315 + }, + "http_req_duration": { + "max": 5905.6298, + "p(90)": 421.66149, + "p(95)": 467.87438000000003, + "avg": 289.86755316957243, + "min": 52.1842, + "med": 251.88504999999998 + }, + "http_req_duration{expected_response:true}": { + "avg": 289.86755316957243, + "min": 52.1842, + "med": 251.88504999999998, + "max": 5905.6298, + "p(90)": 421.66149, + "p(95)": 467.87438000000003 + }, + "http_req_failed": { + "fails": 8834, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_waiting": { + "avg": 289.733690095088, + "min": 43.0393, + "med": 251.69385, + "max": 5905.6298, + "p(90)": 421.6166, + "p(95)": 467.62433000000004 + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_before-100vu-run2.txt b/benchmarks/raw/fix_b_downstream_before-100vu-run2.txt new file mode 100644 index 0000000..7f94db8 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-100vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 100 VUs 00.0s/30s + +running (0m02.0s), 100/100 VUs, 160 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 01.0s/30s + +running (0m03.0s), 100/100 VUs, 394 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.0s/30s + +running (0m04.0s), 100/100 VUs, 579 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 03.0s/30s + +running (0m05.0s), 100/100 VUs, 914 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 04.0s/30s + +running (0m06.0s), 100/100 VUs, 1235 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.0s/30s + +running (0m07.0s), 100/100 VUs, 1517 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 06.0s/30s + +running (0m08.0s), 100/100 VUs, 1815 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 07.0s/30s + +running (0m09.0s), 100/100 VUs, 2141 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.0s/30s + +running (0m10.0s), 100/100 VUs, 2534 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 09.0s/30s + +running (0m11.0s), 100/100 VUs, 2947 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 10.0s/30s + +running (0m12.0s), 100/100 VUs, 3281 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.0s/30s + +running (0m13.0s), 100/100 VUs, 3573 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 12.0s/30s + +running (0m14.0s), 100/100 VUs, 3955 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 13.0s/30s + +running (0m15.0s), 100/100 VUs, 4294 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.0s/30s + +running (0m16.0s), 100/100 VUs, 4592 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 15.0s/30s + +running (0m17.0s), 100/100 VUs, 4920 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 16.0s/30s + +running (0m18.0s), 100/100 VUs, 5241 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.0s/30s + +running (0m19.0s), 100/100 VUs, 5527 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 18.0s/30s + +running (0m20.0s), 100/100 VUs, 5855 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 19.0s/30s + +running (0m21.0s), 100/100 VUs, 6185 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.0s/30s + +running (0m22.0s), 100/100 VUs, 6555 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 21.0s/30s + +running (0m23.0s), 100/100 VUs, 6811 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 22.0s/30s + +running (0m24.0s), 100/100 VUs, 7074 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.0s/30s + +running (0m25.0s), 100/100 VUs, 7274 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 24.0s/30s + +running (0m26.1s), 100/100 VUs, 7497 complete and 0 interrupted iterations +default [ 84% ] 100 VUs 25.1s/30s + +running (0m27.0s), 100/100 VUs, 7652 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.0s/30s + +running (0m28.0s), 100/100 VUs, 7988 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 27.0s/30s + +running (0m29.0s), 100/100 VUs, 8232 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 28.0s/30s + +running (0m30.0s), 100/100 VUs, 8485 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.0s/30s + +running (0m31.0s), 100/100 VUs, 8733 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8833 282.619166/s + checks_succeeded...: 100.00% 8833 out of 8833 + checks_failed......: 0.00% 0 out of 8833 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=289.86ms min=52.18ms med=251.88ms max=5.9s p(90)=421.66ms p(95)=467.87ms + { expected_response:true }...: avg=289.86ms min=52.18ms med=251.88ms max=5.9s p(90)=421.66ms p(95)=467.87ms + http_req_failed................: 0.00% 0 out of 8834 + http_reqs......................: 8834 282.651162/s + + EXECUTION + iteration_duration.............: avg=340.65ms min=102.69ms med=302.53ms max=5.97s p(90)=473.8ms p(95)=519.62ms + iterations.....................: 8833 282.619166/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.0 MB 94 kB/s + data_sent......................: 4.0 MB 128 kB/s + + + + +running (0m31.3s), 000/100 VUs, 8833 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_before-100vu-run3.json b/benchmarks/raw/fix_b_downstream_before-100vu-run3.json new file mode 100644 index 0000000..182dd19 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "p(95)": 0.5516, + "avg": 0.09617785934673892, + "min": 0, + "med": 0, + "max": 3.933, + "p(90)": 0.5389 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.02705499521225662, + "min": 0, + "med": 0, + "max": 30.7138 + }, + "data_sent": { + "count": 4266223, + "rate": 136920.913222585 + }, + "http_req_duration": { + "avg": 270.0988654856907, + "min": 36.9371, + "med": 235.7631, + "max": 5545.6773, + "p(90)": 395.15346, + "p(95)": 452.99275 + }, + "http_req_duration{expected_response:true}": { + "min": 36.9371, + "med": 235.7631, + "max": 5545.6773, + "p(90)": 395.15346, + "p(95)": 452.99275, + "avg": 270.0988654856907 + }, + "iteration_duration": { + "avg": 320.63035814002967, + "min": 87.1367, + "med": 286.09645, + "max": 5596.4777, + "p(90)": 445.64755, + "p(95)": 503.36470499999984 + }, + "http_req_waiting": { + "p(95)": 452.99275, + "avg": 269.97563263113113, + "min": 36.9371, + "med": 235.5356, + "max": 5545.6773, + "p(90)": 395.08996 + }, + "iterations": { + "count": 9398, + "rate": 301.6210691437962 + }, + "data_received": { + "rate": 100363.04675510418, + "count": 3127142 + }, + "vus": { + "max": 100, + "value": 82, + "min": 82 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "checks": { + "passes": 9398, + "fails": 0, + "value": 1 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.016877465687839124, + "min": 0, + "med": 0, + "max": 14.2756, + "p(90)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 9399, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "rate": 301.6531633201256, + "count": 9399 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_req_blocked": { + "avg": 0.0494135227151825, + "min": 0, + "med": 0, + "max": 29.6101, + "p(90)": 0, + "p(95)": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 9398, + "fails": 0 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_before-100vu-run3.txt b/benchmarks/raw/fix_b_downstream_before-100vu-run3.txt new file mode 100644 index 0000000..5286112 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-100vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 100 VUs 00.1s/30s + +running (0m02.0s), 100/100 VUs, 246 complete and 0 interrupted iterations +default [ 4% ] 100 VUs 01.1s/30s + +running (0m03.0s), 100/100 VUs, 483 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.1s/30s + +running (0m04.0s), 100/100 VUs, 811 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 03.1s/30s + +running (0m05.0s), 100/100 VUs, 1098 complete and 0 interrupted iterations +default [ 14% ] 100 VUs 04.1s/30s + +running (0m06.0s), 100/100 VUs, 1399 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.1s/30s + +running (0m07.0s), 100/100 VUs, 1650 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 06.1s/30s + +running (0m08.0s), 100/100 VUs, 1960 complete and 0 interrupted iterations +default [ 24% ] 100 VUs 07.1s/30s + +running (0m09.0s), 100/100 VUs, 2320 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.1s/30s + +running (0m10.0s), 100/100 VUs, 2630 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 09.1s/30s + +running (0m11.0s), 100/100 VUs, 2930 complete and 0 interrupted iterations +default [ 34% ] 100 VUs 10.1s/30s + +running (0m12.0s), 100/100 VUs, 3268 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.1s/30s + +running (0m13.0s), 100/100 VUs, 3613 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 12.1s/30s + +running (0m14.0s), 100/100 VUs, 3897 complete and 0 interrupted iterations +default [ 44% ] 100 VUs 13.1s/30s + +running (0m15.0s), 100/100 VUs, 4185 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.1s/30s + +running (0m16.0s), 100/100 VUs, 4470 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 15.1s/30s + +running (0m17.0s), 100/100 VUs, 4803 complete and 0 interrupted iterations +default [ 54% ] 100 VUs 16.1s/30s + +running (0m18.0s), 100/100 VUs, 5095 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.1s/30s + +running (0m19.0s), 100/100 VUs, 5423 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 18.1s/30s + +running (0m20.0s), 100/100 VUs, 5766 complete and 0 interrupted iterations +default [ 64% ] 100 VUs 19.1s/30s + +running (0m21.0s), 100/100 VUs, 6110 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.1s/30s + +running (0m22.0s), 100/100 VUs, 6382 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 21.1s/30s + +running (0m23.0s), 100/100 VUs, 6635 complete and 0 interrupted iterations +default [ 74% ] 100 VUs 22.1s/30s + +running (0m24.0s), 100/100 VUs, 6933 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.1s/30s + +running (0m25.0s), 100/100 VUs, 7245 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 24.1s/30s + +running (0m26.0s), 100/100 VUs, 7630 complete and 0 interrupted iterations +default [ 84% ] 100 VUs 25.1s/30s + +running (0m27.0s), 100/100 VUs, 8038 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.1s/30s + +running (0m28.0s), 100/100 VUs, 8378 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 27.1s/30s + +running (0m29.0s), 100/100 VUs, 8724 complete and 0 interrupted iterations +default [ 94% ] 100 VUs 28.1s/30s + +running (0m30.0s), 100/100 VUs, 9010 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.1s/30s + +running (0m31.0s), 084/100 VUs, 9315 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9398 301.621069/s + checks_succeeded...: 100.00% 9398 out of 9398 + checks_failed......: 0.00% 0 out of 9398 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=270.09ms min=36.93ms med=235.76ms max=5.54s p(90)=395.15ms p(95)=452.99ms + { expected_response:true }...: avg=270.09ms min=36.93ms med=235.76ms max=5.54s p(90)=395.15ms p(95)=452.99ms + http_req_failed................: 0.00% 0 out of 9399 + http_reqs......................: 9399 301.653163/s + + EXECUTION + iteration_duration.............: avg=320.63ms min=87.13ms med=286.09ms max=5.59s p(90)=445.64ms p(95)=503.36ms + iterations.....................: 9398 301.621069/s + vus............................: 82 min=82 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.1 MB 100 kB/s + data_sent......................: 4.3 MB 137 kB/s + + + + +running (0m31.2s), 000/100 VUs, 9398 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_before-100vu-warmup.json b/benchmarks/raw/fix_b_downstream_before-100vu-warmup.json new file mode 100644 index 0000000..0f795ad --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "iterations": { + "rate": 246.14636013724655, + "count": 7719 + }, + "checks": { + "passes": 7719, + "fails": 0, + "value": 1 + }, + "http_req_duration": { + "p(95)": 662.8184849999998, + "avg": 341.1472603626948, + "min": 21.7754, + "med": 287.5049, + "max": 7649.2034, + "p(90)": 475.72181000000035 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_failed": { + "passes": 0, + "fails": 7720, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "iteration_duration": { + "min": 71.8083, + "med": 338.2784, + "max": 7702.0099, + "p(90)": 526.1761799999998, + "p(95)": 713.16778, + "avg": 392.1950447596847 + }, + "vus": { + "value": 75, + "min": 75, + "max": 100 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_reqs": { + "count": 7720, + "rate": 246.17824851140605 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.060483108808290144, + "min": 0, + "med": 0, + "max": 51.6533, + "p(90)": 0 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.035282422279792794, + "min": 0, + "med": 0, + "max": 19.324 + }, + "http_req_duration{expected_response:true}": { + "avg": 341.1472603626948, + "min": 21.7754, + "med": 287.5049, + "max": 7649.2034, + "p(90)": 475.72181000000035, + "p(95)": 662.8184849999998 + }, + "data_received": { + "count": 2603294, + "rate": 83014.81311920367 + }, + "http_req_waiting": { + "p(95)": 662.5405999999999, + "avg": 341.0061254792753, + "min": 21.2329, + "med": 287.382, + "max": 7649.2034, + "p(90)": 475.72181000000035 + }, + "data_sent": { + "count": 3503603, + "rate": 111724.20337037665 + }, + "http_req_connecting": { + "max": 18.075, + "p(90)": 0, + "p(95)": 0, + "avg": 0.027868639896373056, + "min": 0, + "med": 0 + }, + "http_req_receiving": { + "p(90)": 0.5418, + "p(95)": 0.5570149999999998, + "avg": 0.10585246113989623, + "min": 0, + "med": 0, + "max": 6.4598 + } + }, + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7719, + "fails": 0, + "name": "status is 200" + } + }, + "name": "" + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_before-100vu-warmup.txt b/benchmarks/raw/fix_b_downstream_before-100vu-warmup.txt new file mode 100644 index 0000000..0b1dffd --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 20 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 00.2s/30s + +running (0m02.0s), 100/100 VUs, 302 complete and 0 interrupted iterations +default [ 4% ] 100 VUs 01.2s/30s + +running (0m03.0s), 100/100 VUs, 484 complete and 0 interrupted iterations +default [ 7% ] 100 VUs 02.2s/30s + +running (0m04.0s), 100/100 VUs, 672 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 03.2s/30s + +running (0m05.0s), 100/100 VUs, 893 complete and 0 interrupted iterations +default [ 14% ] 100 VUs 04.2s/30s + +running (0m06.0s), 100/100 VUs, 1071 complete and 0 interrupted iterations +default [ 17% ] 100 VUs 05.2s/30s + +running (0m07.0s), 100/100 VUs, 1259 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 06.2s/30s + +running (0m08.0s), 100/100 VUs, 1489 complete and 0 interrupted iterations +default [ 24% ] 100 VUs 07.2s/30s + +running (0m09.0s), 100/100 VUs, 1699 complete and 0 interrupted iterations +default [ 27% ] 100 VUs 08.2s/30s + +running (0m10.0s), 100/100 VUs, 1946 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 09.2s/30s + +running (0m11.0s), 100/100 VUs, 2260 complete and 0 interrupted iterations +default [ 34% ] 100 VUs 10.2s/30s + +running (0m12.0s), 100/100 VUs, 2527 complete and 0 interrupted iterations +default [ 37% ] 100 VUs 11.2s/30s + +running (0m13.0s), 100/100 VUs, 2802 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 12.2s/30s + +running (0m14.0s), 100/100 VUs, 3142 complete and 0 interrupted iterations +default [ 44% ] 100 VUs 13.2s/30s + +running (0m15.0s), 100/100 VUs, 3470 complete and 0 interrupted iterations +default [ 47% ] 100 VUs 14.2s/30s + +running (0m16.0s), 100/100 VUs, 3836 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 15.2s/30s + +running (0m17.0s), 100/100 VUs, 4180 complete and 0 interrupted iterations +default [ 54% ] 100 VUs 16.2s/30s + +running (0m18.0s), 100/100 VUs, 4515 complete and 0 interrupted iterations +default [ 57% ] 100 VUs 17.2s/30s + +running (0m19.0s), 100/100 VUs, 4847 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 18.2s/30s + +running (0m20.0s), 100/100 VUs, 5128 complete and 0 interrupted iterations +default [ 64% ] 100 VUs 19.2s/30s + +running (0m21.0s), 100/100 VUs, 5370 complete and 0 interrupted iterations +default [ 67% ] 100 VUs 20.2s/30s + +running (0m22.0s), 100/100 VUs, 5576 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 21.2s/30s + +running (0m23.0s), 100/100 VUs, 5807 complete and 0 interrupted iterations +default [ 74% ] 100 VUs 22.2s/30s + +running (0m24.0s), 100/100 VUs, 6092 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.2s/30s + +running (0m25.0s), 100/100 VUs, 6451 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 24.2s/30s + +running (0m26.0s), 100/100 VUs, 6725 complete and 0 interrupted iterations +default [ 84% ] 100 VUs 25.2s/30s + +running (0m27.0s), 100/100 VUs, 6935 complete and 0 interrupted iterations +default [ 87% ] 100 VUs 26.2s/30s + +running (0m28.0s), 100/100 VUs, 7266 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 27.2s/30s + +running (0m29.0s), 100/100 VUs, 7439 complete and 0 interrupted iterations +default [ 94% ] 100 VUs 28.2s/30s + +running (0m30.0s), 100/100 VUs, 7535 complete and 0 interrupted iterations +default [ 97% ] 100 VUs 29.2s/30s + +running (0m31.0s), 075/100 VUs, 7644 complete and 0 interrupted iterations +default โ†“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7719 246.14636/s + checks_succeeded...: 100.00% 7719 out of 7719 + checks_failed......: 0.00% 0 out of 7719 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=341.14ms min=21.77ms med=287.5ms max=7.64s p(90)=475.72ms p(95)=662.81ms + { expected_response:true }...: avg=341.14ms min=21.77ms med=287.5ms max=7.64s p(90)=475.72ms p(95)=662.81ms + http_req_failed................: 0.00% 0 out of 7720 + http_reqs......................: 7720 246.178249/s + + EXECUTION + iteration_duration.............: avg=392.19ms min=71.8ms med=338.27ms max=7.7s p(90)=526.17ms p(95)=713.16ms + iterations.....................: 7719 246.14636/s + vus............................: 75 min=75 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.6 MB 83 kB/s + data_sent......................: 3.5 MB 112 kB/s + + + + +running (0m31.4s), 000/100 VUs, 7719 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_before-50vu-run1.json b/benchmarks/raw/fix_b_downstream_before-50vu-run1.json new file mode 100644 index 0000000..1ac48b0 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8651, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_waiting": { + "avg": 123.3570647942674, + "min": 19.3917, + "med": 115.4905, + "max": 855.1877, + "p(90)": 181.45607, + "p(95)": 204.4807649999999 + }, + "http_req_failed": { + "passes": 0, + "fails": 8652, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration": { + "max": 856.0797, + "p(90)": 181.65164000000004, + "p(95)": 204.5345, + "avg": 123.47468046694428, + "min": 19.3917, + "med": 115.67115000000001 + }, + "http_reqs": { + "rate": 278.47369738038003, + "count": 8652 + }, + "checks": { + "passes": 8651, + "fails": 0, + "value": 1 + }, + "http_req_blocked": { + "avg": 0.014154519186315294, + "min": 0, + "med": 0, + "max": 25.8144, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_connecting": { + "avg": 0.006736581137309292, + "min": 0, + "med": 0, + "max": 5.5043, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "value": 44, + "min": 44, + "max": 50 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_req_receiving": { + "avg": 0.09828399214054562, + "min": 0, + "med": 0, + "max": 4.5078, + "p(90)": 0.5366, + "p(95)": 0.5614449999999999 + }, + "http_req_duration{expected_response:true}": { + "avg": 123.47468046694428, + "min": 19.3917, + "med": 115.67115000000001, + "max": 856.0797, + "p(90)": 181.65164000000004, + "p(95)": 204.5345 + }, + "data_received": { + "count": 2894078, + "rate": 93148.93679695047 + }, + "iterations": { + "rate": 278.4415113312145, + "count": 8651 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "iteration_duration": { + "p(95)": 255.55755, + "avg": 174.01141751242574, + "min": 69.6407, + "med": 166.2311, + "max": 784.1345, + "p(90)": 232.4719 + }, + "http_req_sending": { + "avg": 0.01933168053629219, + "min": 0, + "med": 0, + "max": 29.4005, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 3934533, + "rate": 126637.07258149778 + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_before-50vu-run1.txt b/benchmarks/raw/fix_b_downstream_before-50vu-run1.txt new file mode 100644 index 0000000..4835281 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-50vu-run1.txt @@ -0,0 +1,148 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 50 VUs 00.1s/30s + +running (0m02.0s), 50/50 VUs, 228 complete and 0 interrupted iterations +default [ 4% ] 50 VUs 01.1s/30s + +running (0m03.0s), 50/50 VUs, 503 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.1s/30s + +running (0m04.0s), 50/50 VUs, 777 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.1s/30s + +running (0m05.0s), 50/50 VUs, 1045 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.1s/30s + +running (0m06.0s), 50/50 VUs, 1267 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.1s/30s + +running (0m07.0s), 50/50 VUs, 1509 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.1s/30s + +running (0m08.0s), 50/50 VUs, 1783 complete and 0 interrupted iterations +default [ 24% ] 50 VUs 07.1s/30s + +running (0m09.0s), 50/50 VUs, 2112 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.1s/30s + +running (0m10.0s), 50/50 VUs, 2447 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.1s/30s + +running (0m11.0s), 50/50 VUs, 2778 complete and 0 interrupted iterations +default [ 34% ] 50 VUs 10.1s/30s + +running (0m12.0s), 50/50 VUs, 3109 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.1s/30s + +running (0m13.0s), 50/50 VUs, 3460 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.1s/30s + +running (0m14.0s), 50/50 VUs, 3691 complete and 0 interrupted iterations +default [ 44% ] 50 VUs 13.1s/30s + +running (0m15.0s), 50/50 VUs, 3949 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.1s/30s + +running (0m16.0s), 50/50 VUs, 4248 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.1s/30s + +running (0m17.0s), 50/50 VUs, 4570 complete and 0 interrupted iterations +default [ 54% ] 50 VUs 16.1s/30s + +running (0m18.0s), 50/50 VUs, 4877 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.1s/30s + +running (0m19.0s), 50/50 VUs, 5213 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.1s/30s + +running (0m20.0s), 50/50 VUs, 5548 complete and 0 interrupted iterations +default [ 64% ] 50 VUs 19.1s/30s + +running (0m21.0s), 50/50 VUs, 5894 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.1s/30s + +running (0m22.0s), 50/50 VUs, 6225 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.1s/30s + +running (0m23.0s), 50/50 VUs, 6548 complete and 0 interrupted iterations +default [ 74% ] 50 VUs 22.1s/30s + +running (0m24.0s), 50/50 VUs, 6751 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.1s/30s + +running (0m25.0s), 50/50 VUs, 6986 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.1s/30s + +running (0m26.0s), 50/50 VUs, 7256 complete and 0 interrupted iterations +default [ 84% ] 50 VUs 25.1s/30s + +running (0m27.0s), 50/50 VUs, 7554 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.1s/30s + +running (0m28.0s), 50/50 VUs, 7900 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.1s/30s + +running (0m29.0s), 50/50 VUs, 8150 complete and 0 interrupted iterations +default [ 94% ] 50 VUs 28.1s/30s + +running (0m30.0s), 50/50 VUs, 8335 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.1s/30s + +running (0m31.0s), 44/50 VUs, 8607 complete and 0 interrupted iterations +default โ†“ [ 100% ] 50 VUs 30s + +running (0m31.1s), 00/50 VUs, 8651 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8651 278.441511/s + checks_succeeded...: 100.00% 8651 out of 8651 + checks_failed......: 0.00% 0 out of 8651 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=123.47ms min=19.39ms med=115.67ms max=856.07ms p(90)=181.65ms p(95)=204.53ms + { expected_response:true }...: avg=123.47ms min=19.39ms med=115.67ms max=856.07ms p(90)=181.65ms p(95)=204.53ms + http_req_failed................: 0.00% 0 out of 8652 + http_reqs......................: 8652 278.473697/s + + EXECUTION + iteration_duration.............: avg=174.01ms min=69.64ms med=166.23ms max=784.13ms p(90)=232.47ms p(95)=255.55ms + iterations.....................: 8651 278.441511/s + vus............................: 44 min=44 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.9 MB 93 kB/s + data_sent......................: 3.9 MB 127 kB/s + + + + +running (0m31.1s), 00/50 VUs, 8651 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_before-50vu-run2.json b/benchmarks/raw/fix_b_downstream_before-50vu-run2.json new file mode 100644 index 0000000..a30372c --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10062, + "fails": 0 + } + } + }, + "metrics": { + "http_req_duration{expected_response:true}": { + "p(90)": 143.42214, + "p(95)": 166.4251, + "avg": 98.91091385272802, + "min": 18.3411, + "med": 92.6732, + "max": 1214.0164 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 10063, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_receiving": { + "avg": 0.09459279538904918, + "min": 0, + "med": 0, + "max": 5.1048, + "p(90)": 0.5321800000000001, + "p(95)": 0.54929 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.02465450660836728, + "min": 0, + "med": 0, + "max": 19.2213, + "p(90)": 0 + }, + "http_req_waiting": { + "avg": 98.79166655073053, + "min": 18.3411, + "med": 92.5706, + "max": 1211.2631, + "p(90)": 143.29092000000003, + "p(95)": 166.41058999999998 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.011646109510086457, + "min": 0, + "med": 0, + "max": 9.9283 + }, + "data_received": { + "rate": 106107.87870355738, + "count": 3334310 + }, + "iteration_duration": { + "p(90)": 194.05513999999997, + "p(95)": 217.24533999999997, + "avg": 149.34890233551937, + "min": 68.7131, + "med": 143.17655, + "max": 589.0735 + }, + "iterations": { + "count": 10062, + "rate": 320.20342305160415 + }, + "data_sent": { + "count": 4577949, + "rate": 145684.2516751807 + }, + "checks": { + "passes": 10062, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 10063, + "rate": 320.23524609106465 + }, + "http_req_blocked": { + "med": 0, + "max": 32.9541, + "p(90)": 0, + "p(95)": 0, + "avg": 0.017774619894663623, + "min": 0 + }, + "http_req_duration": { + "p(95)": 166.4251, + "avg": 98.91091385272802, + "min": 18.3411, + "med": 92.6732, + "max": 1214.0164, + "p(90)": 143.42214 + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_before-50vu-run2.txt b/benchmarks/raw/fix_b_downstream_before-50vu-run2.txt new file mode 100644 index 0000000..659943a --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 191 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.7s/30s + +running (0m03.0s), 50/50 VUs, 516 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.7s/30s + +running (0m04.0s), 50/50 VUs, 806 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.7s/30s + +running (0m05.0s), 50/50 VUs, 1127 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.7s/30s + +running (0m06.0s), 50/50 VUs, 1472 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.7s/30s + +running (0m07.0s), 50/50 VUs, 1862 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.7s/30s + +running (0m08.0s), 50/50 VUs, 2178 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.7s/30s + +running (0m09.0s), 50/50 VUs, 2518 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.7s/30s + +running (0m10.0s), 50/50 VUs, 2915 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.7s/30s + +running (0m11.0s), 50/50 VUs, 3222 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.7s/30s + +running (0m12.0s), 50/50 VUs, 3521 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.7s/30s + +running (0m13.0s), 50/50 VUs, 3913 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.7s/30s + +running (0m14.0s), 50/50 VUs, 4292 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.7s/30s + +running (0m15.0s), 50/50 VUs, 4593 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.7s/30s + +running (0m16.0s), 50/50 VUs, 4935 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.7s/30s + +running (0m17.0s), 50/50 VUs, 5258 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.7s/30s + +running (0m18.0s), 50/50 VUs, 5582 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.7s/30s + +running (0m19.0s), 50/50 VUs, 5927 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.7s/30s + +running (0m20.0s), 50/50 VUs, 6283 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.7s/30s + +running (0m21.0s), 50/50 VUs, 6628 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.7s/30s + +running (0m22.0s), 50/50 VUs, 7030 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.7s/30s + +running (0m23.0s), 50/50 VUs, 7407 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.7s/30s + +running (0m24.0s), 50/50 VUs, 7711 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.7s/30s + +running (0m25.0s), 50/50 VUs, 8022 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.7s/30s + +running (0m26.0s), 50/50 VUs, 8356 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.7s/30s + +running (0m27.0s), 50/50 VUs, 8699 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.7s/30s + +running (0m28.0s), 50/50 VUs, 9046 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.7s/30s + +running (0m29.0s), 50/50 VUs, 9392 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.7s/30s + +running (0m30.0s), 50/50 VUs, 9705 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.7s/30s + +running (0m31.0s), 50/50 VUs, 9952 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10062 320.203423/s + checks_succeeded...: 100.00% 10062 out of 10062 + checks_failed......: 0.00% 0 out of 10062 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=98.91ms min=18.34ms med=92.67ms max=1.21s p(90)=143.42ms p(95)=166.42ms + { expected_response:true }...: avg=98.91ms min=18.34ms med=92.67ms max=1.21s p(90)=143.42ms p(95)=166.42ms + http_req_failed................: 0.00% 0 out of 10063 + http_reqs......................: 10063 320.235246/s + + EXECUTION + iteration_duration.............: avg=149.34ms min=68.71ms med=143.17ms max=589.07ms p(90)=194.05ms p(95)=217.24ms + iterations.....................: 10062 320.203423/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.3 MB 106 kB/s + data_sent......................: 4.6 MB 146 kB/s + + + + +running (0m31.4s), 00/50 VUs, 10062 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_before-50vu-run3.json b/benchmarks/raw/fix_b_downstream_before-50vu-run3.json new file mode 100644 index 0000000..a33ccdd --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "data_sent": { + "count": 4484925, + "rate": 143168.64555379367 + }, + "http_reqs": { + "count": 9859, + "rate": 314.72090982900534 + }, + "http_req_duration{expected_response:true}": { + "avg": 101.84200926057419, + "min": 12.8291, + "med": 95.8883, + "max": 1182.8459, + "p(90)": 146.34482, + "p(95)": 162.69444000000001 + }, + "iteration_duration": { + "p(95)": 213.46385999999995, + "avg": 152.27848043213584, + "min": 62.9115, + "med": 146.4549, + "max": 563.2176, + "p(90)": 196.87757000000005 + }, + "iterations": { + "count": 9858, + "rate": 314.6889876350882 + }, + "checks": { + "passes": 9858, + "fails": 0, + "value": 1 + }, + "http_req_connecting": { + "max": 16.985, + "p(90)": 0, + "p(95)": 0, + "avg": 0.011474399026270414, + "min": 0, + "med": 0 + }, + "http_req_receiving": { + "p(90)": 0.5339400000000002, + "p(95)": 0.5494, + "avg": 0.09331862257835477, + "min": 0, + "med": 0, + "max": 4.9714 + }, + "data_received": { + "count": 3270662, + "rate": 104406.7066013951 + }, + "vus": { + "max": 50, + "value": 50, + "min": 0 + }, + "http_req_blocked": { + "avg": 0.02075662846130439, + "min": 0, + "med": 0, + "max": 29.9352, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.012168505933664673, + "min": 0, + "med": 0, + "max": 5.5623 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 9859, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_waiting": { + "max": 1181.0211, + "p(90)": 146.2007, + "p(95)": 162.62355000000002, + "avg": 101.73652213206218, + "min": 12.8291, + "med": 95.7877 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_duration": { + "avg": 101.84200926057419, + "min": 12.8291, + "med": 95.8883, + "max": 1182.8459, + "p(90)": 146.34482, + "p(95)": 162.69444000000001 + } + }, + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 9858, + "fails": 0 + } + }, + "name": "" + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_before-50vu-run3.txt b/benchmarks/raw/fix_b_downstream_before-50vu-run3.txt new file mode 100644 index 0000000..e44fe2a --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 124 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m03.0s), 50/50 VUs, 400 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.8s/30s + +running (0m04.0s), 50/50 VUs, 717 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m05.0s), 50/50 VUs, 1070 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.8s/30s + +running (0m06.0s), 50/50 VUs, 1379 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m07.0s), 50/50 VUs, 1628 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.8s/30s + +running (0m08.0s), 50/50 VUs, 1881 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m09.0s), 50/50 VUs, 2271 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.8s/30s + +running (0m10.0s), 50/50 VUs, 2590 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.8s/30s + +running (0m11.0s), 50/50 VUs, 2956 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m12.0s), 50/50 VUs, 3341 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.8s/30s + +running (0m13.0s), 50/50 VUs, 3693 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.8s/30s + +running (0m14.0s), 50/50 VUs, 4111 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m15.0s), 50/50 VUs, 4481 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.8s/30s + +running (0m16.0s), 50/50 VUs, 4826 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m17.0s), 50/50 VUs, 5190 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.8s/30s + +running (0m18.0s), 50/50 VUs, 5581 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.8s/30s + +running (0m19.0s), 50/50 VUs, 5971 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m20.0s), 50/50 VUs, 6325 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.8s/30s + +running (0m21.0s), 50/50 VUs, 6642 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.8s/30s + +running (0m22.0s), 50/50 VUs, 6980 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m23.0s), 50/50 VUs, 7237 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m24.0s), 50/50 VUs, 7507 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m25.0s), 50/50 VUs, 7854 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.8s/30s + +running (0m26.0s), 50/50 VUs, 8124 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m27.0s), 50/50 VUs, 8433 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.8s/30s + +running (0m28.0s), 50/50 VUs, 8759 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.8s/30s + +running (0m29.0s), 50/50 VUs, 9103 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.8s/30s + +running (0m30.0s), 50/50 VUs, 9426 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m31.0s), 50/50 VUs, 9725 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9858 314.688988/s + checks_succeeded...: 100.00% 9858 out of 9858 + checks_failed......: 0.00% 0 out of 9858 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=101.84ms min=12.82ms med=95.88ms max=1.18s p(90)=146.34ms p(95)=162.69ms + { expected_response:true }...: avg=101.84ms min=12.82ms med=95.88ms max=1.18s p(90)=146.34ms p(95)=162.69ms + http_req_failed................: 0.00% 0 out of 9859 + http_reqs......................: 9859 314.72091/s + + EXECUTION + iteration_duration.............: avg=152.27ms min=62.91ms med=146.45ms max=563.21ms p(90)=196.87ms p(95)=213.46ms + iterations.....................: 9858 314.688988/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.3 MB 104 kB/s + data_sent......................: 4.5 MB 143 kB/s + + + + +running (0m31.3s), 00/50 VUs, 9858 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/fix_b_downstream_before-50vu-warmup.json b/benchmarks/raw/fix_b_downstream_before-50vu-warmup.json new file mode 100644 index 0000000..c1a827e --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_waiting": { + "avg": 135.3827914504573, + "min": 31.5876, + "med": 129.8562, + "max": 1009.6629, + "p(90)": 203.74448, + "p(95)": 227.37727999999998 + }, + "iterations": { + "count": 8093, + "rate": 258.7535729446625 + }, + "http_req_duration": { + "p(95)": 227.58105499999982, + "avg": 135.5220267111441, + "min": 32.1178, + "med": 129.99355, + "max": 1010.7272, + "p(90)": 203.92596999999998 + }, + "checks": { + "passes": 8093, + "fails": 0, + "value": 1 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "iteration_duration": { + "p(95)": 278.85876, + "avg": 186.13065099468673, + "min": 82.3391, + "med": 180.6205, + "max": 751.3084, + "p(90)": 255.03724000000003 + }, + "http_req_failed": { + "fails": 8094, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "data_received": { + "rate": 86964.66833623736, + "count": 2719982 + }, + "http_req_sending": { + "avg": 0.023743909068445743, + "min": 0, + "med": 0, + "max": 6.768, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_blocked": { + "max": 26.9077, + "p(90)": 0, + "p(95)": 0, + "avg": 0.029897244872745227, + "min": 0, + "med": 0 + }, + "http_reqs": { + "count": 8094, + "rate": 258.78554546078067 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 17.9494, + "p(90)": 0, + "p(95)": 0, + "avg": 0.015374128984432916 + }, + "data_sent": { + "count": 3680085, + "rate": 117661.57697887781 + }, + "http_req_receiving": { + "avg": 0.11549135161848283, + "min": 0, + "med": 0, + "max": 23.5603, + "p(90)": 0.54037, + "p(95)": 0.5552 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 203.92596999999998, + "p(95)": 227.58105499999982, + "avg": 135.5220267111441, + "min": 32.1178, + "med": 129.99355, + "max": 1010.7272 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8093, + "fails": 0 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/fix_b_downstream_before-50vu-warmup.txt b/benchmarks/raw/fix_b_downstream_before-50vu-warmup.txt new file mode 100644 index 0000000..c040e22 --- /dev/null +++ b/benchmarks/raw/fix_b_downstream_before-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 110 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.9s/30s + +running (0m03.0s), 50/50 VUs, 310 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.9s/30s + +running (0m04.0s), 50/50 VUs, 496 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 02.9s/30s + +running (0m05.0s), 50/50 VUs, 716 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.9s/30s + +running (0m06.0s), 50/50 VUs, 922 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.9s/30s + +running (0m07.0s), 50/50 VUs, 1161 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m08.0s), 50/50 VUs, 1390 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.9s/30s + +running (0m09.0s), 50/50 VUs, 1630 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m10.0s), 50/50 VUs, 1908 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m11.0s), 50/50 VUs, 2194 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.9s/30s + +running (0m12.0s), 50/50 VUs, 2501 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.9s/30s + +running (0m13.0s), 50/50 VUs, 2757 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 11.9s/30s + +running (0m14.0s), 50/50 VUs, 2977 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.9s/30s + +running (0m15.0s), 50/50 VUs, 3203 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.9s/30s + +running (0m16.0s), 50/50 VUs, 3435 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 14.9s/30s + +running (0m17.0s), 50/50 VUs, 3674 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.9s/30s + +running (0m18.0s), 50/50 VUs, 3948 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m19.0s), 50/50 VUs, 4185 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 17.9s/30s + +running (0m20.0s), 50/50 VUs, 4463 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.9s/30s + +running (0m21.0s), 50/50 VUs, 4792 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m22.0s), 50/50 VUs, 5131 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 20.9s/30s + +running (0m23.0s), 50/50 VUs, 5459 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.9s/30s + +running (0m24.0s), 50/50 VUs, 5743 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.9s/30s + +running (0m25.0s), 50/50 VUs, 6012 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 23.9s/30s + +running (0m26.0s), 50/50 VUs, 6392 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.9s/30s + +running (0m27.0s), 50/50 VUs, 6761 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m28.0s), 50/50 VUs, 7099 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m29.0s), 50/50 VUs, 7433 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m30.0s), 50/50 VUs, 7776 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.9s/30s + +running (0m31.0s), 50/50 VUs, 8025 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8093 258.753573/s + checks_succeeded...: 100.00% 8093 out of 8093 + checks_failed......: 0.00% 0 out of 8093 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=135.52ms min=32.11ms med=129.99ms max=1.01s p(90)=203.92ms p(95)=227.58ms + { expected_response:true }...: avg=135.52ms min=32.11ms med=129.99ms max=1.01s p(90)=203.92ms p(95)=227.58ms + http_req_failed................: 0.00% 0 out of 8094 + http_reqs......................: 8094 258.785545/s + + EXECUTION + iteration_duration.............: avg=186.13ms min=82.33ms med=180.62ms max=751.3ms p(90)=255.03ms p(95)=278.85ms + iterations.....................: 8093 258.753573/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.7 MB 87 kB/s + data_sent......................: 3.7 MB 118 kB/s + + + + +running (0m31.3s), 00/50 VUs, 8093 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/keepalive_only-100vu-run1.json b/benchmarks/raw/keepalive_only-100vu-run1.json new file mode 100644 index 0000000..275f949 --- /dev/null +++ b/benchmarks/raw/keepalive_only-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "p(95)": 0.5487, + "avg": 0.10862883070514745, + "min": 0, + "med": 0, + "max": 100.687, + "p(90)": 0.5290800000000001 + }, + "iterations": { + "count": 10082, + "rate": 320.56831898151535 + }, + "iteration_duration": { + "p(95)": 391.0186049999999, + "avg": 298.0462646597902, + "min": 89.8501, + "med": 284.6538, + "max": 4051.4147, + "p(90)": 359.59653999999995 + }, + "http_req_duration{expected_response:true}": { + "max": 3971.6159, + "p(90)": 309.1300800000001, + "p(95)": 340.62426, + "avg": 247.54764744619652, + "min": 34.0434, + "med": 234.1476 + }, + "data_sent": { + "count": 4576999, + "rate": 145530.7355098271 + }, + "http_req_failed": { + "passes": 0, + "fails": 10083, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "checks": { + "passes": 10082, + "fails": 0, + "value": 1 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.043450709114350894, + "min": 0, + "med": 0, + "max": 28.5891 + }, + "http_req_duration": { + "avg": 247.54764744619652, + "min": 34.0434, + "med": 234.1476, + "max": 3971.6159, + "p(90)": 309.1300800000001, + "p(95)": 340.62426 + }, + "http_req_sending": { + "avg": 0.03205661013587224, + "min": 0, + "med": 0, + "max": 51.3923, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "p(95)": 340.42433, + "avg": 247.4069620053556, + "min": 34.0434, + "med": 234.0963, + "max": 3971.6159, + "p(90)": 309.07592 + }, + "http_req_blocked": { + "max": 50.9762, + "p(90)": 0, + "p(95)": 0, + "avg": 0.07296643855995241, + "min": 0, + "med": 0 + }, + "http_reqs": { + "rate": 320.60011508536195, + "count": 10083 + }, + "data_received": { + "count": 3340550, + "rate": 106216.47470479082 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10082, + "fails": 0, + "name": "status is 200" + } + } + } +} diff --git a/benchmarks/raw/keepalive_only-100vu-run1.txt b/benchmarks/raw/keepalive_only-100vu-run1.txt new file mode 100644 index 0000000..4ae6faa --- /dev/null +++ b/benchmarks/raw/keepalive_only-100vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 177 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.8s/30s + +running (0m03.0s), 100/100 VUs, 472 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.8s/30s + +running (0m04.0s), 100/100 VUs, 745 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.8s/30s + +running (0m05.0s), 100/100 VUs, 1061 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.8s/30s + +running (0m06.0s), 100/100 VUs, 1415 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.8s/30s + +running (0m07.0s), 100/100 VUs, 1771 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.8s/30s + +running (0m08.0s), 100/100 VUs, 2111 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.8s/30s + +running (0m09.0s), 100/100 VUs, 2467 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.8s/30s + +running (0m10.0s), 100/100 VUs, 2832 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.8s/30s + +running (0m11.0s), 100/100 VUs, 3225 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.8s/30s + +running (0m12.0s), 100/100 VUs, 3540 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.8s/30s + +running (0m13.0s), 100/100 VUs, 3893 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.8s/30s + +running (0m14.0s), 100/100 VUs, 4274 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.8s/30s + +running (0m15.0s), 100/100 VUs, 4608 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.8s/30s + +running (0m16.0s), 100/100 VUs, 5005 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.8s/30s + +running (0m17.0s), 100/100 VUs, 5372 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.8s/30s + +running (0m18.0s), 100/100 VUs, 5749 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.8s/30s + +running (0m19.0s), 100/100 VUs, 6082 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.8s/30s + +running (0m20.0s), 100/100 VUs, 6416 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.8s/30s + +running (0m21.0s), 100/100 VUs, 6768 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.8s/30s + +running (0m22.0s), 100/100 VUs, 7158 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.8s/30s + +running (0m23.0s), 100/100 VUs, 7523 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.8s/30s + +running (0m24.0s), 100/100 VUs, 7819 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.8s/30s + +running (0m25.0s), 100/100 VUs, 8148 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.8s/30s + +running (0m26.0s), 100/100 VUs, 8415 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.8s/30s + +running (0m27.0s), 100/100 VUs, 8655 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.8s/30s + +running (0m28.0s), 100/100 VUs, 8961 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.8s/30s + +running (0m29.0s), 100/100 VUs, 9280 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.8s/30s + +running (0m30.0s), 100/100 VUs, 9612 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.8s/30s + +running (0m31.0s), 100/100 VUs, 9943 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10082 320.568319/s + checks_succeeded...: 100.00% 10082 out of 10082 + checks_failed......: 0.00% 0 out of 10082 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=247.54ms min=34.04ms med=234.14ms max=3.97s p(90)=309.13ms p(95)=340.62ms + { expected_response:true }...: avg=247.54ms min=34.04ms med=234.14ms max=3.97s p(90)=309.13ms p(95)=340.62ms + http_req_failed................: 0.00% 0 out of 10083 + http_reqs......................: 10083 320.600115/s + + EXECUTION + iteration_duration.............: avg=298.04ms min=89.85ms med=284.65ms max=4.05s p(90)=359.59ms p(95)=391.01ms + iterations.....................: 10082 320.568319/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.3 MB 106 kB/s + data_sent......................: 4.6 MB 146 kB/s + + + + +running (0m31.5s), 000/100 VUs, 10082 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/keepalive_only-100vu-run2.json b/benchmarks/raw/keepalive_only-100vu-run2.json new file mode 100644 index 0000000..5854d82 --- /dev/null +++ b/benchmarks/raw/keepalive_only-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10475, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "iteration_duration": { + "avg": 286.50680606205265, + "min": 109.1263, + "med": 281.1667, + "max": 2966.0545, + "p(90)": 339.38872, + "p(95)": 361.63606 + }, + "data_received": { + "rate": 108722.62985620664, + "count": 3463166 + }, + "http_reqs": { + "count": 10476, + "rate": 328.8835332680041 + }, + "http_req_failed": { + "passes": 0, + "fails": 10476, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration{expected_response:true}": { + "min": 58.8449, + "med": 230.69465, + "max": 2892.2232, + "p(90)": 288.7819, + "p(95)": 311.092575, + "avg": 236.10437588774346 + }, + "http_req_duration": { + "avg": 236.10437588774346, + "min": 58.8449, + "med": 230.69465, + "max": 2892.2232, + "p(90)": 288.7819, + "p(95)": 311.092575 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_req_receiving": { + "avg": 0.09558013554791903, + "min": 0, + "med": 0, + "max": 32.3403, + "p(90)": 0.531, + "p(95)": 0.5492250000000001 + }, + "data_sent": { + "count": 4755879, + "rate": 149306.06045390436 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_connecting": { + "avg": 0.034453283696067205, + "min": 0, + "med": 0, + "max": 62.6222, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.02010150820924016, + "min": 0, + "med": 0, + "max": 38.5975, + "p(90)": 0 + }, + "http_req_waiting": { + "p(90)": 288.57105, + "p(95)": 311.085175, + "avg": 235.98869424398637, + "min": 58.8449, + "med": 230.6646, + "max": 2892.2232 + }, + "iterations": { + "count": 10475, + "rate": 328.85213926902856 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.04668580565101184, + "min": 0, + "med": 0, + "max": 88.3526, + "p(90)": 0 + }, + "checks": { + "passes": 10475, + "fails": 0, + "value": 1 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + } + } +} diff --git a/benchmarks/raw/keepalive_only-100vu-run2.txt b/benchmarks/raw/keepalive_only-100vu-run2.txt new file mode 100644 index 0000000..f6cb7c0 --- /dev/null +++ b/benchmarks/raw/keepalive_only-100vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 42 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 00.4s/30s + +running (0m03.0s), 100/100 VUs, 359 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.4s/30s + +running (0m04.0s), 100/100 VUs, 677 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 02.4s/30s + +running (0m05.0s), 100/100 VUs, 1031 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 03.4s/30s + +running (0m06.0s), 100/100 VUs, 1415 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.4s/30s + +running (0m07.0s), 100/100 VUs, 1743 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 05.4s/30s + +running (0m08.0s), 100/100 VUs, 2085 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 06.4s/30s + +running (0m09.0s), 100/100 VUs, 2409 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.4s/30s + +running (0m10.0s), 100/100 VUs, 2706 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 08.4s/30s + +running (0m11.0s), 100/100 VUs, 3072 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 09.4s/30s + +running (0m12.0s), 100/100 VUs, 3363 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.4s/30s + +running (0m13.0s), 100/100 VUs, 3721 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 11.4s/30s + +running (0m14.0s), 100/100 VUs, 4112 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 12.4s/30s + +running (0m15.0s), 100/100 VUs, 4479 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.4s/30s + +running (0m16.0s), 100/100 VUs, 4834 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 14.4s/30s + +running (0m17.0s), 100/100 VUs, 5186 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 15.4s/30s + +running (0m18.0s), 100/100 VUs, 5511 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.4s/30s + +running (0m19.0s), 100/100 VUs, 5889 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 17.4s/30s + +running (0m20.0s), 100/100 VUs, 6251 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 18.4s/30s + +running (0m21.0s), 100/100 VUs, 6614 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.4s/30s + +running (0m22.0s), 100/100 VUs, 6946 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 20.4s/30s + +running (0m23.0s), 100/100 VUs, 7303 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 21.4s/30s + +running (0m24.0s), 100/100 VUs, 7597 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.4s/30s + +running (0m25.0s), 100/100 VUs, 7917 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 23.4s/30s + +running (0m26.0s), 100/100 VUs, 8270 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 24.4s/30s + +running (0m27.0s), 100/100 VUs, 8638 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.4s/30s + +running (0m28.0s), 100/100 VUs, 9021 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 26.4s/30s + +running (0m29.0s), 100/100 VUs, 9409 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 27.4s/30s + +running (0m30.0s), 100/100 VUs, 9775 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.4s/30s + +running (0m31.0s), 100/100 VUs, 10166 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 29.4s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10475 328.852139/s + checks_succeeded...: 100.00% 10475 out of 10475 + checks_failed......: 0.00% 0 out of 10475 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=236.1ms min=58.84ms med=230.69ms max=2.89s p(90)=288.78ms p(95)=311.09ms + { expected_response:true }...: avg=236.1ms min=58.84ms med=230.69ms max=2.89s p(90)=288.78ms p(95)=311.09ms + http_req_failed................: 0.00% 0 out of 10476 + http_reqs......................: 10476 328.883533/s + + EXECUTION + iteration_duration.............: avg=286.5ms min=109.12ms med=281.16ms max=2.96s p(90)=339.38ms p(95)=361.63ms + iterations.....................: 10475 328.852139/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.5 MB 109 kB/s + data_sent......................: 4.8 MB 149 kB/s + + + + +running (0m31.9s), 000/100 VUs, 10475 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/keepalive_only-100vu-run3.json b/benchmarks/raw/keepalive_only-100vu-run3.json new file mode 100644 index 0000000..7bc45aa --- /dev/null +++ b/benchmarks/raw/keepalive_only-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "iteration_duration": { + "p(95)": 368.53304999999995, + "avg": 287.2601107532032, + "min": 98.8559, + "med": 277.4403, + "max": 2737.0516, + "p(90)": 351.06637 + }, + "http_req_waiting": { + "avg": 236.70679990442483, + "min": 48.6758, + "med": 226.8611, + "max": 2681.3574, + "p(90)": 300.55248000000006, + "p(95)": 317.94099 + }, + "http_req_sending": { + "med": 0, + "max": 49.1086, + "p(90)": 0, + "p(95)": 0, + "avg": 0.026609261206155047, + "min": 0 + }, + "data_sent": { + "count": 4749925, + "rate": 150745.9599127475 + }, + "http_req_failed": { + "passes": 0, + "fails": 10463, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "min": 0, + "max": 100, + "value": 100 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "data_received": { + "count": 3459110, + "rate": 109780.01913583562 + }, + "checks": { + "passes": 10462, + "fails": 0, + "value": 1 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 300.66246, + "p(95)": 318.08133999999995, + "avg": 236.82454218675335, + "min": 48.6758, + "med": 226.9746, + "max": 2681.9306 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.0418938354200516, + "min": 0, + "med": 0, + "max": 44.579, + "p(90)": 0 + }, + "http_req_duration": { + "p(90)": 300.66246, + "p(95)": 318.08133999999995, + "avg": 236.82454218675335, + "min": 48.6758, + "med": 226.9746, + "max": 2681.9306 + }, + "iterations": { + "count": 10462, + "rate": 332.0271862412911 + }, + "http_req_receiving": { + "p(90)": 0.5328, + "p(95)": 0.5498, + "avg": 0.09113302112204906, + "min": 0, + "med": 0, + "max": 4.8942 + }, + "http_reqs": { + "count": 10463, + "rate": 332.05892273395415 + }, + "http_req_connecting": { + "max": 26.0226, + "p(90)": 0, + "p(95)": 0, + "avg": 0.025377023798145847, + "min": 0, + "med": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10462, + "fails": 0 + } + } + } +} diff --git a/benchmarks/raw/keepalive_only-100vu-run3.txt b/benchmarks/raw/keepalive_only-100vu-run3.txt new file mode 100644 index 0000000..d2ef0d7 --- /dev/null +++ b/benchmarks/raw/keepalive_only-100vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 127 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.7s/30s + +running (0m03.0s), 100/100 VUs, 429 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.7s/30s + +running (0m04.0s), 100/100 VUs, 725 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.7s/30s + +running (0m05.0s), 100/100 VUs, 1028 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.7s/30s + +running (0m06.0s), 100/100 VUs, 1344 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.7s/30s + +running (0m07.0s), 100/100 VUs, 1682 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.7s/30s + +running (0m08.0s), 100/100 VUs, 1996 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.7s/30s + +running (0m09.0s), 100/100 VUs, 2339 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.7s/30s + +running (0m10.0s), 100/100 VUs, 2641 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.7s/30s + +running (0m11.0s), 100/100 VUs, 3021 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.7s/30s + +running (0m12.0s), 100/100 VUs, 3407 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.7s/30s + +running (0m13.0s), 100/100 VUs, 3742 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.7s/30s + +running (0m14.0s), 100/100 VUs, 4078 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.7s/30s + +running (0m15.0s), 100/100 VUs, 4435 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.7s/30s + +running (0m16.0s), 100/100 VUs, 4813 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.7s/30s + +running (0m17.0s), 100/100 VUs, 5213 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.7s/30s + +running (0m18.0s), 100/100 VUs, 5599 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.7s/30s + +running (0m19.0s), 100/100 VUs, 5987 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.7s/30s + +running (0m20.0s), 100/100 VUs, 6349 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.7s/30s + +running (0m21.0s), 100/100 VUs, 6655 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.7s/30s + +running (0m22.0s), 100/100 VUs, 6995 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.7s/30s + +running (0m23.0s), 100/100 VUs, 7361 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.7s/30s + +running (0m24.0s), 100/100 VUs, 7740 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.7s/30s + +running (0m25.0s), 100/100 VUs, 8130 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.7s/30s + +running (0m26.0s), 100/100 VUs, 8531 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.7s/30s + +running (0m27.0s), 100/100 VUs, 8885 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.7s/30s + +running (0m28.0s), 100/100 VUs, 9257 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.7s/30s + +running (0m29.0s), 100/100 VUs, 9579 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.7s/30s + +running (0m30.0s), 100/100 VUs, 9891 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.7s/30s + +running (0m31.0s), 100/100 VUs, 10239 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10462 332.027186/s + checks_succeeded...: 100.00% 10462 out of 10462 + checks_failed......: 0.00% 0 out of 10462 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=236.82ms min=48.67ms med=226.97ms max=2.68s p(90)=300.66ms p(95)=318.08ms + { expected_response:true }...: avg=236.82ms min=48.67ms med=226.97ms max=2.68s p(90)=300.66ms p(95)=318.08ms + http_req_failed................: 0.00% 0 out of 10463 + http_reqs......................: 10463 332.058923/s + + EXECUTION + iteration_duration.............: avg=287.26ms min=98.85ms med=277.44ms max=2.73s p(90)=351.06ms p(95)=368.53ms + iterations.....................: 10462 332.027186/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.5 MB 110 kB/s + data_sent......................: 4.7 MB 151 kB/s + + + + +running (0m31.5s), 000/100 VUs, 10462 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/keepalive_only-100vu-warmup.json b/benchmarks/raw/keepalive_only-100vu-warmup.json new file mode 100644 index 0000000..5e0a74f --- /dev/null +++ b/benchmarks/raw/keepalive_only-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10337, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + } + }, + "metrics": { + "http_reqs": { + "count": 10338, + "rate": 329.9905178957947 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_duration": { + "med": 229.6304, + "max": 4440.3806, + "p(90)": 300.97961000000004, + "p(95)": 325.89343, + "avg": 239.82049537628123, + "min": 35.6753 + }, + "http_req_blocked": { + "med": 0, + "max": 86.2949, + "p(90)": 0, + "p(95)": 0, + "avg": 0.05722230605532982, + "min": 0 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration{expected_response:true}": { + "avg": 239.82049537628123, + "min": 35.6753, + "med": 229.6304, + "max": 4440.3806, + "p(90)": 300.97961000000004, + "p(95)": 325.89343 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 10338, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "max": 33.7378, + "p(90)": 0, + "p(95)": 0, + "avg": 0.03476084349003676, + "min": 0, + "med": 0 + }, + "http_req_waiting": { + "med": 229.46755, + "max": 4440.0571, + "p(90)": 300.73793, + "p(95)": 325.47199499999994, + "avg": 239.66886266202326, + "min": 34.2784 + }, + "data_sent": { + "rate": 149803.08666516584, + "count": 4693057 + }, + "data_received": { + "count": 3420110, + "rate": 109170.42659707743 + }, + "http_req_receiving": { + "p(90)": 0.5321600000000002, + "p(95)": 0.550715, + "avg": 0.0899154768814084, + "min": 0, + "med": 0, + "max": 4.2325 + }, + "iterations": { + "count": 10337, + "rate": 329.95859774509864 + }, + "iteration_duration": { + "avg": 290.30981670697514, + "min": 86.089, + "med": 280.0726, + "max": 4492.4766, + "p(90)": 351.37034, + "p(95)": 376.4795799999999 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 63.277, + "p(90)": 0, + "p(95)": 0, + "avg": 0.06171723737666855 + }, + "checks": { + "passes": 10337, + "fails": 0, + "value": 1 + } + } +} diff --git a/benchmarks/raw/keepalive_only-100vu-warmup.txt b/benchmarks/raw/keepalive_only-100vu-warmup.txt new file mode 100644 index 0000000..29f1e2f --- /dev/null +++ b/benchmarks/raw/keepalive_only-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 178 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.8s/30s + +running (0m03.0s), 100/100 VUs, 451 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.8s/30s + +running (0m04.0s), 100/100 VUs, 696 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.8s/30s + +running (0m05.0s), 100/100 VUs, 972 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.8s/30s + +running (0m06.0s), 100/100 VUs, 1274 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.8s/30s + +running (0m07.0s), 100/100 VUs, 1597 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.8s/30s + +running (0m08.0s), 100/100 VUs, 1933 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.8s/30s + +running (0m09.0s), 100/100 VUs, 2265 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.8s/30s + +running (0m10.0s), 100/100 VUs, 2596 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.8s/30s + +running (0m11.0s), 100/100 VUs, 2989 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.8s/30s + +running (0m12.0s), 100/100 VUs, 3326 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.8s/30s + +running (0m13.0s), 100/100 VUs, 3624 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.8s/30s + +running (0m14.0s), 100/100 VUs, 3951 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.8s/30s + +running (0m15.0s), 100/100 VUs, 4323 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.8s/30s + +running (0m16.0s), 100/100 VUs, 4674 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.8s/30s + +running (0m17.0s), 100/100 VUs, 5072 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.8s/30s + +running (0m18.0s), 100/100 VUs, 5452 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.8s/30s + +running (0m19.0s), 100/100 VUs, 5816 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.8s/30s + +running (0m20.0s), 100/100 VUs, 6181 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.8s/30s + +running (0m21.0s), 100/100 VUs, 6502 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.8s/30s + +running (0m22.0s), 100/100 VUs, 6850 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.8s/30s + +running (0m23.0s), 100/100 VUs, 7227 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.8s/30s + +running (0m24.0s), 100/100 VUs, 7580 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.8s/30s + +running (0m25.0s), 100/100 VUs, 7967 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.8s/30s + +running (0m26.0s), 100/100 VUs, 8333 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.8s/30s + +running (0m27.0s), 100/100 VUs, 8712 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.8s/30s + +running (0m28.0s), 100/100 VUs, 9071 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.8s/30s + +running (0m29.0s), 100/100 VUs, 9396 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.8s/30s + +running (0m30.0s), 100/100 VUs, 9773 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.8s/30s + +running (0m31.0s), 100/100 VUs, 10161 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10337 329.958598/s + checks_succeeded...: 100.00% 10337 out of 10337 + checks_failed......: 0.00% 0 out of 10337 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=239.82ms min=35.67ms med=229.63ms max=4.44s p(90)=300.97ms p(95)=325.89ms + { expected_response:true }...: avg=239.82ms min=35.67ms med=229.63ms max=4.44s p(90)=300.97ms p(95)=325.89ms + http_req_failed................: 0.00% 0 out of 10338 + http_reqs......................: 10338 329.990518/s + + EXECUTION + iteration_duration.............: avg=290.3ms min=86.08ms med=280.07ms max=4.49s p(90)=351.37ms p(95)=376.47ms + iterations.....................: 10337 329.958598/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.4 MB 109 kB/s + data_sent......................: 4.7 MB 150 kB/s + + + + +running (0m31.3s), 000/100 VUs, 10337 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/keepalive_only-20vu-run1.json b/benchmarks/raw/keepalive_only-20vu-run1.json new file mode 100644 index 0000000..bbeca9f --- /dev/null +++ b/benchmarks/raw/keepalive_only-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6234 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + }, + "metrics": { + "checks": { + "passes": 6234, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "passes": 0, + "fails": 6235, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "iteration_duration": { + "avg": 96.34281873596429, + "min": 57.101, + "med": 80.5863, + "max": 1108.841, + "p(90)": 106.93890999999999, + "p(95)": 127.12969999999981 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration": { + "avg": 45.980907890938376, + "min": 6.8929, + "med": 30.0754, + "max": 1057.7658, + "p(90)": 56.389660000000006, + "p(95)": 76.66354999999974 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.009158700882117081, + "min": 0, + "med": 0, + "max": 2.2639 + }, + "http_req_waiting": { + "avg": 45.880627040898176, + "min": 6.8929, + "med": 29.9628, + "max": 1057.7658, + "p(90)": 56.2691, + "p(95)": 76.66354999999974 + }, + "iterations": { + "count": 6234, + "rate": 200.24398351388777 + }, + "data_sent": { + "count": 2838681, + "rate": 91182.03262194201 + }, + "http_reqs": { + "count": 6235, + "rate": 200.27610478169558 + }, + "http_req_duration{expected_response:true}": { + "avg": 45.980907890938376, + "min": 6.8929, + "med": 30.0754, + "max": 1057.7658, + "p(90)": 56.389660000000006, + "p(95)": 76.66354999999974 + }, + "http_req_connecting": { + "avg": 0.005071355252606255, + "min": 0, + "med": 0, + "max": 8.8453, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_blocked": { + "avg": 0.012271868484362463, + "min": 0, + "med": 0, + "max": 33.2303, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "data_received": { + "count": 2139974, + "rate": 68738.67795575048 + }, + "http_req_receiving": { + "max": 6.8544, + "p(90)": 0.5308, + "p(95)": 0.55033, + "avg": 0.09112214915797927, + "min": 0, + "med": 0 + } + } +} diff --git a/benchmarks/raw/keepalive_only-20vu-run1.txt b/benchmarks/raw/keepalive_only-20vu-run1.txt new file mode 100644 index 0000000..4788bcf --- /dev/null +++ b/benchmarks/raw/keepalive_only-20vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 243 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m03.0s), 20/20 VUs, 475 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m04.0s), 20/20 VUs, 692 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m05.0s), 20/20 VUs, 890 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m06.0s), 20/20 VUs, 1124 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m07.0s), 20/20 VUs, 1362 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m08.0s), 20/20 VUs, 1611 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m09.0s), 20/20 VUs, 1870 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m10.0s), 20/20 VUs, 2119 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m11.0s), 20/20 VUs, 2372 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m12.0s), 20/20 VUs, 2617 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m13.0s), 20/20 VUs, 2891 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m14.0s), 20/20 VUs, 3152 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m15.0s), 20/20 VUs, 3385 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m16.0s), 20/20 VUs, 3638 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m17.0s), 20/20 VUs, 3807 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m18.0s), 20/20 VUs, 3829 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m19.0s), 20/20 VUs, 3850 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m20.0s), 20/20 VUs, 3877 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m21.0s), 20/20 VUs, 3912 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m22.0s), 20/20 VUs, 4105 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m23.0s), 20/20 VUs, 4328 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m24.0s), 20/20 VUs, 4551 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m25.0s), 20/20 VUs, 4782 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m26.0s), 20/20 VUs, 4967 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m27.0s), 20/20 VUs, 5158 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m28.0s), 20/20 VUs, 5381 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m29.0s), 20/20 VUs, 5672 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m30.0s), 20/20 VUs, 5933 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m31.0s), 20/20 VUs, 6199 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6234 200.243984/s + checks_succeeded...: 100.00% 6234 out of 6234 + checks_failed......: 0.00% 0 out of 6234 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=45.98ms min=6.89ms med=30.07ms max=1.05s p(90)=56.38ms p(95)=76.66ms + { expected_response:true }...: avg=45.98ms min=6.89ms med=30.07ms max=1.05s p(90)=56.38ms p(95)=76.66ms + http_req_failed................: 0.00% 0 out of 6235 + http_reqs......................: 6235 200.276105/s + + EXECUTION + iteration_duration.............: avg=96.34ms min=57.1ms med=80.58ms max=1.1s p(90)=106.93ms p(95)=127.12ms + iterations.....................: 6234 200.243984/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.1 MB 69 kB/s + data_sent......................: 2.8 MB 91 kB/s + + + + +running (0m31.1s), 00/20 VUs, 6234 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/keepalive_only-20vu-run2.json b/benchmarks/raw/keepalive_only-20vu-run2.json new file mode 100644 index 0000000..91e0387 --- /dev/null +++ b/benchmarks/raw/keepalive_only-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "avg": 0.0909637273464971, + "min": 0, + "med": 0, + "max": 4.2291, + "p(90)": 0.5304, + "p(95)": 0.5503 + }, + "http_reqs": { + "count": 7394, + "rate": 236.74087033999658 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 36.4691, + "p(90)": 0, + "p(95)": 0, + "avg": 0.01128441979983771 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "checks": { + "passes": 7393, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "passes": 0, + "fails": 7394, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.004452880714092508, + "min": 0, + "med": 0, + "max": 6.8381, + "p(90)": 0 + }, + "data_received": { + "count": 2501582, + "rate": 80095.577482671 + }, + "data_sent": { + "count": 3367185, + "rate": 107810.42838731152 + }, + "http_req_duration": { + "avg": 30.81360235325935, + "min": 5.3025, + "med": 28.71765, + "max": 1120.6129, + "p(90)": 46.361039999999996, + "p(95)": 53.70851999999999 + }, + "http_req_waiting": { + "p(95)": 53.54452, + "avg": 30.714568663781368, + "min": 5.3025, + "med": 28.59615, + "max": 1118.4075, + "p(90)": 46.22745 + }, + "http_req_duration{expected_response:true}": { + "min": 5.3025, + "med": 28.71765, + "max": 1120.6129, + "p(90)": 46.361039999999996, + "p(95)": 53.70851999999999, + "avg": 30.81360235325935 + }, + "iteration_duration": { + "avg": 81.19380702015398, + "min": 55.3365, + "med": 79.1803, + "max": 386.2271, + "p(90)": 96.93524000000001, + "p(95)": 104.41806 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "iterations": { + "count": 7393, + "rate": 236.70885236997495 + }, + "http_req_sending": { + "med": 0, + "max": 3.2702, + "p(90)": 0, + "p(95)": 0, + "avg": 0.00806996213145794, + "min": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7393, + "fails": 0, + "name": "status is 200" + } + } + } +} diff --git a/benchmarks/raw/keepalive_only-20vu-run2.txt b/benchmarks/raw/keepalive_only-20vu-run2.txt new file mode 100644 index 0000000..fc741c4 --- /dev/null +++ b/benchmarks/raw/keepalive_only-20vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 191 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.8s/30s + +running (0m03.0s), 20/20 VUs, 448 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.8s/30s + +running (0m04.0s), 20/20 VUs, 702 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 02.8s/30s + +running (0m05.0s), 20/20 VUs, 916 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.8s/30s + +running (0m06.0s), 20/20 VUs, 1174 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.8s/30s + +running (0m07.0s), 20/20 VUs, 1399 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 05.8s/30s + +running (0m08.0s), 20/20 VUs, 1645 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.8s/30s + +running (0m09.0s), 20/20 VUs, 1853 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.8s/30s + +running (0m10.0s), 20/20 VUs, 2105 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 08.8s/30s + +running (0m11.0s), 20/20 VUs, 2360 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.8s/30s + +running (0m12.0s), 20/20 VUs, 2631 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.8s/30s + +running (0m13.0s), 20/20 VUs, 2876 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 11.8s/30s + +running (0m14.0s), 20/20 VUs, 3098 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.8s/30s + +running (0m15.0s), 20/20 VUs, 3298 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.8s/30s + +running (0m16.0s), 20/20 VUs, 3572 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 14.8s/30s + +running (0m17.0s), 20/20 VUs, 3844 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.8s/30s + +running (0m18.0s), 20/20 VUs, 4073 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.8s/30s + +running (0m19.0s), 20/20 VUs, 4339 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 17.8s/30s + +running (0m20.0s), 20/20 VUs, 4595 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.8s/30s + +running (0m21.0s), 20/20 VUs, 4824 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.8s/30s + +running (0m22.0s), 20/20 VUs, 5047 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 20.8s/30s + +running (0m23.0s), 20/20 VUs, 5294 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.8s/30s + +running (0m24.0s), 20/20 VUs, 5543 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.8s/30s + +running (0m25.0s), 20/20 VUs, 5811 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 23.8s/30s + +running (0m26.0s), 20/20 VUs, 6070 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.8s/30s + +running (0m27.0s), 20/20 VUs, 6334 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.8s/30s + +running (0m28.0s), 20/20 VUs, 6613 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 26.8s/30s + +running (0m29.0s), 20/20 VUs, 6855 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.8s/30s + +running (0m30.0s), 20/20 VUs, 7068 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.8s/30s + +running (0m31.0s), 20/20 VUs, 7325 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7393 236.708852/s + checks_succeeded...: 100.00% 7393 out of 7393 + checks_failed......: 0.00% 0 out of 7393 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=30.81ms min=5.3ms med=28.71ms max=1.12s p(90)=46.36ms p(95)=53.7ms + { expected_response:true }...: avg=30.81ms min=5.3ms med=28.71ms max=1.12s p(90)=46.36ms p(95)=53.7ms + http_req_failed................: 0.00% 0 out of 7394 + http_reqs......................: 7394 236.74087/s + + EXECUTION + iteration_duration.............: avg=81.19ms min=55.33ms med=79.18ms max=386.22ms p(90)=96.93ms p(95)=104.41ms + iterations.....................: 7393 236.708852/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.5 MB 80 kB/s + data_sent......................: 3.4 MB 108 kB/s + + + + +running (0m31.2s), 00/20 VUs, 7393 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/keepalive_only-20vu-run3.json b/benchmarks/raw/keepalive_only-20vu-run3.json new file mode 100644 index 0000000..f3718d7 --- /dev/null +++ b/benchmarks/raw/keepalive_only-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "avg": 0.09683228220203093, + "min": 0, + "med": 0, + "max": 4.0258, + "p(90)": 0.5359700000000001, + "p(95)": 0.5514 + }, + "data_received": { + "rate": 80735.0209871122, + "count": 2529662 + }, + "iterations": { + "count": 7483, + "rate": 238.82248381268354 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_duration": { + "avg": 29.90170212453233, + "min": 6.7197, + "med": 28.4212, + "max": 1199.9495, + "p(90)": 44.644310000000004, + "p(95)": 51.67138999999999 + }, + "data_sent": { + "count": 3408225, + "rate": 108774.65720867077 + }, + "http_req_blocked": { + "med": 0, + "max": 36.0086, + "p(90)": 0, + "p(95)": 0, + "avg": 0.008392757883484765, + "min": 0 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_reqs": { + "count": 7484, + "rate": 238.85439915196093 + }, + "iteration_duration": { + "max": 334.2123, + "p(90)": 95.25764000000001, + "p(95)": 102.34552999999998, + "avg": 80.25314733395689, + "min": 56.9547, + "med": 78.851 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.0024541020844468207, + "min": 0, + "med": 0, + "max": 2.6338, + "p(90)": 0 + }, + "http_req_waiting": { + "p(90)": 44.569140000000004, + "p(95)": 51.557264999999994, + "avg": 29.798082763228212, + "min": 6.7197, + "med": 28.3137, + "max": 1197.8161 + }, + "http_req_failed": { + "passes": 0, + "fails": 7484, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_sending": { + "avg": 0.006787079102084447, + "min": 0, + "med": 0, + "max": 1.6541, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "max": 1199.9495, + "p(90)": 44.644310000000004, + "p(95)": 51.67138999999999, + "avg": 29.90170212453233, + "min": 6.7197, + "med": 28.4212 + }, + "checks": { + "passes": 7483, + "fails": 0, + "value": 1 + } + }, + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7483, + "fails": 0 + } + }, + "name": "", + "path": "" + } +} diff --git a/benchmarks/raw/keepalive_only-20vu-run3.txt b/benchmarks/raw/keepalive_only-20vu-run3.txt new file mode 100644 index 0000000..9751238 --- /dev/null +++ b/benchmarks/raw/keepalive_only-20vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 156 complete and 0 interrupted iterations +default [ 2% ] 20 VUs 00.7s/30s + +running (0m03.0s), 20/20 VUs, 387 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.7s/30s + +running (0m04.0s), 20/20 VUs, 619 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 02.7s/30s + +running (0m05.0s), 20/20 VUs, 867 complete and 0 interrupted iterations +default [ 12% ] 20 VUs 03.7s/30s + +running (0m06.0s), 20/20 VUs, 1097 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.7s/30s + +running (0m07.0s), 20/20 VUs, 1356 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 05.7s/30s + +running (0m08.0s), 20/20 VUs, 1614 complete and 0 interrupted iterations +default [ 22% ] 20 VUs 06.7s/30s + +running (0m09.0s), 20/20 VUs, 1853 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.7s/30s + +running (0m10.0s), 20/20 VUs, 2097 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 08.7s/30s + +running (0m11.0s), 20/20 VUs, 2356 complete and 0 interrupted iterations +default [ 32% ] 20 VUs 09.7s/30s + +running (0m12.0s), 20/20 VUs, 2619 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.7s/30s + +running (0m13.0s), 20/20 VUs, 2900 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 11.7s/30s + +running (0m14.0s), 20/20 VUs, 3171 complete and 0 interrupted iterations +default [ 42% ] 20 VUs 12.7s/30s + +running (0m15.0s), 20/20 VUs, 3426 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.7s/30s + +running (0m16.0s), 20/20 VUs, 3669 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 14.7s/30s + +running (0m17.0s), 20/20 VUs, 3931 complete and 0 interrupted iterations +default [ 52% ] 20 VUs 15.7s/30s + +running (0m18.0s), 20/20 VUs, 4143 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.7s/30s + +running (0m19.0s), 20/20 VUs, 4385 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 17.7s/30s + +running (0m20.0s), 20/20 VUs, 4653 complete and 0 interrupted iterations +default [ 62% ] 20 VUs 18.7s/30s + +running (0m21.0s), 20/20 VUs, 4914 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.7s/30s + +running (0m22.0s), 20/20 VUs, 5187 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 20.7s/30s + +running (0m23.0s), 20/20 VUs, 5472 complete and 0 interrupted iterations +default [ 72% ] 20 VUs 21.7s/30s + +running (0m24.0s), 20/20 VUs, 5739 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.7s/30s + +running (0m25.0s), 20/20 VUs, 5932 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 23.7s/30s + +running (0m26.0s), 20/20 VUs, 6165 complete and 0 interrupted iterations +default [ 82% ] 20 VUs 24.7s/30s + +running (0m27.0s), 20/20 VUs, 6429 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.7s/30s + +running (0m28.0s), 20/20 VUs, 6676 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 26.7s/30s + +running (0m29.0s), 20/20 VUs, 6935 complete and 0 interrupted iterations +default [ 92% ] 20 VUs 27.7s/30s + +running (0m30.0s), 20/20 VUs, 7197 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.7s/30s + +running (0m31.0s), 20/20 VUs, 7410 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7483 238.822484/s + checks_succeeded...: 100.00% 7483 out of 7483 + checks_failed......: 0.00% 0 out of 7483 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=29.9ms min=6.71ms med=28.42ms max=1.19s p(90)=44.64ms p(95)=51.67ms + { expected_response:true }...: avg=29.9ms min=6.71ms med=28.42ms max=1.19s p(90)=44.64ms p(95)=51.67ms + http_req_failed................: 0.00% 0 out of 7484 + http_reqs......................: 7484 238.854399/s + + EXECUTION + iteration_duration.............: avg=80.25ms min=56.95ms med=78.85ms max=334.21ms p(90)=95.25ms p(95)=102.34ms + iterations.....................: 7483 238.822484/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.5 MB 81 kB/s + data_sent......................: 3.4 MB 109 kB/s + + + + +running (0m31.3s), 00/20 VUs, 7483 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/keepalive_only-20vu-warmup.json b/benchmarks/raw/keepalive_only-20vu-warmup.json new file mode 100644 index 0000000..7856cbb --- /dev/null +++ b/benchmarks/raw/keepalive_only-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6437, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + } + }, + "metrics": { + "checks": { + "passes": 6437, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 6438, + "rate": 207.6894298335762 + }, + "http_req_receiving": { + "max": 9.814, + "p(90)": 0.5316, + "p(95)": 0.5509149999999999, + "avg": 0.09172373407890658, + "min": 0, + "med": 0 + }, + "data_received": { + "count": 2203310, + "rate": 71078.62653721914 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.009716356011183595, + "min": 0, + "med": 0, + "max": 27.493 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_failed": { + "passes": 0, + "fails": 6438, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "data_sent": { + "count": 2931249, + "rate": 94561.88777729736 + }, + "vus": { + "min": 1, + "max": 20, + "value": 1 + }, + "http_req_waiting": { + "avg": 42.765306042249364, + "min": 1.0875, + "med": 30.47805, + "max": 954.8297, + "p(90)": 56.552920000000015, + "p(95)": 89.03357999999984 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 89.508935, + "avg": 42.863107300404124, + "min": 1.0875, + "med": 30.5678, + "max": 954.8297, + "p(90)": 56.64781000000002 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.0025025163094128606, + "min": 0, + "med": 0, + "max": 2.3585, + "p(90)": 0 + }, + "http_req_duration": { + "p(95)": 89.508935, + "avg": 42.863107300404124, + "min": 1.0875, + "med": 30.5678, + "max": 954.8297, + "p(90)": 56.64781000000002 + }, + "iterations": { + "count": 6437, + "rate": 207.65716990349955 + }, + "iteration_duration": { + "max": 1005.4129, + "p(90)": 107.31426, + "p(95)": 139.92012, + "avg": 93.2239011962098, + "min": 51.5697, + "med": 80.9672 + }, + "http_req_sending": { + "med": 0, + "max": 1.4755, + "p(90)": 0, + "p(95)": 0, + "avg": 0.006077524075799937, + "min": 0 + } + } +} diff --git a/benchmarks/raw/keepalive_only-20vu-warmup.txt b/benchmarks/raw/keepalive_only-20vu-warmup.txt new file mode 100644 index 0000000..120e731 --- /dev/null +++ b/benchmarks/raw/keepalive_only-20vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 20 VUs 00.1s/30s + +running (0m02.0s), 20/20 VUs, 128 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.1s/30s + +running (0m03.0s), 20/20 VUs, 318 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.1s/30s + +running (0m04.0s), 20/20 VUs, 384 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.1s/30s + +running (0m05.0s), 20/20 VUs, 411 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.1s/30s + +running (0m06.0s), 20/20 VUs, 487 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.1s/30s + +running (0m07.0s), 20/20 VUs, 580 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.1s/30s + +running (0m08.0s), 20/20 VUs, 682 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.1s/30s + +running (0m09.0s), 20/20 VUs, 891 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.1s/30s + +running (0m10.0s), 20/20 VUs, 1128 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.1s/30s + +running (0m11.0s), 20/20 VUs, 1367 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.1s/30s + +running (0m12.0s), 20/20 VUs, 1590 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.1s/30s + +running (0m13.0s), 20/20 VUs, 1836 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.1s/30s + +running (0m14.0s), 20/20 VUs, 2084 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.1s/30s + +running (0m15.0s), 20/20 VUs, 2317 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.1s/30s + +running (0m16.0s), 20/20 VUs, 2550 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.1s/30s + +running (0m17.0s), 20/20 VUs, 2822 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.1s/30s + +running (0m18.0s), 20/20 VUs, 3076 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.1s/30s + +running (0m19.0s), 20/20 VUs, 3337 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.1s/30s + +running (0m20.0s), 20/20 VUs, 3607 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.1s/30s + +running (0m21.0s), 20/20 VUs, 3870 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.1s/30s + +running (0m22.0s), 20/20 VUs, 4127 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.1s/30s + +running (0m23.0s), 20/20 VUs, 4374 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.1s/30s + +running (0m24.0s), 20/20 VUs, 4620 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.1s/30s + +running (0m25.0s), 20/20 VUs, 4876 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.1s/30s + +running (0m26.0s), 20/20 VUs, 5154 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.1s/30s + +running (0m27.0s), 20/20 VUs, 5433 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.1s/30s + +running (0m28.0s), 20/20 VUs, 5704 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.1s/30s + +running (0m29.0s), 20/20 VUs, 5955 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.1s/30s + +running (0m30.0s), 20/20 VUs, 6208 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.1s/30s + +running (0m31.0s), 01/20 VUs, 6436 complete and 0 interrupted iterations +default โ†“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6437 207.65717/s + checks_succeeded...: 100.00% 6437 out of 6437 + checks_failed......: 0.00% 0 out of 6437 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=42.86ms min=1.08ms med=30.56ms max=954.82ms p(90)=56.64ms p(95)=89.5ms + { expected_response:true }...: avg=42.86ms min=1.08ms med=30.56ms max=954.82ms p(90)=56.64ms p(95)=89.5ms + http_req_failed................: 0.00% 0 out of 6438 + http_reqs......................: 6438 207.68943/s + + EXECUTION + iteration_duration.............: avg=93.22ms min=51.56ms med=80.96ms max=1s p(90)=107.31ms p(95)=139.92ms + iterations.....................: 6437 207.65717/s + vus............................: 1 min=1 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.2 MB 71 kB/s + data_sent......................: 2.9 MB 95 kB/s + + + + +running (0m31.0s), 00/20 VUs, 6437 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/keepalive_only-50vu-run1.json b/benchmarks/raw/keepalive_only-50vu-run1.json new file mode 100644 index 0000000..43dc74f --- /dev/null +++ b/benchmarks/raw/keepalive_only-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 9921 + } + } + }, + "metrics": { + "http_req_blocked": { + "med": 0, + "max": 38.0913, + "p(90)": 0, + "p(95)": 0, + "avg": 0.018783551703285623, + "min": 0 + }, + "data_sent": { + "count": 4513653, + "rate": 143402.79253579947 + }, + "http_reqs": { + "count": 9922, + "rate": 315.230813609332 + }, + "http_req_duration": { + "avg": 100.76908503325927, + "min": 33.8083, + "med": 95.04055, + "max": 1282.4714, + "p(90)": 133.51887999999997, + "p(95)": 153.26894499999995 + }, + "http_req_connecting": { + "med": 0, + "max": 17.539, + "p(90)": 0, + "p(95)": 0, + "avg": 0.011311570247933885, + "min": 0 + }, + "iterations": { + "count": 9921, + "rate": 315.19904271499524 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_duration{expected_response:true}": { + "max": 1282.4714, + "p(90)": 133.51887999999997, + "p(95)": 153.26894499999995, + "avg": 100.76908503325927, + "min": 33.8083, + "med": 95.04055 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 18.1834, + "p(90)": 0, + "p(95)": 0, + "avg": 0.009197298931667009 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_req_waiting": { + "p(90)": 133.42292999999998, + "p(95)": 152.97349999999997, + "avg": 100.67250815359807, + "min": 33.4967, + "med": 94.92805, + "max": 1278.3936 + }, + "http_req_receiving": { + "p(90)": 0.5283, + "p(95)": 0.5491949999999999, + "avg": 0.0873795807296916, + "min": 0, + "med": 0, + "max": 4.0778 + }, + "data_received": { + "rate": 104536.34551233926, + "count": 3290318 + }, + "iteration_duration": { + "p(90)": 184.0196, + "p(95)": 203.5988, + "avg": 151.15244290898085, + "min": 84.095, + "med": 145.4855, + "max": 739.3887 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_failed": { + "passes": 0, + "fails": 9922, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "checks": { + "fails": 0, + "passes": 9921, + "value": 1 + } + } +} diff --git a/benchmarks/raw/keepalive_only-50vu-run1.txt b/benchmarks/raw/keepalive_only-50vu-run1.txt new file mode 100644 index 0000000..1456bba --- /dev/null +++ b/benchmarks/raw/keepalive_only-50vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 137 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.6s/30s + +running (0m03.0s), 50/50 VUs, 454 complete and 0 interrupted iterations +default [ 5% ] 50 VUs 01.6s/30s + +running (0m04.0s), 50/50 VUs, 796 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.6s/30s + +running (0m05.0s), 50/50 VUs, 1142 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.6s/30s + +running (0m06.0s), 50/50 VUs, 1455 complete and 0 interrupted iterations +default [ 15% ] 50 VUs 04.6s/30s + +running (0m07.0s), 50/50 VUs, 1778 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.6s/30s + +running (0m08.0s), 50/50 VUs, 2093 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.6s/30s + +running (0m09.0s), 50/50 VUs, 2450 complete and 0 interrupted iterations +default [ 25% ] 50 VUs 07.6s/30s + +running (0m10.0s), 50/50 VUs, 2814 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.6s/30s + +running (0m11.0s), 50/50 VUs, 3129 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.6s/30s + +running (0m12.0s), 50/50 VUs, 3436 complete and 0 interrupted iterations +default [ 35% ] 50 VUs 10.6s/30s + +running (0m13.0s), 50/50 VUs, 3798 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.6s/30s + +running (0m14.0s), 50/50 VUs, 4109 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.6s/30s + +running (0m15.0s), 50/50 VUs, 4444 complete and 0 interrupted iterations +default [ 45% ] 50 VUs 13.6s/30s + +running (0m16.0s), 50/50 VUs, 4789 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.6s/30s + +running (0m17.0s), 50/50 VUs, 5198 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.6s/30s + +running (0m18.0s), 50/50 VUs, 5577 complete and 0 interrupted iterations +default [ 55% ] 50 VUs 16.6s/30s + +running (0m19.0s), 50/50 VUs, 5962 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.6s/30s + +running (0m20.0s), 50/50 VUs, 6345 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.6s/30s + +running (0m21.0s), 50/50 VUs, 6730 complete and 0 interrupted iterations +default [ 65% ] 50 VUs 19.6s/30s + +running (0m22.0s), 50/50 VUs, 7021 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.6s/30s + +running (0m23.0s), 50/50 VUs, 7291 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.6s/30s + +running (0m24.0s), 50/50 VUs, 7517 complete and 0 interrupted iterations +default [ 75% ] 50 VUs 22.6s/30s + +running (0m25.0s), 50/50 VUs, 7883 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.6s/30s + +running (0m26.0s), 50/50 VUs, 8142 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.6s/30s + +running (0m27.0s), 50/50 VUs, 8403 complete and 0 interrupted iterations +default [ 85% ] 50 VUs 25.6s/30s + +running (0m28.0s), 50/50 VUs, 8780 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.6s/30s + +running (0m29.0s), 50/50 VUs, 9079 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.6s/30s + +running (0m30.0s), 50/50 VUs, 9398 complete and 0 interrupted iterations +default [ 95% ] 50 VUs 28.6s/30s + +running (0m31.0s), 50/50 VUs, 9747 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9921 315.199043/s + checks_succeeded...: 100.00% 9921 out of 9921 + checks_failed......: 0.00% 0 out of 9921 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=100.76ms min=33.8ms med=95.04ms max=1.28s p(90)=133.51ms p(95)=153.26ms + { expected_response:true }...: avg=100.76ms min=33.8ms med=95.04ms max=1.28s p(90)=133.51ms p(95)=153.26ms + http_req_failed................: 0.00% 0 out of 9922 + http_reqs......................: 9922 315.230814/s + + EXECUTION + iteration_duration.............: avg=151.15ms min=84.09ms med=145.48ms max=739.38ms p(90)=184.01ms p(95)=203.59ms + iterations.....................: 9921 315.199043/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.3 MB 105 kB/s + data_sent......................: 4.5 MB 143 kB/s + + + + +running (0m31.5s), 00/50 VUs, 9921 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/keepalive_only-50vu-run2.json b/benchmarks/raw/keepalive_only-50vu-run2.json new file mode 100644 index 0000000..6a983a8 --- /dev/null +++ b/benchmarks/raw/keepalive_only-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "iterations": { + "count": 10170, + "rate": 325.91612539219454 + }, + "checks": { + "fails": 0, + "passes": 10170, + "value": 1 + }, + "http_req_blocked": { + "med": 0, + "max": 33.8763, + "p(90)": 0, + "p(95)": 0, + "avg": 0.01637689509389441, + "min": 0 + }, + "data_received": { + "count": 3368006, + "rate": 107933.87077853133 + }, + "iteration_duration": { + "avg": 147.55870038348104, + "min": 77.4896, + "med": 144.0695, + "max": 722.3455, + "p(90)": 175.01444999999998, + "p(95)": 186.13051 + }, + "http_reqs": { + "count": 10171, + "rate": 325.9481722088506 + }, + "http_req_duration{expected_response:true}": { + "avg": 97.1398067250024, + "min": 26.4079, + "med": 93.5978, + "max": 1053.4511, + "p(90)": 124.5022, + "p(95)": 135.61110000000002 + }, + "http_req_sending": { + "med": 0, + "max": 2.5814, + "p(90)": 0, + "p(95)": 0, + "avg": 0.008311129682430444, + "min": 0 + }, + "http_req_waiting": { + "avg": 97.03831305672999, + "min": 26.4079, + "med": 93.5115, + "max": 1051.8249, + "p(90)": 124.3045, + "p(95)": 135.4667 + }, + "http_req_failed": { + "passes": 0, + "fails": 10171, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_connecting": { + "avg": 0.009289686363189461, + "min": 0, + "med": 0, + "max": 12.6712, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "max": 1053.4511, + "p(90)": 124.5022, + "p(95)": 135.61110000000002, + "avg": 97.1398067250024, + "min": 26.4079, + "med": 93.5978 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_receiving": { + "p(95)": 0.55045, + "avg": 0.09318253859010929, + "min": 0, + "med": 0, + "max": 3.4938, + "p(90)": 0.532 + }, + "data_sent": { + "count": 4627197, + "rate": 148286.93389050014 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10170, + "fails": 0 + } + } + } +} diff --git a/benchmarks/raw/keepalive_only-50vu-run2.txt b/benchmarks/raw/keepalive_only-50vu-run2.txt new file mode 100644 index 0000000..20bdc32 --- /dev/null +++ b/benchmarks/raw/keepalive_only-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 194 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.9s/30s + +running (0m03.0s), 50/50 VUs, 497 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.9s/30s + +running (0m04.0s), 50/50 VUs, 838 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 02.9s/30s + +running (0m05.0s), 50/50 VUs, 1125 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.9s/30s + +running (0m06.0s), 50/50 VUs, 1461 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.9s/30s + +running (0m07.0s), 50/50 VUs, 1811 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m08.0s), 50/50 VUs, 2153 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.9s/30s + +running (0m09.0s), 50/50 VUs, 2518 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m10.0s), 50/50 VUs, 2875 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m11.0s), 50/50 VUs, 3230 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.9s/30s + +running (0m12.0s), 50/50 VUs, 3595 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.9s/30s + +running (0m13.0s), 50/50 VUs, 3929 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 11.9s/30s + +running (0m14.0s), 50/50 VUs, 4247 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.9s/30s + +running (0m15.0s), 50/50 VUs, 4633 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.9s/30s + +running (0m16.0s), 50/50 VUs, 4996 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 14.9s/30s + +running (0m17.0s), 50/50 VUs, 5371 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.9s/30s + +running (0m18.0s), 50/50 VUs, 5729 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m19.0s), 50/50 VUs, 6103 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 17.9s/30s + +running (0m20.0s), 50/50 VUs, 6469 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.9s/30s + +running (0m21.0s), 50/50 VUs, 6797 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m22.0s), 50/50 VUs, 7070 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 20.9s/30s + +running (0m23.0s), 50/50 VUs, 7427 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.9s/30s + +running (0m24.0s), 50/50 VUs, 7750 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.9s/30s + +running (0m25.0s), 50/50 VUs, 8106 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 23.9s/30s + +running (0m26.0s), 50/50 VUs, 8476 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.9s/30s + +running (0m27.0s), 50/50 VUs, 8818 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m28.0s), 50/50 VUs, 9132 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m29.0s), 50/50 VUs, 9448 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m30.0s), 50/50 VUs, 9736 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.9s/30s + +running (0m31.0s), 50/50 VUs, 10083 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10170 325.916125/s + checks_succeeded...: 100.00% 10170 out of 10170 + checks_failed......: 0.00% 0 out of 10170 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=97.13ms min=26.4ms med=93.59ms max=1.05s p(90)=124.5ms p(95)=135.61ms + { expected_response:true }...: avg=97.13ms min=26.4ms med=93.59ms max=1.05s p(90)=124.5ms p(95)=135.61ms + http_req_failed................: 0.00% 0 out of 10171 + http_reqs......................: 10171 325.948172/s + + EXECUTION + iteration_duration.............: avg=147.55ms min=77.48ms med=144.06ms max=722.34ms p(90)=175.01ms p(95)=186.13ms + iterations.....................: 10170 325.916125/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.4 MB 108 kB/s + data_sent......................: 4.6 MB 148 kB/s + + + + +running (0m31.2s), 00/50 VUs, 10170 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/keepalive_only-50vu-run3.json b/benchmarks/raw/keepalive_only-50vu-run3.json new file mode 100644 index 0000000..ddf637d --- /dev/null +++ b/benchmarks/raw/keepalive_only-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_duration{expected_response:true}": { + "min": 19.1206, + "med": 95.71494999999999, + "max": 1192.4139, + "p(90)": 140.16470000000004, + "p(95)": 161.6418, + "avg": 104.46368653250752 + }, + "http_req_blocked": { + "avg": 0.015469927760577911, + "min": 0, + "med": 0, + "max": 28.9654, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "med": 0, + "max": 8.53, + "p(90)": 0, + "p(95)": 0, + "avg": 0.011296088751289998, + "min": 0 + }, + "http_req_waiting": { + "med": 95.67135, + "max": 1190.842, + "p(90)": 140.11672000000002, + "p(95)": 161.6407, + "avg": 104.36207892672842, + "min": 19.1206 + }, + "data_sent": { + "rate": 140708.71892105901, + "count": 4407861 + }, + "iterations": { + "count": 9689, + "rate": 309.2944123297311 + }, + "checks": { + "fails": 0, + "passes": 9689, + "value": 1 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "data_received": { + "count": 3217934, + "rate": 102723.60464917545 + }, + "iteration_duration": { + "avg": 154.84737008979275, + "min": 69.521, + "med": 146.293, + "max": 716.3752, + "p(90)": 190.71112, + "p(95)": 212.1842 + }, + "http_req_duration": { + "p(95)": 161.6418, + "avg": 104.46368653250752, + "min": 19.1206, + "med": 95.71494999999999, + "max": 1192.4139, + "p(90)": 140.16470000000004 + }, + "http_reqs": { + "count": 9690, + "rate": 309.3263345520791 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_connecting": { + "max": 5.9907, + "p(90)": 0, + "p(95)": 0, + "avg": 0.0071042930856553155, + "min": 0, + "med": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 9690, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_receiving": { + "avg": 0.0903115170278638, + "min": 0, + "med": 0, + "max": 4.4977, + "p(90)": 0.5326, + "p(95)": 0.5487 + } + }, + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 9689, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "", + "path": "" + } +} diff --git a/benchmarks/raw/keepalive_only-50vu-run3.txt b/benchmarks/raw/keepalive_only-50vu-run3.txt new file mode 100644 index 0000000..f4ca5e1 --- /dev/null +++ b/benchmarks/raw/keepalive_only-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 176 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.7s/30s + +running (0m03.0s), 50/50 VUs, 516 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.7s/30s + +running (0m04.0s), 50/50 VUs, 818 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.7s/30s + +running (0m05.0s), 50/50 VUs, 1128 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.7s/30s + +running (0m06.0s), 50/50 VUs, 1465 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.7s/30s + +running (0m07.0s), 50/50 VUs, 1796 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.7s/30s + +running (0m08.0s), 50/50 VUs, 2163 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.7s/30s + +running (0m09.0s), 50/50 VUs, 2521 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.7s/30s + +running (0m10.0s), 50/50 VUs, 2852 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.7s/30s + +running (0m11.0s), 50/50 VUs, 3227 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.7s/30s + +running (0m12.0s), 50/50 VUs, 3528 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.7s/30s + +running (0m13.0s), 50/50 VUs, 3824 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.7s/30s + +running (0m14.0s), 50/50 VUs, 4174 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.7s/30s + +running (0m15.0s), 50/50 VUs, 4526 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.7s/30s + +running (0m16.0s), 50/50 VUs, 4878 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.7s/30s + +running (0m17.0s), 50/50 VUs, 5250 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.7s/30s + +running (0m18.0s), 50/50 VUs, 5594 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.7s/30s + +running (0m19.0s), 50/50 VUs, 5986 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.7s/30s + +running (0m20.0s), 50/50 VUs, 6309 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.7s/30s + +running (0m21.0s), 50/50 VUs, 6600 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.7s/30s + +running (0m22.0s), 50/50 VUs, 6943 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.7s/30s + +running (0m23.0s), 50/50 VUs, 7290 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.7s/30s + +running (0m24.0s), 50/50 VUs, 7631 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.7s/30s + +running (0m25.0s), 50/50 VUs, 7771 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.7s/30s + +running (0m26.0s), 50/50 VUs, 8000 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.7s/30s + +running (0m27.0s), 50/50 VUs, 8258 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.7s/30s + +running (0m28.0s), 50/50 VUs, 8508 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.7s/30s + +running (0m29.0s), 50/50 VUs, 8825 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.7s/30s + +running (0m30.0s), 50/50 VUs, 9160 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.7s/30s + +running (0m31.0s), 50/50 VUs, 9551 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9689 309.294412/s + checks_succeeded...: 100.00% 9689 out of 9689 + checks_failed......: 0.00% 0 out of 9689 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=104.46ms min=19.12ms med=95.71ms max=1.19s p(90)=140.16ms p(95)=161.64ms + { expected_response:true }...: avg=104.46ms min=19.12ms med=95.71ms max=1.19s p(90)=140.16ms p(95)=161.64ms + http_req_failed................: 0.00% 0 out of 9690 + http_reqs......................: 9690 309.326335/s + + EXECUTION + iteration_duration.............: avg=154.84ms min=69.52ms med=146.29ms max=716.37ms p(90)=190.71ms p(95)=212.18ms + iterations.....................: 9689 309.294412/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.2 MB 103 kB/s + data_sent......................: 4.4 MB 141 kB/s + + + + +running (0m31.3s), 00/50 VUs, 9689 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/keepalive_only-50vu-warmup.json b/benchmarks/raw/keepalive_only-50vu-warmup.json new file mode 100644 index 0000000..2ea4e85 --- /dev/null +++ b/benchmarks/raw/keepalive_only-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_sending": { + "p(95)": 0, + "avg": 0.010962137539184952, + "min": 0, + "med": 0, + "max": 15.1128, + "p(90)": 0 + }, + "http_reqs": { + "count": 10208, + "rate": 328.1863945944872 + }, + "data_received": { + "count": 3379550, + "rate": 108652.26585538784 + }, + "iteration_duration": { + "p(90)": 178.31181999999998, + "p(95)": 191.44736999999995, + "avg": 146.9796611541103, + "min": 81.6556, + "med": 142.6019, + "max": 550.3901 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "fails": 0, + "passes": 10207, + "value": 1 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 140.918875, + "avg": 96.5708626959247, + "min": 31.2364, + "med": 92.1397, + "max": 969.4196, + "p(90)": 127.76078000000001 + }, + "http_req_waiting": { + "avg": 96.46646211794658, + "min": 30.7028, + "med": 92.07095000000001, + "max": 966.4229, + "p(90)": 127.53714000000002, + "p(95)": 140.83528999999993 + }, + "http_req_duration": { + "max": 969.4196, + "p(90)": 127.76078000000001, + "p(95)": 140.918875, + "avg": 96.5708626959247, + "min": 31.2364, + "med": 92.1397 + }, + "data_sent": { + "count": 4644069, + "rate": 149306.45193554324 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_blocked": { + "med": 0, + "max": 26.2086, + "p(90)": 0, + "p(95)": 0, + "avg": 0.014033463949843264, + "min": 0 + }, + "iterations": { + "count": 10207, + "rate": 328.15424467338664 + }, + "http_req_receiving": { + "avg": 0.09343844043887159, + "min": 0, + "med": 0, + "max": 5.2649, + "p(90)": 0.5319, + "p(95)": 0.55163 + }, + "http_req_failed": { + "passes": 0, + "fails": 10208, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "avg": 0.006391085423197494, + "min": 0, + "med": 0, + "max": 7.0581, + "p(90)": 0, + "p(95)": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10207, + "fails": 0, + "name": "status is 200" + } + } + } +} diff --git a/benchmarks/raw/keepalive_only-50vu-warmup.txt b/benchmarks/raw/keepalive_only-50vu-warmup.txt new file mode 100644 index 0000000..c00412f --- /dev/null +++ b/benchmarks/raw/keepalive_only-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 205 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 01.0s/30s + +running (0m03.0s), 50/50 VUs, 533 complete and 0 interrupted iterations +default [ 7% ] 50 VUs 02.0s/30s + +running (0m04.0s), 50/50 VUs, 876 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.0s/30s + +running (0m05.0s), 50/50 VUs, 1215 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 04.0s/30s + +running (0m06.0s), 50/50 VUs, 1517 complete and 0 interrupted iterations +default [ 17% ] 50 VUs 05.0s/30s + +running (0m07.0s), 50/50 VUs, 1836 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 06.0s/30s + +running (0m08.0s), 50/50 VUs, 2182 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 07.0s/30s + +running (0m09.0s), 50/50 VUs, 2536 complete and 0 interrupted iterations +default [ 27% ] 50 VUs 08.0s/30s + +running (0m10.0s), 50/50 VUs, 2913 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 09.0s/30s + +running (0m11.0s), 50/50 VUs, 3233 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 10.0s/30s + +running (0m12.0s), 50/50 VUs, 3599 complete and 0 interrupted iterations +default [ 37% ] 50 VUs 11.0s/30s + +running (0m13.0s), 50/50 VUs, 3914 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 12.0s/30s + +running (0m14.0s), 50/50 VUs, 4221 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 13.0s/30s + +running (0m15.0s), 50/50 VUs, 4567 complete and 0 interrupted iterations +default [ 47% ] 50 VUs 14.0s/30s + +running (0m16.0s), 50/50 VUs, 4922 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 15.0s/30s + +running (0m17.0s), 50/50 VUs, 5272 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 16.0s/30s + +running (0m18.0s), 50/50 VUs, 5638 complete and 0 interrupted iterations +default [ 57% ] 50 VUs 17.0s/30s + +running (0m19.0s), 50/50 VUs, 5975 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 18.0s/30s + +running (0m20.0s), 50/50 VUs, 6358 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 19.0s/30s + +running (0m21.0s), 50/50 VUs, 6687 complete and 0 interrupted iterations +default [ 67% ] 50 VUs 20.0s/30s + +running (0m22.0s), 50/50 VUs, 6988 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 21.0s/30s + +running (0m23.0s), 50/50 VUs, 7317 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 22.0s/30s + +running (0m24.0s), 50/50 VUs, 7653 complete and 0 interrupted iterations +default [ 77% ] 50 VUs 23.0s/30s + +running (0m25.0s), 50/50 VUs, 8011 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 24.0s/30s + +running (0m26.0s), 50/50 VUs, 8414 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 25.0s/30s + +running (0m27.0s), 50/50 VUs, 8787 complete and 0 interrupted iterations +default [ 87% ] 50 VUs 26.0s/30s + +running (0m28.0s), 50/50 VUs, 9159 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 27.0s/30s + +running (0m29.0s), 50/50 VUs, 9541 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 28.0s/30s + +running (0m30.0s), 50/50 VUs, 9844 complete and 0 interrupted iterations +default [ 97% ] 50 VUs 29.0s/30s + +running (0m31.0s), 50/50 VUs, 10147 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10207 328.154245/s + checks_succeeded...: 100.00% 10207 out of 10207 + checks_failed......: 0.00% 0 out of 10207 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=96.57ms min=31.23ms med=92.13ms max=969.41ms p(90)=127.76ms p(95)=140.91ms + { expected_response:true }...: avg=96.57ms min=31.23ms med=92.13ms max=969.41ms p(90)=127.76ms p(95)=140.91ms + http_req_failed................: 0.00% 0 out of 10208 + http_reqs......................: 10208 328.186395/s + + EXECUTION + iteration_duration.............: avg=146.97ms min=81.65ms med=142.6ms max=550.39ms p(90)=178.31ms p(95)=191.44ms + iterations.....................: 10207 328.154245/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.4 MB 109 kB/s + data_sent......................: 4.6 MB 149 kB/s + + + + +running (0m31.1s), 00/50 VUs, 10207 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-100vu-run1.json b/benchmarks/raw/pool_keepalive-100vu-run1.json new file mode 100644 index 0000000..cfee03e --- /dev/null +++ b/benchmarks/raw/pool_keepalive-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 9843, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_sending": { + "avg": 0.03539128403088175, + "min": 0, + "med": 0, + "max": 60.2258, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 9844, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "iteration_duration": { + "min": 87.2942, + "med": 263.2068, + "max": 4122.5187, + "p(90)": 459.6805600000002, + "p(95)": 491.9374, + "avg": 304.7085582749171 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_duration": { + "p(90)": 409.4268, + "p(95)": 441.407915, + "avg": 254.16448532100745, + "min": 36.7621, + "med": 212.65570000000002, + "max": 4071.8835 + }, + "http_req_receiving": { + "max": 81.9738, + "p(90)": 0.5306, + "p(95)": 0.5474, + "avg": 0.10634719626168218, + "min": 0, + "med": 0 + }, + "data_received": { + "count": 3265982, + "rate": 104344.76087499487 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "vus_max": { + "max": 100, + "value": 100, + "min": 100 + }, + "http_req_duration{expected_response:true}": { + "avg": 254.16448532100745, + "min": 36.7621, + "med": 212.65570000000002, + "max": 4071.8835, + "p(90)": 409.4268, + "p(95)": 441.407915 + }, + "iterations": { + "count": 9843, + "rate": 314.473711518488 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 48.0391, + "p(90)": 0, + "p(95)": 0, + "avg": 0.06500345388053633 + }, + "checks": { + "passes": 9843, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 9844, + "rate": 314.50566048846855 + }, + "data_sent": { + "count": 4468255, + "rate": 142756.14486041266 + }, + "http_req_waiting": { + "min": 36.7621, + "med": 212.58795, + "max": 4071.1832, + "p(90)": 409.3632900000001, + "p(95)": 441.290575, + "avg": 254.02274684071475 + }, + "http_req_blocked": { + "avg": 0.1486901869158878, + "min": 0, + "med": 0, + "max": 92.1985, + "p(90)": 0, + "p(95)": 0 + } + } +} diff --git a/benchmarks/raw/pool_keepalive-100vu-run1.txt b/benchmarks/raw/pool_keepalive-100vu-run1.txt new file mode 100644 index 0000000..5977008 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-100vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 170 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.8s/30s + +running (0m03.0s), 100/100 VUs, 431 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.8s/30s + +running (0m04.0s), 100/100 VUs, 772 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.8s/30s + +running (0m05.0s), 100/100 VUs, 1116 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.8s/30s + +running (0m06.0s), 100/100 VUs, 1466 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.8s/30s + +running (0m07.0s), 100/100 VUs, 1759 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.8s/30s + +running (0m08.0s), 100/100 VUs, 2078 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.8s/30s + +running (0m09.0s), 100/100 VUs, 2392 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.8s/30s + +running (0m10.0s), 100/100 VUs, 2700 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.8s/30s + +running (0m11.0s), 100/100 VUs, 3000 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.8s/30s + +running (0m12.0s), 100/100 VUs, 3309 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.8s/30s + +running (0m13.0s), 100/100 VUs, 3668 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.8s/30s + +running (0m14.0s), 100/100 VUs, 3987 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.8s/30s + +running (0m15.0s), 100/100 VUs, 4322 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.8s/30s + +running (0m16.0s), 100/100 VUs, 4707 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.8s/30s + +running (0m17.0s), 100/100 VUs, 5041 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.8s/30s + +running (0m18.0s), 100/100 VUs, 5381 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.8s/30s + +running (0m19.0s), 100/100 VUs, 5631 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.8s/30s + +running (0m20.0s), 100/100 VUs, 5969 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.8s/30s + +running (0m21.0s), 100/100 VUs, 6358 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.8s/30s + +running (0m22.0s), 100/100 VUs, 6711 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.8s/30s + +running (0m23.0s), 100/100 VUs, 7040 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.8s/30s + +running (0m24.0s), 100/100 VUs, 7363 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.8s/30s + +running (0m25.0s), 100/100 VUs, 7669 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.8s/30s + +running (0m26.0s), 100/100 VUs, 7974 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.8s/30s + +running (0m27.0s), 100/100 VUs, 8283 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.8s/30s + +running (0m28.0s), 100/100 VUs, 8598 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.8s/30s + +running (0m29.0s), 100/100 VUs, 8976 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.8s/30s + +running (0m30.0s), 100/100 VUs, 9359 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.8s/30s + +running (0m31.0s), 100/100 VUs, 9672 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9843 314.473712/s + checks_succeeded...: 100.00% 9843 out of 9843 + checks_failed......: 0.00% 0 out of 9843 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=254.16ms min=36.76ms med=212.65ms max=4.07s p(90)=409.42ms p(95)=441.4ms + { expected_response:true }...: avg=254.16ms min=36.76ms med=212.65ms max=4.07s p(90)=409.42ms p(95)=441.4ms + http_req_failed................: 0.00% 0 out of 9844 + http_reqs......................: 9844 314.50566/s + + EXECUTION + iteration_duration.............: avg=304.7ms min=87.29ms med=263.2ms max=4.12s p(90)=459.68ms p(95)=491.93ms + iterations.....................: 9843 314.473712/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.3 MB 104 kB/s + data_sent......................: 4.5 MB 143 kB/s + + + + +running (0m31.3s), 000/100 VUs, 9843 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-100vu-run2.json b/benchmarks/raw/pool_keepalive-100vu-run2.json new file mode 100644 index 0000000..a386592 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10707, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + }, + "metrics": { + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 46.0995, + "p(90)": 0, + "p(95)": 0, + "avg": 0.02589632984684349 + }, + "checks": { + "passes": 10707, + "fails": 0, + "value": 1 + }, + "data_sent": { + "rate": 154289.34677764558, + "count": 4862029 + }, + "data_received": { + "count": 3535550, + "rate": 112195.48464225631 + }, + "http_req_duration": { + "avg": 230.2429401849086, + "min": 18.5356, + "med": 218.26505, + "max": 3969.4694, + "p(90)": 313.13914, + "p(95)": 360.79171499999995 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_sending": { + "avg": 0.015932900635039226, + "min": 0, + "med": 0, + "max": 35.2863, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "p(95)": 411.4501099999997, + "avg": 280.6626013075561, + "min": 68.615, + "med": 268.6673, + "max": 4022.1821, + "p(90)": 363.58943999999997 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_reqs": { + "count": 10708, + "rate": 339.8026472682555 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 313.13914, + "p(95)": 360.79171499999995, + "avg": 230.2429401849086, + "min": 18.5356, + "med": 218.26505, + "max": 3969.4694 + }, + "http_req_receiving": { + "avg": 0.07985354874859923, + "min": 0, + "med": 0, + "max": 3.3667, + "p(90)": 0.5295, + "p(95)": 0.547 + }, + "iterations": { + "count": 10707, + "rate": 339.77091373750574 + }, + "http_req_failed": { + "passes": 0, + "fails": 10708, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "avg": 0.013557751214045573, + "min": 0, + "med": 0, + "max": 7.9216, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "avg": 230.1471537355251, + "min": 18.5356, + "med": 217.96134999999998, + "max": 3969.4694, + "p(90)": 313.1033100000001, + "p(95)": 360.7050749999999 + } + } +} diff --git a/benchmarks/raw/pool_keepalive-100vu-run2.txt b/benchmarks/raw/pool_keepalive-100vu-run2.txt new file mode 100644 index 0000000..18d1297 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-100vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 154 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.6s/30s + +running (0m03.0s), 100/100 VUs, 484 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.6s/30s + +running (0m04.0s), 100/100 VUs, 845 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.6s/30s + +running (0m05.0s), 100/100 VUs, 1164 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.6s/30s + +running (0m06.0s), 100/100 VUs, 1482 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.6s/30s + +running (0m07.0s), 100/100 VUs, 1793 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.6s/30s + +running (0m08.0s), 100/100 VUs, 2099 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.6s/30s + +running (0m09.0s), 100/100 VUs, 2411 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.6s/30s + +running (0m10.0s), 100/100 VUs, 2730 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.6s/30s + +running (0m11.0s), 100/100 VUs, 3084 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.6s/30s + +running (0m12.0s), 100/100 VUs, 3446 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.6s/30s + +running (0m13.0s), 100/100 VUs, 3847 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.6s/30s + +running (0m14.0s), 100/100 VUs, 4205 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.6s/30s + +running (0m15.0s), 100/100 VUs, 4529 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.6s/30s + +running (0m16.0s), 100/100 VUs, 4826 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.6s/30s + +running (0m17.0s), 100/100 VUs, 5199 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.6s/30s + +running (0m18.0s), 100/100 VUs, 5589 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.6s/30s + +running (0m19.0s), 100/100 VUs, 5953 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.6s/30s + +running (0m20.0s), 100/100 VUs, 6338 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.6s/30s + +running (0m21.0s), 100/100 VUs, 6752 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.6s/30s + +running (0m22.0s), 100/100 VUs, 7141 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.6s/30s + +running (0m23.0s), 100/100 VUs, 7489 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.6s/30s + +running (0m24.0s), 100/100 VUs, 7845 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.6s/30s + +running (0m25.0s), 100/100 VUs, 8197 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.6s/30s + +running (0m26.0s), 100/100 VUs, 8571 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.6s/30s + +running (0m27.0s), 100/100 VUs, 8991 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.6s/30s + +running (0m28.0s), 100/100 VUs, 9379 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.6s/30s + +running (0m29.0s), 100/100 VUs, 9785 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.6s/30s + +running (0m30.0s), 100/100 VUs, 10137 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.6s/30s + +running (0m31.0s), 100/100 VUs, 10463 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10707 339.770914/s + checks_succeeded...: 100.00% 10707 out of 10707 + checks_failed......: 0.00% 0 out of 10707 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=230.24ms min=18.53ms med=218.26ms max=3.96s p(90)=313.13ms p(95)=360.79ms + { expected_response:true }...: avg=230.24ms min=18.53ms med=218.26ms max=3.96s p(90)=313.13ms p(95)=360.79ms + http_req_failed................: 0.00% 0 out of 10708 + http_reqs......................: 10708 339.802647/s + + EXECUTION + iteration_duration.............: avg=280.66ms min=68.61ms med=268.66ms max=4.02s p(90)=363.58ms p(95)=411.45ms + iterations.....................: 10707 339.770914/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.5 MB 112 kB/s + data_sent......................: 4.9 MB 154 kB/s + + + + +running (0m31.5s), 000/100 VUs, 10707 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-100vu-run3.json b/benchmarks/raw/pool_keepalive-100vu-run3.json new file mode 100644 index 0000000..f92d300 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10429, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_reqs": { + "count": 10430, + "rate": 334.2479667348476 + }, + "http_req_receiving": { + "avg": 0.08090184084371999, + "min": 0, + "med": 0, + "max": 4.9096, + "p(90)": 0.5289100000000001, + "p(95)": 0.5472549999999999 + }, + "checks": { + "fails": 0, + "passes": 10429, + "value": 1 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_failed": { + "passes": 0, + "fails": 10430, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration": { + "p(95)": 365.97811499999966, + "avg": 237.58586994247304, + "min": 47.557, + "med": 232.18645, + "max": 1198.3077, + "p(90)": 326.2937 + }, + "data_sent": { + "count": 4735347, + "rate": 151752.64683930587 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_sending": { + "avg": 0.016412828379674015, + "min": 0, + "med": 0, + "max": 35.6784, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "avg": 237.48855527325009, + "min": 47.557, + "med": 232.11239999999998, + "max": 1197.771, + "p(90)": 326.26319, + "p(95)": 365.97811499999966 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 31.7147, + "p(90)": 0, + "p(95)": 0, + "avg": 0.01893961649089166 + }, + "data_received": { + "count": 3448814, + "rate": 110523.40049344936 + }, + "iteration_duration": { + "avg": 288.0600242017452, + "min": 97.6591, + "med": 282.7153, + "max": 1251.4723, + "p(90)": 376.8341, + "p(95)": 416.1603400000002 + }, + "http_req_duration{expected_response:true}": { + "avg": 237.58586994247304, + "min": 47.557, + "med": 232.18645, + "max": 1198.3077, + "p(90)": 326.2937, + "p(95)": 365.97811499999966 + }, + "iterations": { + "count": 10429, + "rate": 334.21591994992576 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.04522892617449665, + "min": 0, + "med": 0, + "max": 42.9285, + "p(90)": 0 + } + } +} diff --git a/benchmarks/raw/pool_keepalive-100vu-run3.txt b/benchmarks/raw/pool_keepalive-100vu-run3.txt new file mode 100644 index 0000000..21414a4 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-100vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 277 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.9s/30s + +running (0m03.0s), 100/100 VUs, 677 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.9s/30s + +running (0m04.0s), 100/100 VUs, 1007 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 02.9s/30s + +running (0m05.0s), 100/100 VUs, 1303 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.9s/30s + +running (0m06.0s), 100/100 VUs, 1586 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.9s/30s + +running (0m07.0s), 100/100 VUs, 1963 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 05.9s/30s + +running (0m08.0s), 100/100 VUs, 2225 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.9s/30s + +running (0m09.0s), 100/100 VUs, 2434 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.9s/30s + +running (0m10.0s), 100/100 VUs, 2736 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 08.9s/30s + +running (0m11.0s), 100/100 VUs, 3097 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.9s/30s + +running (0m12.0s), 100/100 VUs, 3414 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.9s/30s + +running (0m13.0s), 100/100 VUs, 3744 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 11.9s/30s + +running (0m14.0s), 100/100 VUs, 4045 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.9s/30s + +running (0m15.0s), 100/100 VUs, 4438 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.9s/30s + +running (0m16.0s), 100/100 VUs, 4804 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 14.9s/30s + +running (0m17.0s), 100/100 VUs, 5195 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.9s/30s + +running (0m18.0s), 100/100 VUs, 5632 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.9s/30s + +running (0m19.0s), 100/100 VUs, 6022 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 17.9s/30s + +running (0m20.0s), 100/100 VUs, 6366 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.9s/30s + +running (0m21.0s), 100/100 VUs, 6734 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.9s/30s + +running (0m22.0s), 100/100 VUs, 7091 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 20.9s/30s + +running (0m23.0s), 100/100 VUs, 7447 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.9s/30s + +running (0m24.0s), 100/100 VUs, 7822 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.9s/30s + +running (0m25.0s), 100/100 VUs, 8158 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 23.9s/30s + +running (0m26.0s), 100/100 VUs, 8527 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.9s/30s + +running (0m27.0s), 100/100 VUs, 8912 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.9s/30s + +running (0m28.0s), 100/100 VUs, 9243 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 26.9s/30s + +running (0m29.0s), 100/100 VUs, 9578 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.9s/30s + +running (0m30.0s), 100/100 VUs, 9940 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.9s/30s + +running (0m31.0s), 100/100 VUs, 10292 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10429 334.21592/s + checks_succeeded...: 100.00% 10429 out of 10429 + checks_failed......: 0.00% 0 out of 10429 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=237.58ms min=47.55ms med=232.18ms max=1.19s p(90)=326.29ms p(95)=365.97ms + { expected_response:true }...: avg=237.58ms min=47.55ms med=232.18ms max=1.19s p(90)=326.29ms p(95)=365.97ms + http_req_failed................: 0.00% 0 out of 10430 + http_reqs......................: 10430 334.247967/s + + EXECUTION + iteration_duration.............: avg=288.06ms min=97.65ms med=282.71ms max=1.25s p(90)=376.83ms p(95)=416.16ms + iterations.....................: 10429 334.21592/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.4 MB 111 kB/s + data_sent......................: 4.7 MB 152 kB/s + + + + +running (0m31.2s), 000/100 VUs, 10429 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-100vu-warmup.json b/benchmarks/raw/pool_keepalive-100vu-warmup.json new file mode 100644 index 0000000..54a542c --- /dev/null +++ b/benchmarks/raw/pool_keepalive-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10189, + "fails": 0 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + }, + "metrics": { + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_reqs": { + "count": 10190, + "rate": 326.3204966396851 + }, + "data_received": { + "count": 3373934, + "rate": 108045.51702743073 + }, + "http_req_failed": { + "passes": 0, + "fails": 10190, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "iterations": { + "count": 10189, + "rate": 326.2884730384447 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.026698243375858688, + "min": 0, + "med": 0, + "max": 33.7575 + }, + "http_req_receiving": { + "max": 2.8109, + "p(90)": 0.5309100000000001, + "p(95)": 0.549155, + "avg": 0.08426107948969583, + "min": 0, + "med": 0 + }, + "http_req_blocked": { + "avg": 0.044122620215897926, + "min": 0, + "med": 0, + "max": 35.2892, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 10189, + "fails": 0, + "value": 1 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "iteration_duration": { + "max": 1985.5636, + "p(90)": 391.46074000000004, + "p(95)": 441.55872000000005, + "avg": 295.1608724016098, + "min": 126.2665, + "med": 281.5513 + }, + "http_req_sending": { + "avg": 0.016348066732090303, + "min": 0, + "med": 0, + "max": 25.0371, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "max": 1933.3034, + "p(90)": 340.46029, + "p(95)": 390.68616, + "avg": 244.5076966143281, + "min": 75.9197, + "med": 230.91725 + }, + "http_req_duration": { + "p(90)": 340.66149, + "p(95)": 390.68616, + "avg": 244.60830576054997, + "min": 75.9197, + "med": 230.98645, + "max": 1933.3034 + }, + "data_sent": { + "count": 4625911, + "rate": 148138.3292375841 + }, + "http_req_duration{expected_response:true}": { + "med": 230.98645, + "max": 1933.3034, + "p(90)": 340.66149, + "p(95)": 390.68616, + "avg": 244.60830576054997, + "min": 75.9197 + } + } +} diff --git a/benchmarks/raw/pool_keepalive-100vu-warmup.txt b/benchmarks/raw/pool_keepalive-100vu-warmup.txt new file mode 100644 index 0000000..2ad47b8 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m01.9s), 100/100 VUs, 222 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.9s/30s + +running (0m02.9s), 100/100 VUs, 516 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.9s/30s + +running (0m03.9s), 100/100 VUs, 872 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 02.9s/30s + +running (0m04.9s), 100/100 VUs, 1132 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.9s/30s + +running (0m05.9s), 100/100 VUs, 1449 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.9s/30s + +running (0m06.9s), 100/100 VUs, 1766 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 05.9s/30s + +running (0m07.9s), 100/100 VUs, 2002 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.9s/30s + +running (0m08.9s), 100/100 VUs, 2362 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.9s/30s + +running (0m09.9s), 100/100 VUs, 2698 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 08.9s/30s + +running (0m10.9s), 100/100 VUs, 3026 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.9s/30s + +running (0m11.9s), 100/100 VUs, 3387 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.9s/30s + +running (0m12.9s), 100/100 VUs, 3746 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 11.9s/30s + +running (0m13.9s), 100/100 VUs, 4059 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.9s/30s + +running (0m14.9s), 100/100 VUs, 4508 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.9s/30s + +running (0m15.9s), 100/100 VUs, 4899 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 14.9s/30s + +running (0m16.9s), 100/100 VUs, 5323 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.9s/30s + +running (0m17.9s), 100/100 VUs, 5718 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.9s/30s + +running (0m18.9s), 100/100 VUs, 6073 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 17.9s/30s + +running (0m19.9s), 100/100 VUs, 6395 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.9s/30s + +running (0m20.9s), 100/100 VUs, 6750 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.9s/30s + +running (0m21.9s), 100/100 VUs, 7143 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 20.9s/30s + +running (0m22.9s), 100/100 VUs, 7540 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.9s/30s + +running (0m23.9s), 100/100 VUs, 7942 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.9s/30s + +running (0m24.9s), 100/100 VUs, 8274 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 23.9s/30s + +running (0m25.9s), 100/100 VUs, 8629 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.9s/30s + +running (0m26.9s), 100/100 VUs, 8987 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.9s/30s + +running (0m27.9s), 100/100 VUs, 9269 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 26.9s/30s + +running (0m28.9s), 100/100 VUs, 9515 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.9s/30s + +running (0m29.9s), 100/100 VUs, 9777 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.9s/30s + +running (0m30.9s), 100/100 VUs, 10079 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10189 326.288473/s + checks_succeeded...: 100.00% 10189 out of 10189 + checks_failed......: 0.00% 0 out of 10189 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=244.6ms min=75.91ms med=230.98ms max=1.93s p(90)=340.66ms p(95)=390.68ms + { expected_response:true }...: avg=244.6ms min=75.91ms med=230.98ms max=1.93s p(90)=340.66ms p(95)=390.68ms + http_req_failed................: 0.00% 0 out of 10190 + http_reqs......................: 10190 326.320497/s + + EXECUTION + iteration_duration.............: avg=295.16ms min=126.26ms med=281.55ms max=1.98s p(90)=391.46ms p(95)=441.55ms + iterations.....................: 10189 326.288473/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.4 MB 108 kB/s + data_sent......................: 4.6 MB 148 kB/s + + + + +running (0m31.2s), 000/100 VUs, 10189 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-20vu-run1.json b/benchmarks/raw/pool_keepalive-20vu-run1.json new file mode 100644 index 0000000..3ff4dfc --- /dev/null +++ b/benchmarks/raw/pool_keepalive-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "data_received": { + "count": 2395502, + "rate": 77068.16635177004 + }, + "http_req_blocked": { + "med": 0, + "max": 30.8803, + "p(90)": 0, + "p(95)": 0, + "avg": 0.008593960873263397, + "min": 0 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.008889764672526225, + "min": 0, + "med": 0, + "max": 2.1012 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration": { + "avg": 34.78395864757584, + "min": 6.1993, + "med": 32.17655, + "max": 926.7177, + "p(90)": 53.546, + "p(95)": 61.46484499999999 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "iterations": { + "count": 7053, + "rate": 226.9093397872488 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "http_reqs": { + "count": 7054, + "rate": 226.94151181897817 + }, + "http_req_waiting": { + "p(95)": 61.399384999999995, + "avg": 34.67546582081091, + "min": 6.1993, + "med": 32.06685, + "max": 925.4028, + "p(90)": 53.36982 + }, + "iteration_duration": { + "max": 420.6007, + "p(90)": 104.04694, + "p(95)": 112.4147, + "avg": 85.17752006238472, + "min": 56.5229, + "med": 82.5724 + }, + "http_req_duration{expected_response:true}": { + "max": 926.7177, + "p(90)": 53.546, + "p(95)": 61.46484499999999, + "avg": 34.78395864757584, + "min": 6.1993, + "med": 32.17655 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.0035380776864190533, + "min": 0, + "med": 0, + "max": 3.9716 + }, + "data_sent": { + "count": 3212145, + "rate": 103341.23085933819 + }, + "checks": { + "passes": 7053, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "passes": 0, + "fails": 7054, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_receiving": { + "avg": 0.09960306209242979, + "min": 0, + "med": 0, + "max": 3.7277, + "p(90)": 0.5368700000000001, + "p(95)": 0.5517 + } + }, + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7053, + "fails": 0 + } + }, + "name": "" + } +} diff --git a/benchmarks/raw/pool_keepalive-20vu-run1.txt b/benchmarks/raw/pool_keepalive-20vu-run1.txt new file mode 100644 index 0000000..ef91382 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-20vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 88 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 01.0s/30s + +running (0m03.0s), 20/20 VUs, 287 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.0s/30s + +running (0m04.0s), 20/20 VUs, 496 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.0s/30s + +running (0m05.0s), 20/20 VUs, 717 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 04.0s/30s + +running (0m06.0s), 20/20 VUs, 927 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.0s/30s + +running (0m07.0s), 20/20 VUs, 1182 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.0s/30s + +running (0m08.0s), 20/20 VUs, 1430 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 07.0s/30s + +running (0m09.0s), 20/20 VUs, 1665 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m10.0s), 20/20 VUs, 1930 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.0s/30s + +running (0m11.0s), 20/20 VUs, 2183 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 10.0s/30s + +running (0m12.0s), 20/20 VUs, 2388 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m13.0s), 20/20 VUs, 2630 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m14.0s), 20/20 VUs, 2875 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m15.0s), 20/20 VUs, 3105 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.0s/30s + +running (0m16.0s), 20/20 VUs, 3345 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.0s/30s + +running (0m17.0s), 20/20 VUs, 3616 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m18.0s), 20/20 VUs, 3846 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.0s/30s + +running (0m19.0s), 20/20 VUs, 4063 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.0s/30s + +running (0m20.0s), 20/20 VUs, 4268 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 19.0s/30s + +running (0m21.0s), 20/20 VUs, 4498 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.0s/30s + +running (0m22.0s), 20/20 VUs, 4742 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.0s/30s + +running (0m23.0s), 20/20 VUs, 5011 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 22.0s/30s + +running (0m24.0s), 20/20 VUs, 5237 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.0s/30s + +running (0m25.0s), 20/20 VUs, 5460 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.0s/30s + +running (0m26.0s), 20/20 VUs, 5708 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 25.0s/30s + +running (0m27.0s), 20/20 VUs, 5960 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.0s/30s + +running (0m28.0s), 20/20 VUs, 6210 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m29.0s), 20/20 VUs, 6485 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m30.0s), 20/20 VUs, 6763 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m31.0s), 20/20 VUs, 7019 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7053 226.90934/s + checks_succeeded...: 100.00% 7053 out of 7053 + checks_failed......: 0.00% 0 out of 7053 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=34.78ms min=6.19ms med=32.17ms max=926.71ms p(90)=53.54ms p(95)=61.46ms + { expected_response:true }...: avg=34.78ms min=6.19ms med=32.17ms max=926.71ms p(90)=53.54ms p(95)=61.46ms + http_req_failed................: 0.00% 0 out of 7054 + http_reqs......................: 7054 226.941512/s + + EXECUTION + iteration_duration.............: avg=85.17ms min=56.52ms med=82.57ms max=420.6ms p(90)=104.04ms p(95)=112.41ms + iterations.....................: 7053 226.90934/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.4 MB 77 kB/s + data_sent......................: 3.2 MB 103 kB/s + + + + +running (0m31.1s), 00/20 VUs, 7053 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-20vu-run2.json b/benchmarks/raw/pool_keepalive-20vu-run2.json new file mode 100644 index 0000000..aa916d0 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7331, + "fails": 0 + } + } + }, + "metrics": { + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 7.953, + "p(90)": 0.5326, + "p(95)": 0.5487, + "avg": 0.09501339334424441 + }, + "http_req_duration{expected_response:true}": { + "max": 1410.7161, + "p(90)": 48.3277, + "p(95)": 57.594914999999986, + "avg": 31.54893400163663, + "min": 4.3944, + "med": 29.90765 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.004612656846699399, + "min": 0, + "med": 0, + "max": 10.2959, + "p(90)": 0 + }, + "checks": { + "passes": 7331, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "passes": 0, + "fails": 7332, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.006937370430987457, + "min": 0, + "med": 0, + "max": 2.0521 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "med": 80.3798, + "max": 194.215, + "p(90)": 98.9075, + "p(95)": 108.09639999999999, + "avg": 81.865846337471, + "min": 54.8974 + }, + "data_sent": { + "count": 3338913, + "rate": 105927.31295387835 + }, + "http_req_duration": { + "p(95)": 57.594914999999986, + "avg": 31.54893400163663, + "min": 4.3944, + "med": 29.90765, + "max": 1410.7161, + "p(90)": 48.3277 + }, + "http_reqs": { + "count": 7332, + "rate": 232.60835444883892 + }, + "http_req_waiting": { + "min": 4.3944, + "med": 29.825699999999998, + "max": 1403.4334, + "p(90)": 48.17258, + "p(95)": 57.503459999999976, + "avg": 31.446983237861364 + }, + "data_received": { + "count": 2482238, + "rate": 78749.22211270827 + }, + "iterations": { + "count": 7331, + "rate": 232.57662935957967 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.01364875886524823, + "min": 0, + "med": 0, + "max": 38.6686, + "p(90)": 0 + } + } +} diff --git a/benchmarks/raw/pool_keepalive-20vu-run2.txt b/benchmarks/raw/pool_keepalive-20vu-run2.txt new file mode 100644 index 0000000..d346896 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-20vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 113 complete and 0 interrupted iterations +default [ 2% ] 20 VUs 00.5s/30s + +running (0m03.0s), 20/20 VUs, 351 complete and 0 interrupted iterations +default [ 5% ] 20 VUs 01.5s/30s + +running (0m04.0s), 20/20 VUs, 609 complete and 0 interrupted iterations +default [ 8% ] 20 VUs 02.5s/30s + +running (0m05.0s), 20/20 VUs, 876 complete and 0 interrupted iterations +default [ 12% ] 20 VUs 03.5s/30s + +running (0m06.0s), 20/20 VUs, 1139 complete and 0 interrupted iterations +default [ 15% ] 20 VUs 04.5s/30s + +running (0m07.0s), 20/20 VUs, 1391 complete and 0 interrupted iterations +default [ 18% ] 20 VUs 05.5s/30s + +running (0m08.0s), 20/20 VUs, 1615 complete and 0 interrupted iterations +default [ 22% ] 20 VUs 06.5s/30s + +running (0m09.0s), 20/20 VUs, 1809 complete and 0 interrupted iterations +default [ 25% ] 20 VUs 07.5s/30s + +running (0m10.0s), 20/20 VUs, 2036 complete and 0 interrupted iterations +default [ 28% ] 20 VUs 08.5s/30s + +running (0m11.0s), 20/20 VUs, 2294 complete and 0 interrupted iterations +default [ 32% ] 20 VUs 09.5s/30s + +running (0m12.0s), 20/20 VUs, 2486 complete and 0 interrupted iterations +default [ 35% ] 20 VUs 10.5s/30s + +running (0m13.0s), 20/20 VUs, 2696 complete and 0 interrupted iterations +default [ 38% ] 20 VUs 11.5s/30s + +running (0m14.0s), 20/20 VUs, 2932 complete and 0 interrupted iterations +default [ 42% ] 20 VUs 12.5s/30s + +running (0m15.0s), 20/20 VUs, 3209 complete and 0 interrupted iterations +default [ 45% ] 20 VUs 13.5s/30s + +running (0m16.0s), 20/20 VUs, 3410 complete and 0 interrupted iterations +default [ 48% ] 20 VUs 14.5s/30s + +running (0m17.0s), 20/20 VUs, 3656 complete and 0 interrupted iterations +default [ 52% ] 20 VUs 15.5s/30s + +running (0m18.0s), 20/20 VUs, 3928 complete and 0 interrupted iterations +default [ 55% ] 20 VUs 16.5s/30s + +running (0m19.0s), 20/20 VUs, 4169 complete and 0 interrupted iterations +default [ 58% ] 20 VUs 17.5s/30s + +running (0m20.0s), 20/20 VUs, 4421 complete and 0 interrupted iterations +default [ 62% ] 20 VUs 18.5s/30s + +running (0m21.0s), 20/20 VUs, 4693 complete and 0 interrupted iterations +default [ 65% ] 20 VUs 19.5s/30s + +running (0m22.0s), 20/20 VUs, 4952 complete and 0 interrupted iterations +default [ 68% ] 20 VUs 20.5s/30s + +running (0m23.0s), 20/20 VUs, 5196 complete and 0 interrupted iterations +default [ 72% ] 20 VUs 21.5s/30s + +running (0m24.0s), 20/20 VUs, 5429 complete and 0 interrupted iterations +default [ 75% ] 20 VUs 22.5s/30s + +running (0m25.0s), 20/20 VUs, 5664 complete and 0 interrupted iterations +default [ 78% ] 20 VUs 23.5s/30s + +running (0m26.0s), 20/20 VUs, 5927 complete and 0 interrupted iterations +default [ 82% ] 20 VUs 24.5s/30s + +running (0m27.0s), 20/20 VUs, 6193 complete and 0 interrupted iterations +default [ 85% ] 20 VUs 25.5s/30s + +running (0m28.0s), 20/20 VUs, 6451 complete and 0 interrupted iterations +default [ 88% ] 20 VUs 26.5s/30s + +running (0m29.0s), 20/20 VUs, 6702 complete and 0 interrupted iterations +default [ 92% ] 20 VUs 27.5s/30s + +running (0m30.0s), 20/20 VUs, 6966 complete and 0 interrupted iterations +default [ 95% ] 20 VUs 28.5s/30s + +running (0m31.0s), 20/20 VUs, 7200 complete and 0 interrupted iterations +default [ 98% ] 20 VUs 29.5s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7331 232.576629/s + checks_succeeded...: 100.00% 7331 out of 7331 + checks_failed......: 0.00% 0 out of 7331 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=31.54ms min=4.39ms med=29.9ms max=1.41s p(90)=48.32ms p(95)=57.59ms + { expected_response:true }...: avg=31.54ms min=4.39ms med=29.9ms max=1.41s p(90)=48.32ms p(95)=57.59ms + http_req_failed................: 0.00% 0 out of 7332 + http_reqs......................: 7332 232.608354/s + + EXECUTION + iteration_duration.............: avg=81.86ms min=54.89ms med=80.37ms max=194.21ms p(90)=98.9ms p(95)=108.09ms + iterations.....................: 7331 232.576629/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.5 MB 79 kB/s + data_sent......................: 3.3 MB 106 kB/s + + + + +running (0m31.5s), 00/20 VUs, 7331 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-20vu-run3.json b/benchmarks/raw/pool_keepalive-20vu-run3.json new file mode 100644 index 0000000..1bf3329 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "data_received": { + "count": 2479430, + "rate": 79416.42032974905 + }, + "http_reqs": { + "count": 7323, + "rate": 234.55650938915485 + }, + "http_req_failed": { + "passes": 0, + "fails": 7323, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration{expected_response:true}": { + "max": 1109.6261, + "p(90)": 48.27338, + "p(95)": 57.61242999999999, + "avg": 31.65537185579675, + "min": 7.2241, + "med": 30.1699 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.005951713778506075, + "min": 0, + "med": 0, + "max": 3.3351, + "p(90)": 0 + }, + "http_req_duration": { + "p(90)": 48.27338, + "p(95)": 57.61242999999999, + "avg": 31.65537185579675, + "min": 7.2241, + "med": 30.1699, + "max": 1109.6261 + }, + "checks": { + "passes": 7322, + "fails": 0, + "value": 1 + }, + "http_req_connecting": { + "med": 0, + "max": 4.0631, + "p(90)": 0, + "p(95)": 0, + "avg": 0.004354362965997541, + "min": 0 + }, + "iteration_duration": { + "avg": 81.99910910953301, + "min": 57.4426, + "med": 80.5903, + "max": 221.0833, + "p(90)": 98.85686000000003, + "p(95)": 108.22884499999999 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.011558500614502245, + "min": 0, + "med": 0, + "max": 36.5994 + }, + "data_sent": { + "count": 3334809, + "rate": 106814.30541028788 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "iterations": { + "count": 7322, + "rate": 234.52447927726232 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 3.1569, + "p(90)": 0.5327, + "p(95)": 0.5493, + "avg": 0.09028022668305341 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_waiting": { + "avg": 31.55913991533522, + "min": 7.2241, + "med": 30.0659, + "max": 1108.0035, + "p(90)": 48.16450000000001, + "p(95)": 57.58202 + } + }, + "root_group": { + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7322, + "fails": 0, + "name": "status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + } +} diff --git a/benchmarks/raw/pool_keepalive-20vu-run3.txt b/benchmarks/raw/pool_keepalive-20vu-run3.txt new file mode 100644 index 0000000..d860b4a --- /dev/null +++ b/benchmarks/raw/pool_keepalive-20vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 197 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.8s/30s + +running (0m03.0s), 20/20 VUs, 451 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.8s/30s + +running (0m04.0s), 20/20 VUs, 642 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 02.8s/30s + +running (0m05.0s), 20/20 VUs, 905 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.8s/30s + +running (0m06.0s), 20/20 VUs, 1144 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.8s/30s + +running (0m07.0s), 20/20 VUs, 1335 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 05.8s/30s + +running (0m08.0s), 20/20 VUs, 1559 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.8s/30s + +running (0m09.0s), 20/20 VUs, 1755 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.8s/30s + +running (0m10.0s), 20/20 VUs, 1982 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 08.8s/30s + +running (0m11.0s), 20/20 VUs, 2213 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.8s/30s + +running (0m12.0s), 20/20 VUs, 2441 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.8s/30s + +running (0m13.0s), 20/20 VUs, 2691 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 11.8s/30s + +running (0m14.0s), 20/20 VUs, 2935 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.8s/30s + +running (0m15.0s), 20/20 VUs, 3171 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.8s/30s + +running (0m16.0s), 20/20 VUs, 3432 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 14.8s/30s + +running (0m17.0s), 20/20 VUs, 3703 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.8s/30s + +running (0m18.0s), 20/20 VUs, 3949 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.8s/30s + +running (0m19.0s), 20/20 VUs, 4156 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 17.8s/30s + +running (0m20.0s), 20/20 VUs, 4407 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.8s/30s + +running (0m21.0s), 20/20 VUs, 4660 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.8s/30s + +running (0m22.0s), 20/20 VUs, 4918 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 20.8s/30s + +running (0m23.0s), 20/20 VUs, 5199 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.8s/30s + +running (0m24.0s), 20/20 VUs, 5427 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.8s/30s + +running (0m25.0s), 20/20 VUs, 5687 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 23.8s/30s + +running (0m26.0s), 20/20 VUs, 5933 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.8s/30s + +running (0m27.0s), 20/20 VUs, 6192 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.8s/30s + +running (0m28.0s), 20/20 VUs, 6437 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 26.8s/30s + +running (0m29.0s), 20/20 VUs, 6702 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.8s/30s + +running (0m30.0s), 20/20 VUs, 6973 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.8s/30s + +running (0m31.0s), 20/20 VUs, 7258 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7322 234.524479/s + checks_succeeded...: 100.00% 7322 out of 7322 + checks_failed......: 0.00% 0 out of 7322 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=31.65ms min=7.22ms med=30.16ms max=1.1s p(90)=48.27ms p(95)=57.61ms + { expected_response:true }...: avg=31.65ms min=7.22ms med=30.16ms max=1.1s p(90)=48.27ms p(95)=57.61ms + http_req_failed................: 0.00% 0 out of 7323 + http_reqs......................: 7323 234.556509/s + + EXECUTION + iteration_duration.............: avg=81.99ms min=57.44ms med=80.59ms max=221.08ms p(90)=98.85ms p(95)=108.22ms + iterations.....................: 7322 234.524479/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.5 MB 79 kB/s + data_sent......................: 3.3 MB 107 kB/s + + + + +running (0m31.2s), 00/20 VUs, 7322 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-20vu-warmup.json b/benchmarks/raw/pool_keepalive-20vu-warmup.json new file mode 100644 index 0000000..a2b42d8 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "iteration_duration": { + "avg": 90.29749690085728, + "min": 57.5857, + "med": 82.6577, + "max": 318.7278, + "p(90)": 114.90272000000002, + "p(95)": 156.99785 + }, + "http_req_failed": { + "passes": 0, + "fails": 6648, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.0030704271961492185, + "min": 0, + "med": 0, + "max": 1.478, + "p(90)": 0 + }, + "data_sent": { + "count": 3027009, + "rate": 97900.51973216464 + }, + "iterations": { + "rate": 214.97945815810206, + "count": 6647 + }, + "http_req_duration{expected_response:true}": { + "avg": 39.86572376654653, + "min": 7.3299, + "med": 32.2006, + "max": 764.7206, + "p(90)": 64.49939, + "p(95)": 105.5518349999999 + }, + "http_req_receiving": { + "p(90)": 0.5308600000000001, + "p(95)": 0.5478649999999999, + "avg": 0.08908789109506621, + "min": 0, + "med": 0, + "max": 4.2636 + }, + "http_req_duration": { + "p(95)": 105.5518349999999, + "avg": 39.86572376654653, + "min": 7.3299, + "med": 32.2006, + "max": 764.7206, + "p(90)": 64.49939 + }, + "checks": { + "passes": 6647, + "fails": 0, + "value": 1 + }, + "data_received": { + "count": 2268830, + "rate": 73379.24538180332 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_reqs": { + "count": 6648, + "rate": 215.0118004866951 + }, + "http_req_sending": { + "max": 0.7283, + "p(90)": 0, + "p(95)": 0, + "avg": 0.00463820697954272, + "min": 0, + "med": 0 + }, + "http_req_waiting": { + "p(95)": 105.34576999999997, + "avg": 39.771997668471826, + "min": 6.9331, + "med": 32.1496, + "max": 763.1676, + "p(90)": 64.49939 + }, + "http_req_blocked": { + "avg": 0.008577797833935018, + "min": 0, + "med": 0, + "max": 27.1343, + "p(90)": 0, + "p(95)": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6647 + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive-20vu-warmup.txt b/benchmarks/raw/pool_keepalive-20vu-warmup.txt new file mode 100644 index 0000000..07e46f4 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-20vu-warmup.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 20 VUs 00.1s/30s + +running (0m02.0s), 20/20 VUs, 116 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.1s/30s + +running (0m03.0s), 20/20 VUs, 310 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.1s/30s + +running (0m04.0s), 20/20 VUs, 476 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.1s/30s + +running (0m05.0s), 20/20 VUs, 566 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.1s/30s + +running (0m06.0s), 20/20 VUs, 681 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.1s/30s + +running (0m07.0s), 20/20 VUs, 775 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.1s/30s + +running (0m08.0s), 20/20 VUs, 969 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.1s/30s + +running (0m09.0s), 20/20 VUs, 1205 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.1s/30s + +running (0m10.0s), 20/20 VUs, 1417 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.1s/30s + +running (0m11.0s), 20/20 VUs, 1652 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.1s/30s + +running (0m12.0s), 20/20 VUs, 1916 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.1s/30s + +running (0m13.0s), 20/20 VUs, 2139 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.1s/30s + +running (0m14.0s), 20/20 VUs, 2359 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.1s/30s + +running (0m15.0s), 20/20 VUs, 2597 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.1s/30s + +running (0m16.0s), 20/20 VUs, 2839 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.1s/30s + +running (0m17.0s), 20/20 VUs, 3101 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.1s/30s + +running (0m18.0s), 20/20 VUs, 3344 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.1s/30s + +running (0m19.0s), 20/20 VUs, 3608 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.1s/30s + +running (0m20.0s), 20/20 VUs, 3867 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.1s/30s + +running (0m21.0s), 20/20 VUs, 4117 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.1s/30s + +running (0m22.0s), 20/20 VUs, 4353 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.1s/30s + +running (0m23.0s), 20/20 VUs, 4615 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.1s/30s + +running (0m24.0s), 20/20 VUs, 4878 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.1s/30s + +running (0m25.0s), 20/20 VUs, 5160 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.1s/30s + +running (0m26.0s), 20/20 VUs, 5413 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.1s/30s + +running (0m27.0s), 20/20 VUs, 5671 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.1s/30s + +running (0m28.0s), 20/20 VUs, 5936 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.1s/30s + +running (0m29.0s), 20/20 VUs, 6209 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.1s/30s + +running (0m30.0s), 20/20 VUs, 6425 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.1s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6647 214.979458/s + checks_succeeded...: 100.00% 6647 out of 6647 + checks_failed......: 0.00% 0 out of 6647 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=39.86ms min=7.32ms med=32.2ms max=764.72ms p(90)=64.49ms p(95)=105.55ms + { expected_response:true }...: avg=39.86ms min=7.32ms med=32.2ms max=764.72ms p(90)=64.49ms p(95)=105.55ms + http_req_failed................: 0.00% 0 out of 6648 + http_reqs......................: 6648 215.0118/s + + EXECUTION + iteration_duration.............: avg=90.29ms min=57.58ms med=82.65ms max=318.72ms p(90)=114.9ms p(95)=156.99ms + iterations.....................: 6647 214.979458/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.3 MB 73 kB/s + data_sent......................: 3.0 MB 98 kB/s + + + + +running (0m30.9s), 00/20 VUs, 6647 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-50vu-run1.json b/benchmarks/raw/pool_keepalive-50vu-run1.json new file mode 100644 index 0000000..a8c2db7 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 8622, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_duration{expected_response:true}": { + "max": 5150.908, + "p(90)": 127.54270000000002, + "p(95)": 147.85165999999998, + "avg": 123.42681142293908, + "min": 24.6343, + "med": 89.6461 + }, + "http_req_sending": { + "avg": 0.014741215354285062, + "min": 0, + "med": 0, + "max": 37.2105, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "med": 140.06375, + "max": 5205.2123, + "p(90)": 178.06418000000002, + "p(95)": 198.21553, + "avg": 173.8534471932275, + "min": 74.8294 + }, + "checks": { + "passes": 8622, + "fails": 0, + "value": 1 + }, + "http_req_blocked": { + "avg": 0.030856430476632255, + "min": 0, + "med": 0, + "max": 34.8144, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "http_reqs": { + "count": 8623, + "rate": 275.7617635697437 + }, + "iterations": { + "count": 8622, + "rate": 275.72978377575447 + }, + "http_req_failed": { + "passes": 0, + "fails": 8623, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "max": 50, + "value": 50, + "min": 50 + }, + "http_req_duration": { + "avg": 123.42681142293908, + "min": 24.6343, + "med": 89.6461, + "max": 5150.908, + "p(90)": 127.54270000000002, + "p(95)": 147.85165999999998 + }, + "data_received": { + "count": 2885030, + "rate": 92262.66505295347 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.01644867215586223, + "min": 0, + "med": 0, + "max": 19.657 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 5.925, + "p(90)": 0.5345799999999999, + "p(95)": 0.5513899999999999, + "avg": 0.0949045807723529 + }, + "data_sent": { + "count": 3921309, + "rate": 125402.65398839247 + }, + "http_req_waiting": { + "max": 5150.908, + "p(90)": 127.40586000000003, + "p(95)": 147.77710999999994, + "avg": 123.31716562681268, + "min": 24.6343, + "med": 89.5694 + } + } +} diff --git a/benchmarks/raw/pool_keepalive-50vu-run1.txt b/benchmarks/raw/pool_keepalive-50vu-run1.txt new file mode 100644 index 0000000..285e062 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-50vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 40 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m03.0s), 50/50 VUs, 60 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.8s/30s + +running (0m04.0s), 50/50 VUs, 60 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m05.0s), 50/50 VUs, 68 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.8s/30s + +running (0m06.0s), 50/50 VUs, 69 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m07.0s), 50/50 VUs, 124 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.8s/30s + +running (0m08.0s), 50/50 VUs, 370 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m09.0s), 50/50 VUs, 653 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.8s/30s + +running (0m10.0s), 50/50 VUs, 948 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.8s/30s + +running (0m11.0s), 50/50 VUs, 1275 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m12.0s), 50/50 VUs, 1661 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.8s/30s + +running (0m13.0s), 50/50 VUs, 2005 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.8s/30s + +running (0m14.0s), 50/50 VUs, 2368 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m15.0s), 50/50 VUs, 2761 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.8s/30s + +running (0m16.0s), 50/50 VUs, 3079 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m17.0s), 50/50 VUs, 3431 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.8s/30s + +running (0m18.0s), 50/50 VUs, 3828 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.8s/30s + +running (0m19.0s), 50/50 VUs, 4180 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m20.0s), 50/50 VUs, 4556 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.8s/30s + +running (0m21.0s), 50/50 VUs, 4928 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.8s/30s + +running (0m22.0s), 50/50 VUs, 5288 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m23.0s), 50/50 VUs, 5669 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m24.0s), 50/50 VUs, 6010 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m25.0s), 50/50 VUs, 6344 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.8s/30s + +running (0m26.0s), 50/50 VUs, 6743 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m27.0s), 50/50 VUs, 7115 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.8s/30s + +running (0m28.0s), 50/50 VUs, 7503 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.8s/30s + +running (0m29.0s), 50/50 VUs, 7869 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.8s/30s + +running (0m30.0s), 50/50 VUs, 8204 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m31.0s), 50/50 VUs, 8521 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 8622 275.729784/s + checks_succeeded...: 100.00% 8622 out of 8622 + checks_failed......: 0.00% 0 out of 8622 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=123.42ms min=24.63ms med=89.64ms max=5.15s p(90)=127.54ms p(95)=147.85ms + { expected_response:true }...: avg=123.42ms min=24.63ms med=89.64ms max=5.15s p(90)=127.54ms p(95)=147.85ms + http_req_failed................: 0.00% 0 out of 8623 + http_reqs......................: 8623 275.761764/s + + EXECUTION + iteration_duration.............: avg=173.85ms min=74.82ms med=140.06ms max=5.2s p(90)=178.06ms p(95)=198.21ms + iterations.....................: 8622 275.729784/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.9 MB 92 kB/s + data_sent......................: 3.9 MB 125 kB/s + + + + +running (0m31.3s), 00/50 VUs, 8622 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-50vu-run2.json b/benchmarks/raw/pool_keepalive-50vu-run2.json new file mode 100644 index 0000000..f01cdcb --- /dev/null +++ b/benchmarks/raw/pool_keepalive-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "checks": { + "passes": 10603, + "fails": 0, + "value": 1 + }, + "http_req_sending": { + "avg": 0.013194209732176531, + "min": 0, + "med": 0, + "max": 19.9658, + "p(90)": 0, + "p(95)": 0 + }, + "http_reqs": { + "count": 10604, + "rate": 337.3541511173784 + }, + "http_req_connecting": { + "avg": 0.01388708034703885, + "min": 0, + "med": 0, + "max": 14.3223, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 4824645, + "rate": 153490.57133324258 + }, + "data_received": { + "count": 3503102, + "rate": 111447.18988000666 + }, + "http_req_failed": { + "passes": 0, + "fails": 10604, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration": { + "p(95)": 131.46713, + "avg": 91.16968978687275, + "min": 13.3135, + "med": 88.9003, + "max": 1267.7478, + "p(90)": 119.40822000000001 + }, + "http_req_duration{expected_response:true}": { + "min": 13.3135, + "med": 88.9003, + "max": 1267.7478, + "p(90)": 119.40822000000001, + "p(95)": 131.46713, + "avg": 91.16968978687275 + }, + "http_req_receiving": { + "avg": 0.08782651829498304, + "min": 0, + "med": 0, + "max": 5.2288, + "p(90)": 0.5292, + "p(95)": 0.5483 + }, + "iteration_duration": { + "min": 64.0878, + "med": 139.4073, + "max": 617.8245, + "p(90)": 169.84212000000002, + "p(95)": 181.76307, + "avg": 141.5642057813831 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.026445652583930588, + "min": 0, + "med": 0, + "max": 38.8488, + "p(90)": 0 + }, + "http_req_waiting": { + "p(90)": 119.30745000000002, + "p(95)": 131.22434500000003, + "avg": 91.0686690588455, + "min": 12.7931, + "med": 88.81479999999999, + "max": 1263.6843 + }, + "iterations": { + "count": 10603, + "rate": 337.3223372592949 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10603, + "fails": 0, + "name": "status is 200" + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive-50vu-run2.txt b/benchmarks/raw/pool_keepalive-50vu-run2.txt new file mode 100644 index 0000000..00c9885 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 138 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.7s/30s + +running (0m03.0s), 50/50 VUs, 515 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.7s/30s + +running (0m04.0s), 50/50 VUs, 874 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.7s/30s + +running (0m05.0s), 50/50 VUs, 1218 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.7s/30s + +running (0m06.0s), 50/50 VUs, 1588 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.7s/30s + +running (0m07.0s), 50/50 VUs, 1926 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.7s/30s + +running (0m08.0s), 50/50 VUs, 2225 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.7s/30s + +running (0m09.0s), 50/50 VUs, 2564 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.7s/30s + +running (0m10.0s), 50/50 VUs, 2899 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.7s/30s + +running (0m11.0s), 50/50 VUs, 3259 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.7s/30s + +running (0m12.0s), 50/50 VUs, 3620 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.7s/30s + +running (0m13.0s), 50/50 VUs, 4000 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.7s/30s + +running (0m14.0s), 50/50 VUs, 4397 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.7s/30s + +running (0m15.0s), 50/50 VUs, 4749 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.7s/30s + +running (0m16.0s), 50/50 VUs, 5093 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.7s/30s + +running (0m17.0s), 50/50 VUs, 5482 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.7s/30s + +running (0m18.0s), 50/50 VUs, 5808 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.7s/30s + +running (0m19.0s), 50/50 VUs, 6184 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.7s/30s + +running (0m20.0s), 50/50 VUs, 6573 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.7s/30s + +running (0m21.0s), 50/50 VUs, 6884 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.7s/30s + +running (0m22.0s), 50/50 VUs, 7278 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.7s/30s + +running (0m23.0s), 50/50 VUs, 7595 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.7s/30s + +running (0m24.0s), 50/50 VUs, 7925 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.7s/30s + +running (0m25.0s), 50/50 VUs, 8308 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.7s/30s + +running (0m26.0s), 50/50 VUs, 8718 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.7s/30s + +running (0m27.0s), 50/50 VUs, 9079 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.7s/30s + +running (0m28.0s), 50/50 VUs, 9407 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.7s/30s + +running (0m29.0s), 50/50 VUs, 9780 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.7s/30s + +running (0m30.0s), 50/50 VUs, 10092 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.7s/30s + +running (0m31.0s), 50/50 VUs, 10440 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10603 337.322337/s + checks_succeeded...: 100.00% 10603 out of 10603 + checks_failed......: 0.00% 0 out of 10603 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=91.16ms min=13.31ms med=88.9ms max=1.26s p(90)=119.4ms p(95)=131.46ms + { expected_response:true }...: avg=91.16ms min=13.31ms med=88.9ms max=1.26s p(90)=119.4ms p(95)=131.46ms + http_req_failed................: 0.00% 0 out of 10604 + http_reqs......................: 10604 337.354151/s + + EXECUTION + iteration_duration.............: avg=141.56ms min=64.08ms med=139.4ms max=617.82ms p(90)=169.84ms p(95)=181.76ms + iterations.....................: 10603 337.322337/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.5 MB 111 kB/s + data_sent......................: 4.8 MB 154 kB/s + + + + +running (0m31.4s), 00/50 VUs, 10603 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-50vu-run3.json b/benchmarks/raw/pool_keepalive-50vu-run3.json new file mode 100644 index 0000000..495fa91 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 9980, + "fails": 0 + } + } + }, + "metrics": { + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_reqs": { + "rate": 318.3537186352134, + "count": 9981 + }, + "http_req_sending": { + "avg": 0.008046738803727076, + "min": 0, + "med": 0, + "max": 3.8851, + "p(90)": 0, + "p(95)": 0 + }, + "iterations": { + "count": 9980, + "rate": 318.32182266099886 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 141.3061, + "avg": 99.93705746919153, + "min": 25.41, + "med": 97.7437, + "max": 1197.2562, + "p(90)": 128.2134 + }, + "http_req_blocked": { + "avg": 0.014671115118725587, + "min": 0, + "med": 0, + "max": 36.2505, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "data_received": { + "count": 3308726, + "rate": 105535.03917894149 + }, + "http_req_duration": { + "p(95)": 141.3061, + "avg": 99.93705746919153, + "min": 25.41, + "med": 97.7437, + "max": 1197.2562, + "p(90)": 128.2134 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 9981, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_receiving": { + "avg": 0.09392225227933071, + "min": 0, + "med": 0, + "max": 7.149, + "p(90)": 0.5339, + "p(95)": 0.5507 + }, + "iteration_duration": { + "min": 76.1059, + "med": 148.24745000000001, + "max": 512.8266, + "p(90)": 178.70737, + "p(95)": 191.75679499999998, + "avg": 150.337589298596 + }, + "http_req_connecting": { + "avg": 0.008450095180843603, + "min": 0, + "med": 0, + "max": 6.3449, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 9980, + "fails": 0, + "value": 1 + }, + "http_req_waiting": { + "p(95)": 141.0001, + "avg": 99.83508847810864, + "min": 25.41, + "med": 97.6274, + "max": 1190.1072, + "p(90)": 128.0891 + }, + "data_sent": { + "rate": 144825.4889915989, + "count": 4540557 + } + } +} diff --git a/benchmarks/raw/pool_keepalive-50vu-run3.txt b/benchmarks/raw/pool_keepalive-50vu-run3.txt new file mode 100644 index 0000000..bd9f076 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 186 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.7s/30s + +running (0m03.0s), 50/50 VUs, 551 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.7s/30s + +running (0m04.0s), 50/50 VUs, 888 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.7s/30s + +running (0m05.0s), 50/50 VUs, 1233 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.7s/30s + +running (0m06.0s), 50/50 VUs, 1551 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.7s/30s + +running (0m07.0s), 50/50 VUs, 1839 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.7s/30s + +running (0m08.0s), 50/50 VUs, 2204 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.7s/30s + +running (0m09.0s), 50/50 VUs, 2570 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.7s/30s + +running (0m10.0s), 50/50 VUs, 2858 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.7s/30s + +running (0m11.0s), 50/50 VUs, 3242 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.7s/30s + +running (0m12.0s), 50/50 VUs, 3584 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.7s/30s + +running (0m13.0s), 50/50 VUs, 3905 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.7s/30s + +running (0m14.0s), 50/50 VUs, 4234 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.7s/30s + +running (0m15.0s), 50/50 VUs, 4567 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.7s/30s + +running (0m16.0s), 50/50 VUs, 4936 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.7s/30s + +running (0m17.0s), 50/50 VUs, 5289 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.7s/30s + +running (0m18.0s), 50/50 VUs, 5624 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.7s/30s + +running (0m19.0s), 50/50 VUs, 5950 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.7s/30s + +running (0m20.0s), 50/50 VUs, 6243 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.7s/30s + +running (0m21.0s), 50/50 VUs, 6553 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.7s/30s + +running (0m22.0s), 50/50 VUs, 6869 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.7s/30s + +running (0m23.0s), 50/50 VUs, 7171 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.7s/30s + +running (0m24.0s), 50/50 VUs, 7497 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.7s/30s + +running (0m25.0s), 50/50 VUs, 7846 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.7s/30s + +running (0m26.0s), 50/50 VUs, 8194 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.7s/30s + +running (0m27.0s), 50/50 VUs, 8559 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.7s/30s + +running (0m28.0s), 50/50 VUs, 8902 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.7s/30s + +running (0m29.0s), 50/50 VUs, 9217 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.7s/30s + +running (0m30.0s), 50/50 VUs, 9505 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.7s/30s + +running (0m31.0s), 50/50 VUs, 9841 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 9980 318.321823/s + checks_succeeded...: 100.00% 9980 out of 9980 + checks_failed......: 0.00% 0 out of 9980 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=99.93ms min=25.41ms med=97.74ms max=1.19s p(90)=128.21ms p(95)=141.3ms + { expected_response:true }...: avg=99.93ms min=25.41ms med=97.74ms max=1.19s p(90)=128.21ms p(95)=141.3ms + http_req_failed................: 0.00% 0 out of 9981 + http_reqs......................: 9981 318.353719/s + + EXECUTION + iteration_duration.............: avg=150.33ms min=76.1ms med=148.24ms max=512.82ms p(90)=178.7ms p(95)=191.75ms + iterations.....................: 9980 318.321823/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.3 MB 106 kB/s + data_sent......................: 4.5 MB 145 kB/s + + + + +running (0m31.4s), 00/50 VUs, 9980 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive-50vu-warmup.json b/benchmarks/raw/pool_keepalive-50vu-warmup.json new file mode 100644 index 0000000..9ac8893 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_duration{expected_response:true}": { + "med": 89.2874, + "max": 1134.0544, + "p(90)": 116.7649, + "p(95)": 125.6352, + "avg": 89.93369023455746, + "min": 14.2772 + }, + "iterations": { + "count": 10700, + "rate": 341.9282353222464 + }, + "http_req_waiting": { + "p(90)": 116.6923, + "p(95)": 125.573, + "avg": 89.8359449397256, + "min": 14.2772, + "med": 89.1962, + "max": 1132.9726 + }, + "iteration_duration": { + "p(90)": 167.3174, + "p(95)": 176.21391999999997, + "avg": 140.3416146074764, + "min": 64.3843, + "med": 139.70845, + "max": 664.4676 + }, + "checks": { + "fails": 0, + "passes": 10700, + "value": 1 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 39.4071, + "p(90)": 0, + "p(95)": 0, + "avg": 0.020289141201756847 + }, + "http_req_failed": { + "passes": 0, + "fails": 10701, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "avg": 0.011643266984393975, + "min": 0, + "med": 0, + "max": 23.9232, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "avg": 0.0885076908700122, + "min": 0, + "med": 0, + "max": 3.3622, + "p(90)": 0.5283, + "p(95)": 0.5493 + }, + "data_sent": { + "count": 4868877, + "rate": 155589.394449633 + }, + "http_req_duration": { + "avg": 89.93369023455746, + "min": 14.2772, + "med": 89.2874, + "max": 1134.0544, + "p(90)": 116.7649, + "p(95)": 125.6352 + }, + "http_reqs": { + "rate": 341.9601912320896, + "count": 10701 + }, + "data_received": { + "count": 3533366, + "rate": 112911.92533903032 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_sending": { + "avg": 0.009237603962246523, + "min": 0, + "med": 0, + "max": 4.0799, + "p(90)": 0, + "p(95)": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10700, + "fails": 0, + "name": "status is 200" + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive-50vu-warmup.txt b/benchmarks/raw/pool_keepalive-50vu-warmup.txt new file mode 100644 index 0000000..427a1d2 --- /dev/null +++ b/benchmarks/raw/pool_keepalive-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 256 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m03.0s), 50/50 VUs, 604 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.8s/30s + +running (0m04.0s), 50/50 VUs, 962 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m05.0s), 50/50 VUs, 1321 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.8s/30s + +running (0m06.0s), 50/50 VUs, 1686 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m07.0s), 50/50 VUs, 2021 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.8s/30s + +running (0m08.0s), 50/50 VUs, 2340 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m09.0s), 50/50 VUs, 2649 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.8s/30s + +running (0m10.0s), 50/50 VUs, 3004 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.8s/30s + +running (0m11.0s), 50/50 VUs, 3382 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m12.0s), 50/50 VUs, 3736 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.8s/30s + +running (0m13.0s), 50/50 VUs, 4105 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.8s/30s + +running (0m14.0s), 50/50 VUs, 4473 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m15.0s), 50/50 VUs, 4795 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.8s/30s + +running (0m16.0s), 50/50 VUs, 5099 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m17.0s), 50/50 VUs, 5434 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.8s/30s + +running (0m18.0s), 50/50 VUs, 5798 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.8s/30s + +running (0m19.0s), 50/50 VUs, 6169 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m20.0s), 50/50 VUs, 6509 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.8s/30s + +running (0m21.0s), 50/50 VUs, 6893 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.8s/30s + +running (0m22.0s), 50/50 VUs, 7270 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m23.0s), 50/50 VUs, 7612 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m24.0s), 50/50 VUs, 7937 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m25.0s), 50/50 VUs, 8291 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.8s/30s + +running (0m26.0s), 50/50 VUs, 8659 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m27.0s), 50/50 VUs, 9105 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.8s/30s + +running (0m28.0s), 50/50 VUs, 9495 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.8s/30s + +running (0m29.0s), 50/50 VUs, 9865 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.8s/30s + +running (0m30.0s), 50/50 VUs, 10262 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m31.0s), 50/50 VUs, 10591 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10700 341.928235/s + checks_succeeded...: 100.00% 10700 out of 10700 + checks_failed......: 0.00% 0 out of 10700 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=89.93ms min=14.27ms med=89.28ms max=1.13s p(90)=116.76ms p(95)=125.63ms + { expected_response:true }...: avg=89.93ms min=14.27ms med=89.28ms max=1.13s p(90)=116.76ms p(95)=125.63ms + http_req_failed................: 0.00% 0 out of 10701 + http_reqs......................: 10701 341.960191/s + + EXECUTION + iteration_duration.............: avg=140.34ms min=64.38ms med=139.7ms max=664.46ms p(90)=167.31ms p(95)=176.21ms + iterations.....................: 10700 341.928235/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.5 MB 113 kB/s + data_sent......................: 4.9 MB 156 kB/s + + + + +running (0m31.3s), 00/50 VUs, 10700 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-100vu-run1.json b/benchmarks/raw/pool_keepalive_batched-100vu-run1.json new file mode 100644 index 0000000..a14d3b2 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10132, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 45.5744, + "p(90)": 0, + "p(95)": 0, + "avg": 0.05410172703049438 + }, + "http_req_sending": { + "avg": 0.025195420902003364, + "min": 0, + "med": 0, + "max": 39.3484, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "p(90)": 0.532, + "p(95)": 0.5485, + "avg": 0.09640730287180492, + "min": 0, + "med": 0, + "max": 50.6318 + }, + "http_req_failed": { + "passes": 0, + "fails": 10133, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 10133, + "rate": 320.8791001809029 + }, + "iterations": { + "count": 10132, + "rate": 320.847433438558 + }, + "http_req_duration": { + "avg": 246.7694929931911, + "min": 30.3055, + "med": 214.7429, + "max": 3476.709, + "p(90)": 390.58614000000017, + "p(95)": 429.95682 + }, + "data_sent": { + "count": 4599721, + "rate": 145658.17976543994 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "checks": { + "passes": 10132, + "fails": 0, + "value": 1 + }, + "iteration_duration": { + "med": 265.3275, + "max": 3529.8272, + "p(90)": 440.94017, + "p(95)": 480.627275, + "avg": 297.17844378207724, + "min": 80.4209 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_duration{expected_response:true}": { + "max": 3476.709, + "p(90)": 390.58614000000017, + "p(95)": 429.95682, + "avg": 246.7694929931911, + "min": 30.3055, + "med": 214.7429 + }, + "http_req_waiting": { + "p(90)": 390.58614000000017, + "p(95)": 429.85812, + "avg": 246.6478902694176, + "min": 25.418, + "med": 214.6965, + "max": 3476.709 + }, + "http_req_connecting": { + "max": 20.5266, + "p(90)": 0, + "p(95)": 0, + "avg": 0.031424790289154236, + "min": 0, + "med": 0 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 3356150, + "rate": 106278.33732084648 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-100vu-run1.txt b/benchmarks/raw/pool_keepalive_batched-100vu-run1.txt new file mode 100644 index 0000000..1ad467b --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-100vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 152 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.6s/30s + +running (0m03.0s), 100/100 VUs, 518 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.6s/30s + +running (0m04.0s), 100/100 VUs, 847 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.6s/30s + +running (0m05.0s), 100/100 VUs, 1130 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.7s/30s + +running (0m06.0s), 100/100 VUs, 1504 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.7s/30s + +running (0m07.0s), 100/100 VUs, 1810 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.6s/30s + +running (0m08.0s), 100/100 VUs, 2114 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.6s/30s + +running (0m09.0s), 100/100 VUs, 2423 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.6s/30s + +running (0m10.0s), 100/100 VUs, 2753 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.6s/30s + +running (0m11.0s), 100/100 VUs, 3135 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.6s/30s + +running (0m12.0s), 100/100 VUs, 3496 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.6s/30s + +running (0m13.0s), 100/100 VUs, 3833 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.6s/30s + +running (0m14.0s), 100/100 VUs, 4168 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.6s/30s + +running (0m15.0s), 100/100 VUs, 4462 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.6s/30s + +running (0m16.0s), 100/100 VUs, 4766 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.7s/30s + +running (0m17.0s), 100/100 VUs, 5069 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.6s/30s + +running (0m18.0s), 100/100 VUs, 5369 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.7s/30s + +running (0m19.0s), 100/100 VUs, 5675 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.6s/30s + +running (0m20.0s), 100/100 VUs, 5980 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.6s/30s + +running (0m21.0s), 100/100 VUs, 6326 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.7s/30s + +running (0m22.0s), 100/100 VUs, 6661 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.6s/30s + +running (0m23.0s), 100/100 VUs, 6985 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.6s/30s + +running (0m24.0s), 100/100 VUs, 7346 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.7s/30s + +running (0m25.0s), 100/100 VUs, 7702 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.7s/30s + +running (0m26.0s), 100/100 VUs, 8094 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.6s/30s + +running (0m27.0s), 100/100 VUs, 8450 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.7s/30s + +running (0m28.0s), 100/100 VUs, 8811 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.6s/30s + +running (0m29.0s), 100/100 VUs, 9123 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.6s/30s + +running (0m30.0s), 100/100 VUs, 9571 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.6s/30s + +running (0m31.0s), 100/100 VUs, 9883 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10132 320.847433/s + checks_succeeded...: 100.00% 10132 out of 10132 + checks_failed......: 0.00% 0 out of 10132 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=246.76ms min=30.3ms med=214.74ms max=3.47s p(90)=390.58ms p(95)=429.95ms + { expected_response:true }...: avg=246.76ms min=30.3ms med=214.74ms max=3.47s p(90)=390.58ms p(95)=429.95ms + http_req_failed................: 0.00% 0 out of 10133 + http_reqs......................: 10133 320.8791/s + + EXECUTION + iteration_duration.............: avg=297.17ms min=80.42ms med=265.32ms max=3.52s p(90)=440.94ms p(95)=480.62ms + iterations.....................: 10132 320.847433/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.4 MB 106 kB/s + data_sent......................: 4.6 MB 146 kB/s + + + + +running (0m31.6s), 000/100 VUs, 10132 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-100vu-run2.json b/benchmarks/raw/pool_keepalive_batched-100vu-run2.json new file mode 100644 index 0000000..2bafa46 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "iterations": { + "count": 10629, + "rate": 340.1648314151544 + }, + "http_req_failed": { + "passes": 0, + "fails": 10630, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "avg": 0.037460846660395085, + "min": 0, + "med": 0, + "max": 72.6297, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "fails": 0, + "passes": 10629, + "value": 1 + }, + "http_req_waiting": { + "avg": 231.97538867356482, + "min": 25.5879, + "med": 229.75254999999999, + "max": 4498.6215, + "p(90)": 304.03464, + "p(95)": 328.622105 + }, + "http_reqs": { + "count": 10630, + "rate": 340.19683488033604 + }, + "http_req_receiving": { + "p(90)": 0.5331, + "p(95)": 0.5489, + "avg": 0.08225573847601139, + "min": 0, + "med": 0, + "max": 8.1485 + }, + "data_sent": { + "count": 4826561, + "rate": 154466.6769103358 + }, + "data_received": { + "count": 3511214, + "rate": 112371.01499412268 + }, + "http_req_blocked": { + "avg": 0.07555823142050798, + "min": 0, + "med": 0, + "max": 117.2356, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration": { + "p(95)": 328.633795, + "avg": 232.0888563781741, + "min": 25.5879, + "med": 229.8143, + "max": 4499.1492, + "p(90)": 304.08873 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 304.08873, + "p(95)": 328.633795, + "avg": 232.0888563781741, + "min": 25.5879, + "med": 229.8143, + "max": 4499.1492 + }, + "http_req_sending": { + "avg": 0.031211966133584207, + "min": 0, + "med": 0, + "max": 75.797, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "avg": 282.58107864333357, + "min": 76.9385, + "med": 280.1056, + "max": 4580.2496, + "p(90)": 354.76116, + "p(95)": 379.0966 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10629, + "fails": 0, + "name": "status is 200" + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-100vu-run2.txt b/benchmarks/raw/pool_keepalive_batched-100vu-run2.txt new file mode 100644 index 0000000..2bfc3f4 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-100vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 187 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.9s/30s + +running (0m03.0s), 100/100 VUs, 489 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.9s/30s + +running (0m04.0s), 100/100 VUs, 805 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 02.9s/30s + +running (0m05.0s), 100/100 VUs, 1047 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.9s/30s + +running (0m06.0s), 100/100 VUs, 1356 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.9s/30s + +running (0m07.0s), 100/100 VUs, 1709 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 05.9s/30s + +running (0m08.0s), 100/100 VUs, 2100 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.9s/30s + +running (0m09.0s), 100/100 VUs, 2445 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.9s/30s + +running (0m10.0s), 100/100 VUs, 2827 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 08.9s/30s + +running (0m11.0s), 100/100 VUs, 3188 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.9s/30s + +running (0m12.0s), 100/100 VUs, 3575 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.9s/30s + +running (0m13.0s), 100/100 VUs, 3849 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 11.9s/30s + +running (0m14.0s), 100/100 VUs, 4201 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.9s/30s + +running (0m15.0s), 100/100 VUs, 4555 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.9s/30s + +running (0m16.0s), 100/100 VUs, 4947 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 14.9s/30s + +running (0m17.0s), 100/100 VUs, 5343 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.9s/30s + +running (0m18.0s), 100/100 VUs, 5697 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.9s/30s + +running (0m19.0s), 100/100 VUs, 6093 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 17.9s/30s + +running (0m20.0s), 100/100 VUs, 6474 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.9s/30s + +running (0m21.0s), 100/100 VUs, 6821 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.9s/30s + +running (0m22.0s), 100/100 VUs, 7178 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 20.9s/30s + +running (0m23.0s), 100/100 VUs, 7570 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.9s/30s + +running (0m24.0s), 100/100 VUs, 7935 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.9s/30s + +running (0m25.0s), 100/100 VUs, 8285 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 23.9s/30s + +running (0m26.0s), 100/100 VUs, 8656 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.9s/30s + +running (0m27.0s), 100/100 VUs, 9082 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.9s/30s + +running (0m28.0s), 100/100 VUs, 9476 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 26.9s/30s + +running (0m29.0s), 100/100 VUs, 9819 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.9s/30s + +running (0m30.0s), 100/100 VUs, 10151 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.9s/30s + +running (0m31.0s), 100/100 VUs, 10506 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10629 340.164831/s + checks_succeeded...: 100.00% 10629 out of 10629 + checks_failed......: 0.00% 0 out of 10629 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=232.08ms min=25.58ms med=229.81ms max=4.49s p(90)=304.08ms p(95)=328.63ms + { expected_response:true }...: avg=232.08ms min=25.58ms med=229.81ms max=4.49s p(90)=304.08ms p(95)=328.63ms + http_req_failed................: 0.00% 0 out of 10630 + http_reqs......................: 10630 340.196835/s + + EXECUTION + iteration_duration.............: avg=282.58ms min=76.93ms med=280.1ms max=4.58s p(90)=354.76ms p(95)=379.09ms + iterations.....................: 10629 340.164831/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.5 MB 112 kB/s + data_sent......................: 4.8 MB 155 kB/s + + + + +running (0m31.2s), 000/100 VUs, 10629 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-100vu-run3.json b/benchmarks/raw/pool_keepalive_batched-100vu-run3.json new file mode 100644 index 0000000..7f351a9 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "avg": 0.08210287581699353, + "min": 0, + "med": 0, + "max": 6.9119, + "p(90)": 0.5293100000000001, + "p(95)": 0.5466549999999999 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 385.241655, + "avg": 230.4613926704022, + "min": 45.1232, + "med": 200.83525, + "max": 3430.8847, + "p(90)": 347.98532 + }, + "http_req_failed": { + "passes": 0, + "fails": 10710, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 10710, + "rate": 336.9934142959749 + }, + "iteration_duration": { + "avg": 280.8490205528061, + "min": 95.5404, + "med": 251.3515, + "max": 3485.1209, + "p(90)": 398.48564, + "p(95)": 435.68348000000003 + }, + "http_req_blocked": { + "avg": 0.033915340802987894, + "min": 0, + "med": 0, + "max": 49.3816, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.03356295051353875, + "min": 0, + "med": 0, + "max": 50.9371 + }, + "data_sent": { + "count": 4862695, + "rate": 153006.18027357289 + }, + "http_req_waiting": { + "avg": 230.34572684407186, + "min": 45.1232, + "med": 200.80669999999998, + "max": 3430.8847, + "p(90)": 347.98197, + "p(95)": 385.07725 + }, + "data_received": { + "count": 3536174, + "rate": 111266.79269884732 + }, + "vus": { + "min": 0, + "max": 100, + "value": 100 + }, + "iterations": { + "count": 10709, + "rate": 336.96194899118535 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_connecting": { + "avg": 0.0164853314659197, + "min": 0, + "med": 0, + "max": 19.517, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 10709, + "fails": 0, + "value": 1 + }, + "http_req_duration": { + "avg": 230.4613926704022, + "min": 45.1232, + "med": 200.83525, + "max": 3430.8847, + "p(90)": 347.98532, + "p(95)": 385.241655 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 10709, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-100vu-run3.txt b/benchmarks/raw/pool_keepalive_batched-100vu-run3.txt new file mode 100644 index 0000000..06af091 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-100vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 72 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 00.4s/30s + +running (0m03.0s), 100/100 VUs, 375 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.4s/30s + +running (0m04.0s), 100/100 VUs, 729 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 02.4s/30s + +running (0m05.0s), 100/100 VUs, 1074 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 03.4s/30s + +running (0m06.0s), 100/100 VUs, 1383 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.4s/30s + +running (0m07.0s), 100/100 VUs, 1766 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 05.4s/30s + +running (0m08.0s), 100/100 VUs, 2073 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 06.4s/30s + +running (0m09.0s), 100/100 VUs, 2406 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.4s/30s + +running (0m10.0s), 100/100 VUs, 2697 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 08.4s/30s + +running (0m11.0s), 100/100 VUs, 3004 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 09.4s/30s + +running (0m12.0s), 100/100 VUs, 3395 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.4s/30s + +running (0m13.0s), 100/100 VUs, 3701 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 11.4s/30s + +running (0m14.0s), 100/100 VUs, 4094 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 12.4s/30s + +running (0m15.0s), 100/100 VUs, 4467 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.4s/30s + +running (0m16.0s), 100/100 VUs, 4885 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 14.4s/30s + +running (0m17.0s), 100/100 VUs, 5359 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 15.4s/30s + +running (0m18.0s), 100/100 VUs, 5743 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.4s/30s + +running (0m19.0s), 100/100 VUs, 6167 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 17.4s/30s + +running (0m20.0s), 100/100 VUs, 6585 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 18.4s/30s + +running (0m21.0s), 100/100 VUs, 6943 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.4s/30s + +running (0m22.0s), 100/100 VUs, 7336 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 20.4s/30s + +running (0m23.0s), 100/100 VUs, 7679 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 21.4s/30s + +running (0m24.0s), 100/100 VUs, 8049 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.4s/30s + +running (0m25.0s), 100/100 VUs, 8362 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 23.4s/30s + +running (0m26.0s), 100/100 VUs, 8675 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 24.4s/30s + +running (0m27.0s), 100/100 VUs, 9037 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.4s/30s + +running (0m28.0s), 100/100 VUs, 9385 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 26.4s/30s + +running (0m29.0s), 100/100 VUs, 9741 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 27.4s/30s + +running (0m30.0s), 100/100 VUs, 10093 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.4s/30s + +running (0m31.0s), 100/100 VUs, 10413 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 29.4s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10709 336.961949/s + checks_succeeded...: 100.00% 10709 out of 10709 + checks_failed......: 0.00% 0 out of 10709 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=230.46ms min=45.12ms med=200.83ms max=3.43s p(90)=347.98ms p(95)=385.24ms + { expected_response:true }...: avg=230.46ms min=45.12ms med=200.83ms max=3.43s p(90)=347.98ms p(95)=385.24ms + http_req_failed................: 0.00% 0 out of 10710 + http_reqs......................: 10710 336.993414/s + + EXECUTION + iteration_duration.............: avg=280.84ms min=95.54ms med=251.35ms max=3.48s p(90)=398.48ms p(95)=435.68ms + iterations.....................: 10709 336.961949/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.5 MB 111 kB/s + data_sent......................: 4.9 MB 153 kB/s + + + + +running (0m31.8s), 000/100 VUs, 10709 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-100vu-warmup.json b/benchmarks/raw/pool_keepalive_batched-100vu-warmup.json new file mode 100644 index 0000000..1ce94e8 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10703, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + }, + "metrics": { + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration": { + "p(90)": 313.08321, + "p(95)": 340.87551, + "avg": 229.56973784566608, + "min": 44.9104, + "med": 220.6103, + "max": 4159.9056 + }, + "http_req_duration{expected_response:true}": { + "avg": 229.56973784566608, + "min": 44.9104, + "med": 220.6103, + "max": 4159.9056, + "p(90)": 313.08321, + "p(95)": 340.87551 + }, + "http_req_blocked": { + "med": 0, + "max": 90.384, + "p(90)": 0, + "p(95)": 0, + "avg": 0.071857567264574, + "min": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 10704, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_waiting": { + "p(90)": 313.07858, + "p(95)": 340.7927250000001, + "avg": 229.4549973561288, + "min": 33.9322, + "med": 220.46145, + "max": 4159.3759 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_reqs": { + "count": 10704, + "rate": 342.00301388238927 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_receiving": { + "avg": 0.08921206091180878, + "min": 0, + "med": 0, + "max": 54.8318, + "p(90)": 0.5305, + "p(95)": 0.5479 + }, + "data_received": { + "count": 3534302, + "rate": 112924.32137243611 + }, + "iteration_duration": { + "avg": 280.07858051948205, + "min": 99.2422, + "med": 271.1161, + "max": 4212.0988, + "p(90)": 363.43298000000004, + "p(95)": 391.40290999999985 + }, + "checks": { + "passes": 10703, + "fails": 0, + "value": 1 + }, + "http_req_connecting": { + "avg": 0.042334800074738416, + "min": 0, + "med": 0, + "max": 46.0351, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "avg": 0.025528428624813145, + "min": 0, + "med": 0, + "max": 37.1134, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 4860059, + "rate": 155283.52257532053 + }, + "iterations": { + "count": 10703, + "rate": 341.9710629281775 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-100vu-warmup.txt b/benchmarks/raw/pool_keepalive_batched-100vu-warmup.txt new file mode 100644 index 0000000..0159519 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 163 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.8s/30s + +running (0m03.0s), 100/100 VUs, 451 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.8s/30s + +running (0m04.0s), 100/100 VUs, 753 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.8s/30s + +running (0m05.0s), 100/100 VUs, 1088 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.8s/30s + +running (0m06.0s), 100/100 VUs, 1416 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.8s/30s + +running (0m07.0s), 100/100 VUs, 1756 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.8s/30s + +running (0m08.0s), 100/100 VUs, 2110 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.8s/30s + +running (0m09.0s), 100/100 VUs, 2486 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.8s/30s + +running (0m10.0s), 100/100 VUs, 2820 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.8s/30s + +running (0m11.0s), 100/100 VUs, 3144 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.8s/30s + +running (0m12.0s), 100/100 VUs, 3485 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.8s/30s + +running (0m13.0s), 100/100 VUs, 3887 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.8s/30s + +running (0m14.0s), 100/100 VUs, 4281 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.8s/30s + +running (0m15.0s), 100/100 VUs, 4692 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.8s/30s + +running (0m16.0s), 100/100 VUs, 5061 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.8s/30s + +running (0m17.0s), 100/100 VUs, 5435 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.8s/30s + +running (0m18.0s), 100/100 VUs, 5820 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.8s/30s + +running (0m19.0s), 100/100 VUs, 6174 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.8s/30s + +running (0m20.0s), 100/100 VUs, 6518 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.8s/30s + +running (0m21.0s), 100/100 VUs, 6908 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.8s/30s + +running (0m22.0s), 100/100 VUs, 7294 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.8s/30s + +running (0m23.0s), 100/100 VUs, 7713 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.8s/30s + +running (0m24.0s), 100/100 VUs, 8098 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.8s/30s + +running (0m25.0s), 100/100 VUs, 8519 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.8s/30s + +running (0m26.0s), 100/100 VUs, 8909 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.8s/30s + +running (0m27.0s), 100/100 VUs, 9185 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.8s/30s + +running (0m28.0s), 100/100 VUs, 9488 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.8s/30s + +running (0m29.0s), 100/100 VUs, 9836 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.8s/30s + +running (0m30.0s), 100/100 VUs, 10184 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.8s/30s + +running (0m31.0s), 100/100 VUs, 10549 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10703 341.971063/s + checks_succeeded...: 100.00% 10703 out of 10703 + checks_failed......: 0.00% 0 out of 10703 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=229.56ms min=44.91ms med=220.61ms max=4.15s p(90)=313.08ms p(95)=340.87ms + { expected_response:true }...: avg=229.56ms min=44.91ms med=220.61ms max=4.15s p(90)=313.08ms p(95)=340.87ms + http_req_failed................: 0.00% 0 out of 10704 + http_reqs......................: 10704 342.003014/s + + EXECUTION + iteration_duration.............: avg=280.07ms min=99.24ms med=271.11ms max=4.21s p(90)=363.43ms p(95)=391.4ms + iterations.....................: 10703 341.971063/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 3.5 MB 113 kB/s + data_sent......................: 4.9 MB 155 kB/s + + + + +running (0m31.3s), 000/100 VUs, 10703 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-20vu-run1.json b/benchmarks/raw/pool_keepalive_batched-20vu-run1.json new file mode 100644 index 0000000..f779b3f --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7186, + "fails": 0, + "name": "status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + }, + "metrics": { + "iteration_duration": { + "p(90)": 101.2668, + "p(95)": 109.01115, + "avg": 83.52725509323699, + "min": 55.2976, + "med": 82.3563, + "max": 220.0987 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_failed": { + "passes": 0, + "fails": 7187, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "avg": 33.07030805621252, + "min": 4.8215, + "med": 31.7206, + "max": 1125.2479, + "p(90)": 50.650020000000005, + "p(95)": 58.3297 + }, + "iterations": { + "count": 7186, + "rate": 230.054801000068 + }, + "http_req_duration": { + "p(95)": 58.41894, + "avg": 33.16820235146779, + "min": 4.8215, + "med": 31.8207, + "max": 1127.5117, + "p(90)": 50.69014000000001 + }, + "http_req_sending": { + "med": 0, + "max": 1.9561, + "p(90)": 0, + "p(95)": 0, + "avg": 0.007367677751495761, + "min": 0 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.01054778071518018, + "min": 0, + "med": 0, + "max": 34.0061 + }, + "checks": { + "fails": 0, + "passes": 7186, + "value": 1 + }, + "data_sent": { + "count": 3272793, + "rate": 104776.19570406563 + }, + "data_received": { + "count": 2436998, + "rate": 78018.79904363536 + }, + "http_req_connecting": { + "avg": 0.003146820648392931, + "min": 0, + "med": 0, + "max": 2.7084, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "p(95)": 0.5498, + "avg": 0.09052661750382635, + "min": 0, + "med": 0, + "max": 3.85, + "p(90)": 0.5320400000000001 + }, + "http_reqs": { + "count": 7187, + "rate": 230.0868153058014 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 50.69014000000001, + "p(95)": 58.41894, + "avg": 33.16820235146779, + "min": 4.8215, + "med": 31.8207, + "max": 1127.5117 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-20vu-run1.txt b/benchmarks/raw/pool_keepalive_batched-20vu-run1.txt new file mode 100644 index 0000000..ea05d53 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-20vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 173 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.8s/30s + +running (0m03.0s), 20/20 VUs, 398 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.8s/30s + +running (0m04.0s), 20/20 VUs, 643 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 02.8s/30s + +running (0m05.0s), 20/20 VUs, 889 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.8s/30s + +running (0m06.0s), 20/20 VUs, 1134 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.8s/30s + +running (0m07.0s), 20/20 VUs, 1392 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 05.8s/30s + +running (0m08.0s), 20/20 VUs, 1631 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.8s/30s + +running (0m09.0s), 20/20 VUs, 1871 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.8s/30s + +running (0m10.0s), 20/20 VUs, 2110 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 08.8s/30s + +running (0m11.0s), 20/20 VUs, 2302 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.8s/30s + +running (0m12.0s), 20/20 VUs, 2505 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.8s/30s + +running (0m13.0s), 20/20 VUs, 2755 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 11.8s/30s + +running (0m14.0s), 20/20 VUs, 2973 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.8s/30s + +running (0m15.0s), 20/20 VUs, 3219 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.8s/30s + +running (0m16.0s), 20/20 VUs, 3439 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 14.8s/30s + +running (0m17.0s), 20/20 VUs, 3663 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.8s/30s + +running (0m18.0s), 20/20 VUs, 3861 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.8s/30s + +running (0m19.0s), 20/20 VUs, 4098 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 17.8s/30s + +running (0m20.0s), 20/20 VUs, 4357 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.8s/30s + +running (0m21.0s), 20/20 VUs, 4616 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.8s/30s + +running (0m22.0s), 20/20 VUs, 4874 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 20.8s/30s + +running (0m23.0s), 20/20 VUs, 5130 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.8s/30s + +running (0m24.0s), 20/20 VUs, 5383 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.8s/30s + +running (0m25.0s), 20/20 VUs, 5622 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 23.8s/30s + +running (0m26.0s), 20/20 VUs, 5864 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.8s/30s + +running (0m27.0s), 20/20 VUs, 6110 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.8s/30s + +running (0m28.0s), 20/20 VUs, 6348 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 26.8s/30s + +running (0m29.0s), 20/20 VUs, 6608 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.8s/30s + +running (0m30.0s), 20/20 VUs, 6854 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.8s/30s + +running (0m31.0s), 20/20 VUs, 7117 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7186 230.054801/s + checks_succeeded...: 100.00% 7186 out of 7186 + checks_failed......: 0.00% 0 out of 7186 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=33.16ms min=4.82ms med=31.82ms max=1.12s p(90)=50.69ms p(95)=58.41ms + { expected_response:true }...: avg=33.16ms min=4.82ms med=31.82ms max=1.12s p(90)=50.69ms p(95)=58.41ms + http_req_failed................: 0.00% 0 out of 7187 + http_reqs......................: 7187 230.086815/s + + EXECUTION + iteration_duration.............: avg=83.52ms min=55.29ms med=82.35ms max=220.09ms p(90)=101.26ms p(95)=109.01ms + iterations.....................: 7186 230.054801/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.4 MB 78 kB/s + data_sent......................: 3.3 MB 105 kB/s + + + + +running (0m31.2s), 00/20 VUs, 7186 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-20vu-run2.json b/benchmarks/raw/pool_keepalive_batched-20vu-run2.json new file mode 100644 index 0000000..4ce83d5 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "avg": 0.09651369788846788, + "min": 0, + "med": 0, + "max": 4.4298, + "p(90)": 0.53333, + "p(95)": 0.5499299999999999 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 53.14210499999999, + "avg": 30.96258095560361, + "min": 7.5946, + "med": 30.03815, + "max": 994.4988, + "p(90)": 47.4408 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 30.5621, + "p(90)": 0, + "p(95)": 0, + "avg": 0.009376962642122361 + }, + "http_req_waiting": { + "med": 29.920099999999998, + "max": 993.405, + "p(90)": 47.35723, + "p(95)": 52.99876499999999, + "avg": 30.858182227937174, + "min": 7.1956 + }, + "data_sent": { + "rate": 108127.24665117658, + "count": 3364449 + }, + "http_req_failed": { + "fails": 7388, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "iteration_duration": { + "min": 58.1186, + "med": 80.5691, + "max": 166.571, + "p(90)": 97.99774000000002, + "p(95)": 103.59568999999999, + "avg": 81.33335792608655 + }, + "http_req_connecting": { + "avg": 0.0034703979426096375, + "min": 0, + "med": 0, + "max": 2.662, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_reqs": { + "count": 7388, + "rate": 237.4368279200822 + }, + "http_req_sending": { + "avg": 0.007885029778018405, + "min": 0, + "med": 0, + "max": 8.151, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 2499710, + "rate": 80336.11439091888 + }, + "checks": { + "passes": 7387, + "fails": 0, + "value": 1 + }, + "iterations": { + "count": 7387, + "rate": 237.40468974629766 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_duration": { + "avg": 30.96258095560361, + "min": 7.5946, + "med": 30.03815, + "max": 994.4988, + "p(90)": 47.4408, + "p(95)": 53.14210499999999 + } + }, + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7387 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-20vu-run2.txt b/benchmarks/raw/pool_keepalive_batched-20vu-run2.txt new file mode 100644 index 0000000..4574375 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-20vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 232 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 01.0s/30s + +running (0m03.0s), 20/20 VUs, 467 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.0s/30s + +running (0m04.0s), 20/20 VUs, 720 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.0s/30s + +running (0m05.0s), 20/20 VUs, 955 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 04.0s/30s + +running (0m06.0s), 20/20 VUs, 1178 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.0s/30s + +running (0m07.0s), 20/20 VUs, 1423 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.0s/30s + +running (0m08.0s), 20/20 VUs, 1645 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 07.0s/30s + +running (0m09.0s), 20/20 VUs, 1893 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m10.0s), 20/20 VUs, 2183 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.0s/30s + +running (0m11.0s), 20/20 VUs, 2401 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 10.0s/30s + +running (0m12.0s), 20/20 VUs, 2669 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m13.0s), 20/20 VUs, 2931 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m14.0s), 20/20 VUs, 3162 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m15.0s), 20/20 VUs, 3396 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.0s/30s + +running (0m16.0s), 20/20 VUs, 3674 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.0s/30s + +running (0m17.0s), 20/20 VUs, 3944 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m18.0s), 20/20 VUs, 4185 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.0s/30s + +running (0m19.0s), 20/20 VUs, 4441 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.0s/30s + +running (0m20.0s), 20/20 VUs, 4695 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 19.0s/30s + +running (0m21.0s), 20/20 VUs, 4939 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.0s/30s + +running (0m22.0s), 20/20 VUs, 5199 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.0s/30s + +running (0m23.0s), 20/20 VUs, 5430 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 22.0s/30s + +running (0m24.0s), 20/20 VUs, 5683 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.0s/30s + +running (0m25.0s), 20/20 VUs, 5934 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.0s/30s + +running (0m26.0s), 20/20 VUs, 6165 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 25.0s/30s + +running (0m27.0s), 20/20 VUs, 6406 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.0s/30s + +running (0m28.0s), 20/20 VUs, 6643 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m29.0s), 20/20 VUs, 6869 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m30.0s), 20/20 VUs, 7116 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m31.0s), 20/20 VUs, 7352 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7387 237.40469/s + checks_succeeded...: 100.00% 7387 out of 7387 + checks_failed......: 0.00% 0 out of 7387 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=30.96ms min=7.59ms med=30.03ms max=994.49ms p(90)=47.44ms p(95)=53.14ms + { expected_response:true }...: avg=30.96ms min=7.59ms med=30.03ms max=994.49ms p(90)=47.44ms p(95)=53.14ms + http_req_failed................: 0.00% 0 out of 7388 + http_reqs......................: 7388 237.436828/s + + EXECUTION + iteration_duration.............: avg=81.33ms min=58.11ms med=80.56ms max=166.57ms p(90)=97.99ms p(95)=103.59ms + iterations.....................: 7387 237.40469/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.5 MB 80 kB/s + data_sent......................: 3.4 MB 108 kB/s + + + + +running (0m31.1s), 00/20 VUs, 7387 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-20vu-run3.json b/benchmarks/raw/pool_keepalive_batched-20vu-run3.json new file mode 100644 index 0000000..1ab61c3 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_duration{expected_response:true}": { + "avg": 38.25010128280742, + "min": 5.1564, + "med": 33.6357, + "max": 1044.9206, + "p(90)": 54.44905000000001, + "p(95)": 66.14442499999998 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "iteration_duration": { + "avg": 88.62246176080251, + "min": 55.5697, + "med": 84.1218, + "max": 873.4733, + "p(90)": 105.2371, + "p(95)": 116.6562 + }, + "http_reqs": { + "count": 6782, + "rate": 217.51219341540877 + }, + "data_received": { + "rate": 74106.74425965693, + "count": 2310638 + }, + "checks": { + "passes": 6781, + "fails": 0, + "value": 1 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_blocked": { + "avg": 0.011208699498672958, + "min": 0, + "med": 0, + "max": 29.0536, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "med": 33.55655, + "max": 1042.8232, + "p(90)": 54.30469000000001, + "p(95)": 66.06827499999999, + "avg": 38.15220667944555, + "min": 5.1564 + }, + "http_req_sending": { + "max": 3.8819, + "p(90)": 0, + "p(95)": 0, + "avg": 0.00918109702152757, + "min": 0, + "med": 0 + }, + "http_req_duration": { + "avg": 38.25010128280742, + "min": 5.1564, + "med": 33.6357, + "max": 1044.9206, + "p(90)": 54.44905000000001, + "p(95)": 66.14442499999998 + }, + "http_req_receiving": { + "max": 5.8978, + "p(90)": 0.5299900000000001, + "p(95)": 0.549395, + "avg": 0.08871350634031264, + "min": 0, + "med": 0 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "data_sent": { + "count": 3088113, + "rate": 99041.90978245919 + }, + "iterations": { + "rate": 217.4801214317144, + "count": 6781 + }, + "http_req_connecting": { + "avg": 0.005075862577410795, + "min": 0, + "med": 0, + "max": 8.5252, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 6782, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + } + }, + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "passes": 6781, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-20vu-run3.txt b/benchmarks/raw/pool_keepalive_batched-20vu-run3.txt new file mode 100644 index 0000000..7e9011c --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-20vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 201 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m03.0s), 20/20 VUs, 425 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m04.0s), 20/20 VUs, 657 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m05.0s), 20/20 VUs, 910 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m06.0s), 20/20 VUs, 1160 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m07.0s), 20/20 VUs, 1398 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m08.0s), 20/20 VUs, 1623 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m09.0s), 20/20 VUs, 1855 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m10.0s), 20/20 VUs, 2096 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m11.0s), 20/20 VUs, 2308 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m12.0s), 20/20 VUs, 2563 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.9s/30s + +running (0m13.0s), 20/20 VUs, 2830 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m14.0s), 20/20 VUs, 3095 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m15.0s), 20/20 VUs, 3356 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m16.0s), 20/20 VUs, 3609 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m17.0s), 20/20 VUs, 3871 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m18.0s), 20/20 VUs, 4101 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m19.0s), 20/20 VUs, 4314 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m20.0s), 20/20 VUs, 4488 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m21.0s), 20/20 VUs, 4673 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m22.0s), 20/20 VUs, 4842 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m23.0s), 20/20 VUs, 5012 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m24.0s), 20/20 VUs, 5107 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m25.0s), 20/20 VUs, 5353 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m26.0s), 20/20 VUs, 5566 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m27.0s), 20/20 VUs, 5773 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m28.0s), 20/20 VUs, 6002 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m29.0s), 20/20 VUs, 6243 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m30.0s), 20/20 VUs, 6490 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m31.0s), 20/20 VUs, 6728 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6781 217.480121/s + checks_succeeded...: 100.00% 6781 out of 6781 + checks_failed......: 0.00% 0 out of 6781 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=38.25ms min=5.15ms med=33.63ms max=1.04s p(90)=54.44ms p(95)=66.14ms + { expected_response:true }...: avg=38.25ms min=5.15ms med=33.63ms max=1.04s p(90)=54.44ms p(95)=66.14ms + http_req_failed................: 0.00% 0 out of 6782 + http_reqs......................: 6782 217.512193/s + + EXECUTION + iteration_duration.............: avg=88.62ms min=55.56ms med=84.12ms max=873.47ms p(90)=105.23ms p(95)=116.65ms + iterations.....................: 6781 217.480121/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.3 MB 74 kB/s + data_sent......................: 3.1 MB 99 kB/s + + + + +running (0m31.2s), 00/20 VUs, 6781 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-20vu-warmup.json b/benchmarks/raw/pool_keepalive_batched-20vu-warmup.json new file mode 100644 index 0000000..cf95e13 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 7545, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 7546, + "rate": 244.83446169704362 + }, + "http_req_duration": { + "avg": 29.180080837529662, + "min": 5.3457, + "med": 27.8759, + "max": 725.5608, + "p(90)": 45.793850000000006, + "p(95)": 53.257825000000004 + }, + "http_req_receiving": { + "avg": 0.09005116618075804, + "min": 0, + "med": 0, + "max": 3.0096, + "p(90)": 0.532, + "p(95)": 0.5483750000000001 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_connecting": { + "max": 1.3094, + "p(90)": 0, + "p(95)": 0, + "avg": 0.002075987278028094, + "min": 0, + "med": 0 + }, + "http_req_waiting": { + "avg": 29.08284222104413, + "min": 5.3457, + "med": 27.8022, + "max": 725.0154, + "p(90)": 45.7284, + "p(95)": 53.11815 + }, + "data_sent": { + "rate": 111499.19071276243, + "count": 3436497 + }, + "iterations": { + "count": 7545, + "rate": 244.80201610180148 + }, + "vus_max": { + "min": 20, + "max": 20, + "value": 20 + }, + "data_received": { + "count": 2549006, + "rate": 82704.01694573738 + }, + "http_req_failed": { + "passes": 0, + "fails": 7546, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration{expected_response:true}": { + "avg": 29.180080837529662, + "min": 5.3457, + "med": 27.8759, + "max": 725.5608, + "p(90)": 45.793850000000006, + "p(95)": 53.257825000000004 + }, + "http_req_blocked": { + "med": 0, + "max": 25.1178, + "p(90)": 0, + "p(95)": 0, + "avg": 0.006550238536973234, + "min": 0 + }, + "http_req_sending": { + "max": 1.9851, + "p(90)": 0, + "p(95)": 0, + "avg": 0.007187450304797246, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "med": 78.3736, + "max": 202.1271, + "p(90)": 96.42838, + "p(95)": 103.8658, + "avg": 79.58148091451311, + "min": 55.6462 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7545 + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-20vu-warmup.txt b/benchmarks/raw/pool_keepalive_batched-20vu-warmup.txt new file mode 100644 index 0000000..93b0e4f --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-20vu-warmup.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 46 complete and 0 interrupted iterations +default [ 1% ] 20 VUs 00.2s/30s + +running (0m02.0s), 20/20 VUs, 243 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.2s/30s + +running (0m03.0s), 20/20 VUs, 492 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.2s/30s + +running (0m04.0s), 20/20 VUs, 731 complete and 0 interrupted iterations +default [ 11% ] 20 VUs 03.2s/30s + +running (0m05.0s), 20/20 VUs, 981 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.2s/30s + +running (0m06.0s), 20/20 VUs, 1250 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.2s/30s + +running (0m07.0s), 20/20 VUs, 1546 complete and 0 interrupted iterations +default [ 21% ] 20 VUs 06.2s/30s + +running (0m08.0s), 20/20 VUs, 1817 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.2s/30s + +running (0m09.0s), 20/20 VUs, 2103 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.2s/30s + +running (0m10.0s), 20/20 VUs, 2373 complete and 0 interrupted iterations +default [ 31% ] 20 VUs 09.2s/30s + +running (0m11.0s), 20/20 VUs, 2655 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.2s/30s + +running (0m12.0s), 20/20 VUs, 2887 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.2s/30s + +running (0m13.0s), 20/20 VUs, 3118 complete and 0 interrupted iterations +default [ 41% ] 20 VUs 12.2s/30s + +running (0m14.0s), 20/20 VUs, 3353 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.2s/30s + +running (0m15.0s), 20/20 VUs, 3610 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.2s/30s + +running (0m16.0s), 20/20 VUs, 3872 complete and 0 interrupted iterations +default [ 51% ] 20 VUs 15.2s/30s + +running (0m17.0s), 20/20 VUs, 4154 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.2s/30s + +running (0m18.0s), 20/20 VUs, 4407 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.2s/30s + +running (0m19.0s), 20/20 VUs, 4639 complete and 0 interrupted iterations +default [ 61% ] 20 VUs 18.2s/30s + +running (0m20.0s), 20/20 VUs, 4885 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.2s/30s + +running (0m21.0s), 20/20 VUs, 5104 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.2s/30s + +running (0m22.0s), 20/20 VUs, 5320 complete and 0 interrupted iterations +default [ 71% ] 20 VUs 21.2s/30s + +running (0m23.0s), 20/20 VUs, 5569 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.2s/30s + +running (0m24.0s), 20/20 VUs, 5811 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.2s/30s + +running (0m25.0s), 20/20 VUs, 6057 complete and 0 interrupted iterations +default [ 81% ] 20 VUs 24.2s/30s + +running (0m26.0s), 20/20 VUs, 6338 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.2s/30s + +running (0m27.0s), 20/20 VUs, 6584 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.2s/30s + +running (0m28.0s), 20/20 VUs, 6824 complete and 0 interrupted iterations +default [ 91% ] 20 VUs 27.2s/30s + +running (0m29.0s), 20/20 VUs, 7066 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.2s/30s + +running (0m30.0s), 20/20 VUs, 7319 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.2s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7545 244.802016/s + checks_succeeded...: 100.00% 7545 out of 7545 + checks_failed......: 0.00% 0 out of 7545 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=29.18ms min=5.34ms med=27.87ms max=725.56ms p(90)=45.79ms p(95)=53.25ms + { expected_response:true }...: avg=29.18ms min=5.34ms med=27.87ms max=725.56ms p(90)=45.79ms p(95)=53.25ms + http_req_failed................: 0.00% 0 out of 7546 + http_reqs......................: 7546 244.834462/s + + EXECUTION + iteration_duration.............: avg=79.58ms min=55.64ms med=78.37ms max=202.12ms p(90)=96.42ms p(95)=103.86ms + iterations.....................: 7545 244.802016/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 2.5 MB 83 kB/s + data_sent......................: 3.4 MB 112 kB/s + + + + +running (0m30.8s), 00/20 VUs, 7545 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-50vu-run1.json b/benchmarks/raw/pool_keepalive_batched-50vu-run1.json new file mode 100644 index 0000000..3a44abe --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10631, + "fails": 0 + } + } + }, + "metrics": { + "http_req_duration": { + "p(90)": 119.56188, + "p(95)": 131.968665, + "avg": 90.66831906508637, + "min": 13.2477, + "med": 87.75405, + "max": 1187.584 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "data_sent": { + "count": 4837413, + "rate": 154406.40326427805 + }, + "checks": { + "passes": 10631, + "fails": 0, + "value": 1 + }, + "http_req_blocked": { + "avg": 0.021001373212942064, + "min": 0, + "med": 0, + "max": 30.1622, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_waiting": { + "p(95)": 131.96321999999998, + "avg": 90.56553997366404, + "min": 13.2477, + "med": 87.67205, + "max": 1185.0216, + "p(90)": 119.53255 + }, + "http_req_failed": { + "passes": 0, + "fails": 10632, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_req_connecting": { + "avg": 0.012695494732881861, + "min": 0, + "med": 0, + "max": 7.6713, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.014545363054928533, + "min": 0, + "med": 0, + "max": 25.3009, + "p(90)": 0 + }, + "iteration_duration": { + "avg": 141.06972431568067, + "min": 63.379, + "med": 138.2603, + "max": 855.685, + "p(90)": 170.0812, + "p(95)": 182.5083 + }, + "iterations": { + "count": 10631, + "rate": 339.33312559885627 + }, + "http_reqs": { + "count": 10632, + "rate": 339.3650448092409 + }, + "http_req_receiving": { + "avg": 0.08823372836719343, + "min": 0, + "med": 0, + "max": 4.9441, + "p(90)": 0.5281, + "p(95)": 0.5485449999999998 + }, + "http_req_duration{expected_response:true}": { + "med": 87.75405, + "max": 1187.584, + "p(90)": 119.56188, + "p(95)": 131.968665, + "avg": 90.66831906508637, + "min": 13.2477 + }, + "data_received": { + "count": 3511838, + "rate": 112095.09595869026 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-50vu-run1.txt b/benchmarks/raw/pool_keepalive_batched-50vu-run1.txt new file mode 100644 index 0000000..50a6f0c --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-50vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 165 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m03.0s), 50/50 VUs, 508 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.7s/30s + +running (0m04.0s), 50/50 VUs, 820 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m05.0s), 50/50 VUs, 1102 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.7s/30s + +running (0m06.0s), 50/50 VUs, 1435 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m07.0s), 50/50 VUs, 1766 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.7s/30s + +running (0m08.0s), 50/50 VUs, 2082 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m09.0s), 50/50 VUs, 2392 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.8s/30s + +running (0m10.0s), 50/50 VUs, 2716 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.8s/30s + +running (0m11.0s), 50/50 VUs, 3055 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m12.0s), 50/50 VUs, 3349 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.7s/30s + +running (0m13.0s), 50/50 VUs, 3645 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.7s/30s + +running (0m14.0s), 50/50 VUs, 4025 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m15.0s), 50/50 VUs, 4401 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.7s/30s + +running (0m16.0s), 50/50 VUs, 4765 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m17.0s), 50/50 VUs, 5173 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.7s/30s + +running (0m18.0s), 50/50 VUs, 5604 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.7s/30s + +running (0m19.0s), 50/50 VUs, 5995 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m20.0s), 50/50 VUs, 6371 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.7s/30s + +running (0m21.0s), 50/50 VUs, 6751 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.8s/30s + +running (0m22.0s), 50/50 VUs, 7094 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m23.0s), 50/50 VUs, 7490 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m24.0s), 50/50 VUs, 7900 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m25.0s), 50/50 VUs, 8247 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.7s/30s + +running (0m26.0s), 50/50 VUs, 8634 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m27.0s), 50/50 VUs, 8998 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.7s/30s + +running (0m28.0s), 50/50 VUs, 9328 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.7s/30s + +running (0m29.0s), 50/50 VUs, 9686 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.7s/30s + +running (0m30.0s), 50/50 VUs, 10068 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m31.0s), 50/50 VUs, 10482 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10631 339.333126/s + checks_succeeded...: 100.00% 10631 out of 10631 + checks_failed......: 0.00% 0 out of 10631 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=90.66ms min=13.24ms med=87.75ms max=1.18s p(90)=119.56ms p(95)=131.96ms + { expected_response:true }...: avg=90.66ms min=13.24ms med=87.75ms max=1.18s p(90)=119.56ms p(95)=131.96ms + http_req_failed................: 0.00% 0 out of 10632 + http_reqs......................: 10632 339.365045/s + + EXECUTION + iteration_duration.............: avg=141.06ms min=63.37ms med=138.26ms max=855.68ms p(90)=170.08ms p(95)=182.5ms + iterations.....................: 10631 339.333126/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.5 MB 112 kB/s + data_sent......................: 4.8 MB 154 kB/s + + + + +running (0m31.3s), 00/50 VUs, 10631 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-50vu-run2.json b/benchmarks/raw/pool_keepalive_batched-50vu-run2.json new file mode 100644 index 0000000..36c0845 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 10574, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + } + }, + "metrics": { + "http_reqs": { + "count": 10575, + "rate": 337.1999985421481 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 6.7433, + "p(90)": 0.5339, + "p(95)": 0.5516, + "avg": 0.09507526241134762 + }, + "http_req_waiting": { + "med": 88.7929, + "max": 1217.2107, + "p(90)": 117.49816000000001, + "p(95)": 129.90344999999996, + "avg": 91.27342680851041, + "min": 22.8794 + }, + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 64.2502, + "p(90)": 0, + "p(95)": 0, + "avg": 0.022713191489361708 + }, + "http_req_sending": { + "avg": 0.007969522458628836, + "min": 0, + "med": 0, + "max": 8.5543, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "med": 139.36124999999998, + "max": 732.877, + "p(90)": 168.18057000000002, + "p(95)": 180.505085, + "avg": 141.76782702856073, + "min": 73.2825 + }, + "checks": { + "passes": 10574, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "passes": 0, + "fails": 10575, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "iterations": { + "count": 10574, + "rate": 337.1681120174633 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.017177995271867613, + "min": 0, + "med": 0, + "max": 60.2351 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 117.65666, + "p(95)": 130.05116999999998, + "avg": 91.37647159338056, + "min": 22.8794, + "med": 88.8672, + "max": 1220.9045 + }, + "http_req_duration": { + "avg": 91.37647159338056, + "min": 22.8794, + "med": 88.8672, + "max": 1220.9045, + "p(90)": 117.65666, + "p(95)": 130.05116999999998 + }, + "data_received": { + "rate": 111413.23912115241, + "count": 3494054 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 4811421, + "rate": 153419.49448564168 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-50vu-run2.txt b/benchmarks/raw/pool_keepalive_batched-50vu-run2.txt new file mode 100644 index 0000000..c5fe123 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 150 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.7s/30s + +running (0m03.0s), 50/50 VUs, 461 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.7s/30s + +running (0m04.0s), 50/50 VUs, 820 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.7s/30s + +running (0m05.0s), 50/50 VUs, 1164 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.7s/30s + +running (0m06.0s), 50/50 VUs, 1531 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.7s/30s + +running (0m07.0s), 50/50 VUs, 1878 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.7s/30s + +running (0m08.0s), 50/50 VUs, 2235 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.7s/30s + +running (0m09.0s), 50/50 VUs, 2592 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.7s/30s + +running (0m10.0s), 50/50 VUs, 2899 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.7s/30s + +running (0m11.0s), 50/50 VUs, 3203 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.7s/30s + +running (0m12.0s), 50/50 VUs, 3593 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.7s/30s + +running (0m13.0s), 50/50 VUs, 3967 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.7s/30s + +running (0m14.0s), 50/50 VUs, 4365 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.7s/30s + +running (0m15.0s), 50/50 VUs, 4765 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.7s/30s + +running (0m16.0s), 50/50 VUs, 5145 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.7s/30s + +running (0m17.0s), 50/50 VUs, 5498 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.7s/30s + +running (0m18.0s), 50/50 VUs, 5858 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.7s/30s + +running (0m19.0s), 50/50 VUs, 6201 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.7s/30s + +running (0m20.0s), 50/50 VUs, 6608 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.7s/30s + +running (0m21.0s), 50/50 VUs, 6931 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.7s/30s + +running (0m22.0s), 50/50 VUs, 7268 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.7s/30s + +running (0m23.0s), 50/50 VUs, 7621 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.7s/30s + +running (0m24.0s), 50/50 VUs, 8009 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.7s/30s + +running (0m25.0s), 50/50 VUs, 8335 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.7s/30s + +running (0m26.0s), 50/50 VUs, 8651 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.7s/30s + +running (0m27.0s), 50/50 VUs, 8996 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.7s/30s + +running (0m28.0s), 50/50 VUs, 9315 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.7s/30s + +running (0m29.0s), 50/50 VUs, 9696 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.7s/30s + +running (0m30.0s), 50/50 VUs, 10078 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.7s/30s + +running (0m31.0s), 50/50 VUs, 10428 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10574 337.168112/s + checks_succeeded...: 100.00% 10574 out of 10574 + checks_failed......: 0.00% 0 out of 10574 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=91.37ms min=22.87ms med=88.86ms max=1.22s p(90)=117.65ms p(95)=130.05ms + { expected_response:true }...: avg=91.37ms min=22.87ms med=88.86ms max=1.22s p(90)=117.65ms p(95)=130.05ms + http_req_failed................: 0.00% 0 out of 10575 + http_reqs......................: 10575 337.199999/s + + EXECUTION + iteration_duration.............: avg=141.76ms min=73.28ms med=139.36ms max=732.87ms p(90)=168.18ms p(95)=180.5ms + iterations.....................: 10574 337.168112/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.5 MB 111 kB/s + data_sent......................: 4.8 MB 153 kB/s + + + + +running (0m31.4s), 00/50 VUs, 10574 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-50vu-run3.json b/benchmarks/raw/pool_keepalive_batched-50vu-run3.json new file mode 100644 index 0000000..742b99a --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "data_sent": { + "count": 4786797, + "rate": 153222.59655211875 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 12.7822, + "p(90)": 0, + "p(95)": 0, + "avg": 0.011432116718943062 + }, + "data_received": { + "count": 3477206, + "rate": 111303.34795200353 + }, + "http_reqs": { + "count": 10521, + "rate": 336.7711098517112 + }, + "http_req_waiting": { + "min": 18.9003, + "med": 89.8317, + "max": 1034.7449, + "p(90)": 119.0277, + "p(95)": 131.4296, + "avg": 92.28494217279707 + }, + "checks": { + "passes": 10520, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "passes": 0, + "fails": 10521, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "avg": 0.0108249120806007, + "min": 0, + "med": 0, + "max": 10.0839, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + }, + "iterations": { + "count": 10520, + "rate": 336.739100431518 + }, + "http_req_blocked": { + "avg": 0.016366134397870918, + "min": 0, + "med": 0, + "max": 33.0462, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 131.6109, + "avg": 92.38597161866723, + "min": 18.9003, + "med": 89.9344, + "max": 1036.9925, + "p(90)": 119.0781 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_duration": { + "p(95)": 131.6109, + "avg": 92.38597161866723, + "min": 18.9003, + "med": 89.9344, + "max": 1036.9925, + "p(90)": 119.0781 + }, + "iteration_duration": { + "p(90)": 169.63225, + "p(95)": 182.11927, + "avg": 142.80025545627362, + "min": 69.0594, + "med": 140.4054, + "max": 689.1132 + }, + "http_req_receiving": { + "med": 0, + "max": 2.7073, + "p(90)": 0.5302, + "p(95)": 0.5499, + "avg": 0.08959732915122143, + "min": 0 + } + }, + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10520, + "fails": 0 + } + }, + "name": "" + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-50vu-run3.txt b/benchmarks/raw/pool_keepalive_batched-50vu-run3.txt new file mode 100644 index 0000000..4f12f7a --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 249 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.9s/30s + +running (0m03.0s), 50/50 VUs, 606 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.9s/30s + +running (0m04.0s), 50/50 VUs, 983 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 02.9s/30s + +running (0m05.0s), 50/50 VUs, 1339 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.9s/30s + +running (0m06.0s), 50/50 VUs, 1687 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.9s/30s + +running (0m07.0s), 50/50 VUs, 2015 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m08.0s), 50/50 VUs, 2341 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.9s/30s + +running (0m09.0s), 50/50 VUs, 2625 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m10.0s), 50/50 VUs, 2952 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m11.0s), 50/50 VUs, 3237 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.9s/30s + +running (0m12.0s), 50/50 VUs, 3590 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.9s/30s + +running (0m13.0s), 50/50 VUs, 3950 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 11.9s/30s + +running (0m14.0s), 50/50 VUs, 4305 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.9s/30s + +running (0m15.0s), 50/50 VUs, 4647 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.9s/30s + +running (0m16.0s), 50/50 VUs, 5020 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 14.9s/30s + +running (0m17.0s), 50/50 VUs, 5349 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.9s/30s + +running (0m18.0s), 50/50 VUs, 5767 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m19.0s), 50/50 VUs, 6103 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 17.9s/30s + +running (0m20.0s), 50/50 VUs, 6461 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.9s/30s + +running (0m21.0s), 50/50 VUs, 6818 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m22.0s), 50/50 VUs, 7122 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 20.9s/30s + +running (0m23.0s), 50/50 VUs, 7464 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.9s/30s + +running (0m24.0s), 50/50 VUs, 7818 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.9s/30s + +running (0m25.0s), 50/50 VUs, 8195 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 23.9s/30s + +running (0m26.0s), 50/50 VUs, 8594 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.9s/30s + +running (0m27.0s), 50/50 VUs, 8983 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m28.0s), 50/50 VUs, 9362 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m29.0s), 50/50 VUs, 9728 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m30.0s), 50/50 VUs, 10055 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.9s/30s + +running (0m31.0s), 50/50 VUs, 10431 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10520 336.7391/s + checks_succeeded...: 100.00% 10520 out of 10520 + checks_failed......: 0.00% 0 out of 10520 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=92.38ms min=18.9ms med=89.93ms max=1.03s p(90)=119.07ms p(95)=131.61ms + { expected_response:true }...: avg=92.38ms min=18.9ms med=89.93ms max=1.03s p(90)=119.07ms p(95)=131.61ms + http_req_failed................: 0.00% 0 out of 10521 + http_reqs......................: 10521 336.77111/s + + EXECUTION + iteration_duration.............: avg=142.8ms min=69.05ms med=140.4ms max=689.11ms p(90)=169.63ms p(95)=182.11ms + iterations.....................: 10520 336.7391/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.5 MB 111 kB/s + data_sent......................: 4.8 MB 153 kB/s + + + + +running (0m31.2s), 00/50 VUs, 10520 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_batched-50vu-warmup.json b/benchmarks/raw/pool_keepalive_batched-50vu-warmup.json new file mode 100644 index 0000000..1f02dd6 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_sending": { + "avg": 0.01116362474186252, + "min": 0, + "med": 0, + "max": 23.5382, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 4626285, + "rate": 148197.582977133 + }, + "http_reqs": { + "rate": 325.75192001670143, + "count": 10169 + }, + "http_req_receiving": { + "avg": 0.08997937850329443, + "min": 0, + "med": 0, + "max": 6.0498, + "p(90)": 0.5291, + "p(95)": 0.5491 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.013721280361884157, + "min": 0, + "med": 0, + "max": 44.2239, + "p(90)": 0 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "checks": { + "passes": 10168, + "fails": 0, + "value": 1 + }, + "http_req_duration{expected_response:true}": { + "max": 1064.3868, + "p(90)": 132.31498000000002, + "p(95)": 147.67228, + "avg": 97.15665112597118, + "min": 12.6091, + "med": 93.0543 + }, + "iterations": { + "count": 10168, + "rate": 325.7198861962651 + }, + "http_req_waiting": { + "p(95)": 147.63426, + "avg": 97.05550812272587, + "min": 12.6091, + "med": 92.9515, + "max": 1063.3025, + "p(90)": 132.19636 + }, + "data_received": { + "rate": 107870.11032841774, + "count": 3367382 + }, + "http_req_duration": { + "avg": 97.15665112597118, + "min": 12.6091, + "med": 93.0543, + "max": 1064.3868, + "p(90)": 132.31498000000002, + "p(95)": 147.67228 + }, + "http_req_failed": { + "passes": 0, + "fails": 10169, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "avg": 0.004301652079850528, + "min": 0, + "med": 0, + "max": 3.1557, + "p(90)": 0, + "p(95)": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "iteration_duration": { + "min": 63.6509, + "med": 143.52339999999998, + "max": 519.8891, + "p(90)": 182.8991, + "p(95)": 198.287385, + "avg": 147.59334087332803 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 10168, + "fails": 0 + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive_batched-50vu-warmup.txt b/benchmarks/raw/pool_keepalive_batched-50vu-warmup.txt new file mode 100644 index 0000000..a122cd0 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_batched-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 256 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.9s/30s + +running (0m03.0s), 50/50 VUs, 657 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.9s/30s + +running (0m04.0s), 50/50 VUs, 963 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 02.9s/30s + +running (0m05.0s), 50/50 VUs, 1321 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.9s/30s + +running (0m06.0s), 50/50 VUs, 1650 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.9s/30s + +running (0m07.0s), 50/50 VUs, 1933 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m08.0s), 50/50 VUs, 2293 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.9s/30s + +running (0m09.0s), 50/50 VUs, 2650 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m10.0s), 50/50 VUs, 3028 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m11.0s), 50/50 VUs, 3430 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.9s/30s + +running (0m12.0s), 50/50 VUs, 3815 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.9s/30s + +running (0m13.0s), 50/50 VUs, 4137 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 11.9s/30s + +running (0m14.0s), 50/50 VUs, 4437 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.9s/30s + +running (0m15.0s), 50/50 VUs, 4709 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.9s/30s + +running (0m16.0s), 50/50 VUs, 4954 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 14.9s/30s + +running (0m17.0s), 50/50 VUs, 5227 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.9s/30s + +running (0m18.0s), 50/50 VUs, 5550 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m19.0s), 50/50 VUs, 5904 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 17.9s/30s + +running (0m20.0s), 50/50 VUs, 6253 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.9s/30s + +running (0m21.0s), 50/50 VUs, 6608 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m22.0s), 50/50 VUs, 6925 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 20.9s/30s + +running (0m23.0s), 50/50 VUs, 7223 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.9s/30s + +running (0m24.0s), 50/50 VUs, 7511 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.9s/30s + +running (0m25.0s), 50/50 VUs, 7875 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 23.9s/30s + +running (0m26.0s), 50/50 VUs, 8214 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.9s/30s + +running (0m27.0s), 50/50 VUs, 8609 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m28.0s), 50/50 VUs, 8951 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m29.0s), 50/50 VUs, 9349 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m30.0s), 50/50 VUs, 9707 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.9s/30s + +running (0m31.0s), 50/50 VUs, 10063 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 10168 325.719886/s + checks_succeeded...: 100.00% 10168 out of 10168 + checks_failed......: 0.00% 0 out of 10168 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=97.15ms min=12.6ms med=93.05ms max=1.06s p(90)=132.31ms p(95)=147.67ms + { expected_response:true }...: avg=97.15ms min=12.6ms med=93.05ms max=1.06s p(90)=132.31ms p(95)=147.67ms + http_req_failed................: 0.00% 0 out of 10169 + http_reqs......................: 10169 325.75192/s + + EXECUTION + iteration_duration.............: avg=147.59ms min=63.65ms med=143.52ms max=519.88ms p(90)=182.89ms p(95)=198.28ms + iterations.....................: 10168 325.719886/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 3.4 MB 108 kB/s + data_sent......................: 4.6 MB 148 kB/s + + + + +running (0m31.2s), 00/50 VUs, 10168 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-100vu-run1.json b/benchmarks/raw/pool_keepalive_optimized-100vu-run1.json new file mode 100644 index 0000000..ad6fff3 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration": { + "avg": 351.9297583634171, + "min": 7.1345, + "med": 274.7672, + "max": 7933.8755, + "p(90)": 553.0415, + "p(95)": 729.1731399999999 + }, + "http_req_sending": { + "max": 11.8905, + "p(90)": 0, + "p(95)": 0, + "avg": 0.03815734723893574, + "min": 0, + "med": 0 + }, + "iterations": { + "count": 7478, + "rate": 246.98263465359972 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "checks": { + "passes": 7478, + "fails": 0, + "value": 1 + }, + "iteration_duration": { + "min": 90.8384, + "med": 325.63335, + "max": 8020.042, + "p(90)": 604.0305700000001, + "p(95)": 779.5754299999999, + "avg": 402.97550608451274 + }, + "data_sent": { + "count": 3469959, + "rate": 114605.45813853575 + }, + "http_req_waiting": { + "med": 274.6814, + "max": 7933.8755, + "p(90)": 553.0415, + "p(95)": 729.1731399999999, + "avg": 351.7967759994651, + "min": 7.1345 + }, + "http_req_receiving": { + "max": 4.8127, + "p(90)": 0.5379, + "p(95)": 0.5531399999999999, + "avg": 0.09482501671346401, + "min": 0, + "med": 0 + }, + "http_req_connecting": { + "max": 36.3184, + "p(90)": 0, + "p(95)": 0, + "avg": 0.17103755849712526, + "min": 0, + "med": 0 + }, + "vus": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration{expected_response:true}": { + "avg": 351.9297583634171, + "min": 7.1345, + "med": 274.7672, + "max": 7933.8755, + "p(90)": 553.0415, + "p(95)": 729.1731399999999 + }, + "http_reqs": { + "count": 7479, + "rate": 247.01566255339293 + }, + "http_req_blocked": { + "avg": 0.19684848241743544, + "min": 0, + "med": 0, + "max": 49.2466, + "p(90)": 0, + "p(95)": 0 + }, + "data_received": { + "count": 2333612, + "rate": 77074.30329222468 + }, + "http_req_failed": { + "passes": 0, + "fails": 7479, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + } + }, + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 7478, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "", + "path": "" + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-100vu-run1.txt b/benchmarks/raw/pool_keepalive_optimized-100vu-run1.txt new file mode 100644 index 0000000..1bba62c --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-100vu-run1.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 182 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.9s/30s + +running (0m02.0s), 100/100 VUs, 411 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.9s/30s + +running (0m03.0s), 100/100 VUs, 655 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 02.9s/30s + +running (0m04.0s), 100/100 VUs, 890 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.9s/30s + +running (0m05.0s), 100/100 VUs, 1079 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.9s/30s + +running (0m06.0s), 100/100 VUs, 1255 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 05.9s/30s + +running (0m07.0s), 100/100 VUs, 1401 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.9s/30s + +running (0m08.0s), 100/100 VUs, 1676 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.9s/30s + +running (0m09.0s), 100/100 VUs, 1933 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 08.9s/30s + +running (0m10.0s), 100/100 VUs, 2242 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.9s/30s + +running (0m11.0s), 100/100 VUs, 2485 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.9s/30s + +running (0m12.0s), 100/100 VUs, 2725 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 11.9s/30s + +running (0m13.0s), 100/100 VUs, 2981 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.9s/30s + +running (0m14.0s), 100/100 VUs, 3183 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.9s/30s + +running (0m15.0s), 100/100 VUs, 3376 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 14.9s/30s + +running (0m16.0s), 100/100 VUs, 3637 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.9s/30s + +running (0m17.0s), 100/100 VUs, 3885 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.9s/30s + +running (0m18.0s), 100/100 VUs, 4142 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 17.9s/30s + +running (0m19.0s), 100/100 VUs, 4246 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.9s/30s + +running (0m20.0s), 100/100 VUs, 4350 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.9s/30s + +running (0m21.0s), 100/100 VUs, 4424 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 20.9s/30s + +running (0m22.0s), 100/100 VUs, 4674 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.9s/30s + +running (0m23.0s), 100/100 VUs, 5030 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.9s/30s + +running (0m24.0s), 100/100 VUs, 5281 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 23.9s/30s + +running (0m25.0s), 100/100 VUs, 5646 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.9s/30s + +running (0m26.0s), 100/100 VUs, 6031 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.9s/30s + +running (0m27.0s), 100/100 VUs, 6410 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 26.9s/30s + +running (0m28.0s), 100/100 VUs, 6782 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.9s/30s + +running (0m29.0s), 100/100 VUs, 7059 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.9s/30s + +running (0m30.0s), 100/100 VUs, 7353 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7478 246.982635/s + checks_succeeded...: 100.00% 7478 out of 7478 + checks_failed......: 0.00% 0 out of 7478 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=351.92ms min=7.13ms med=274.76ms max=7.93s p(90)=553.04ms p(95)=729.17ms + { expected_response:true }...: avg=351.92ms min=7.13ms med=274.76ms max=7.93s p(90)=553.04ms p(95)=729.17ms + http_req_failed................: 0.00% 0 out of 7479 + http_reqs......................: 7479 247.015663/s + + EXECUTION + iteration_duration.............: avg=402.97ms min=90.83ms med=325.63ms max=8.02s p(90)=604.03ms p(95)=779.57ms + iterations.....................: 7478 246.982635/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.3 MB 77 kB/s + data_sent......................: 3.5 MB 115 kB/s + + + + +running (0m30.3s), 000/100 VUs, 7478 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-100vu-run2.json b/benchmarks/raw/pool_keepalive_optimized-100vu-run2.json new file mode 100644 index 0000000..3fd5272 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_connecting": { + "p(95)": 0, + "avg": 0.04942375333614269, + "min": 0, + "med": 0, + "max": 10.3123, + "p(90)": 0 + }, + "iteration_duration": { + "med": 381.8275, + "max": 6606.8424, + "p(90)": 616.10905, + "p(95)": 743.8004399999999, + "avg": 424.3118801208202, + "min": 74.8178 + }, + "data_sent": { + "count": 3302919, + "rate": 108697.11413866197 + }, + "data_received": { + "count": 2221292, + "rate": 73101.40819659723 + }, + "iterations": { + "count": 7118, + "rate": 234.24917730013843 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 686.0040199999997, + "avg": 373.1798993257483, + "min": 6.271, + "med": 330.8776, + "max": 6547.6992, + "p(90)": 564.3413599999997 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_blocked": { + "avg": 0.06583659221800815, + "min": 0, + "med": 0, + "max": 37.5474, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 7118, + "fails": 0, + "value": 1 + }, + "http_req_waiting": { + "avg": 373.02967751088676, + "min": 5.2367, + "med": 330.7582, + "max": 6547.6992, + "p(90)": 564.2966399999997, + "p(95)": 685.2995 + }, + "vus": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_failed": { + "passes": 0, + "fails": 7119, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_sending": { + "p(95)": 0, + "avg": 0.04733934541368172, + "min": 0, + "med": 0, + "max": 10.5563, + "p(90)": 0 + }, + "http_req_receiving": { + "p(90)": 0.54212, + "p(95)": 0.5617499999999997, + "avg": 0.10288246944795616, + "min": 0, + "med": 0, + "max": 2.9445 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_reqs": { + "rate": 234.28208670970574, + "count": 7119 + }, + "http_req_duration": { + "max": 6547.6992, + "p(90)": 564.3413599999997, + "p(95)": 686.0040199999997, + "avg": 373.1798993257483, + "min": 6.271, + "med": 330.8776 + } + }, + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 7118, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "", + "path": "" + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-100vu-run2.txt b/benchmarks/raw/pool_keepalive_optimized-100vu-run2.txt new file mode 100644 index 0000000..3fe02ce --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-100vu-run2.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 205 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.9s/30s + +running (0m02.0s), 100/100 VUs, 471 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.9s/30s + +running (0m03.0s), 100/100 VUs, 771 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 02.9s/30s + +running (0m04.0s), 100/100 VUs, 1082 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.9s/30s + +running (0m05.0s), 100/100 VUs, 1327 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.9s/30s + +running (0m06.0s), 100/100 VUs, 1585 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 05.9s/30s + +running (0m07.0s), 100/100 VUs, 1836 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.9s/30s + +running (0m08.0s), 100/100 VUs, 2122 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.9s/30s + +running (0m09.0s), 100/100 VUs, 2386 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 08.9s/30s + +running (0m10.0s), 100/100 VUs, 2651 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.9s/30s + +running (0m11.0s), 100/100 VUs, 2905 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.9s/30s + +running (0m12.0s), 100/100 VUs, 3144 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 11.9s/30s + +running (0m13.0s), 100/100 VUs, 3377 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.9s/30s + +running (0m14.0s), 100/100 VUs, 3545 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.9s/30s + +running (0m15.0s), 100/100 VUs, 3676 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 14.9s/30s + +running (0m16.0s), 100/100 VUs, 3798 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.9s/30s + +running (0m17.0s), 100/100 VUs, 4075 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.9s/30s + +running (0m18.0s), 100/100 VUs, 4243 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 17.9s/30s + +running (0m19.0s), 100/100 VUs, 4531 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.9s/30s + +running (0m20.0s), 100/100 VUs, 4679 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.9s/30s + +running (0m21.0s), 100/100 VUs, 4966 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 20.9s/30s + +running (0m22.0s), 100/100 VUs, 5255 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.9s/30s + +running (0m23.0s), 100/100 VUs, 5457 complete and 0 interrupted iterations +default [ 77% ] 100 VUs 23.0s/30s + +running (0m24.0s), 100/100 VUs, 5646 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 23.9s/30s + +running (0m25.0s), 100/100 VUs, 5828 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.9s/30s + +running (0m26.0s), 100/100 VUs, 6008 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.9s/30s + +running (0m27.0s), 100/100 VUs, 6218 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 26.9s/30s + +running (0m28.0s), 100/100 VUs, 6445 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.9s/30s + +running (0m29.0s), 100/100 VUs, 6677 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.9s/30s + +running (0m30.0s), 100/100 VUs, 6990 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7118 234.249177/s + checks_succeeded...: 100.00% 7118 out of 7118 + checks_failed......: 0.00% 0 out of 7118 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=373.17ms min=6.27ms med=330.87ms max=6.54s p(90)=564.34ms p(95)=686ms + { expected_response:true }...: avg=373.17ms min=6.27ms med=330.87ms max=6.54s p(90)=564.34ms p(95)=686ms + http_req_failed................: 0.00% 0 out of 7119 + http_reqs......................: 7119 234.282087/s + + EXECUTION + iteration_duration.............: avg=424.31ms min=74.81ms med=381.82ms max=6.6s p(90)=616.1ms p(95)=743.8ms + iterations.....................: 7118 234.249177/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.2 MB 73 kB/s + data_sent......................: 3.3 MB 109 kB/s + + + + +running (0m30.4s), 000/100 VUs, 7118 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-100vu-run3.json b/benchmarks/raw/pool_keepalive_optimized-100vu-run3.json new file mode 100644 index 0000000..9939829 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "groups": {}, + "checks": { + "status is 200": { + "passes": 5250, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + }, + "metrics": { + "http_req_connecting": { + "max": 48.2255, + "p(90)": 0, + "p(95)": 0, + "avg": 0.1590082270043801, + "min": 0, + "med": 0 + }, + "iterations": { + "count": 5250, + "rate": 172.1842943404518 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 12.5941, + "p(90)": 0.5422, + "p(95)": 0.5709, + "avg": 0.12300773186059802 + }, + "iteration_duration": { + "max": 6817.5114, + "p(90)": 671.4050400000001, + "p(95)": 924.4348300000001, + "avg": 576.1112263428572, + "min": 107.3515, + "med": 414.6801 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "data_sent": { + "count": 2436167, + "rate": 79898.98967438008 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "http_req_duration{expected_response:true}": { + "avg": 524.1224986288331, + "min": 8.9558, + "med": 363.4109, + "max": 6751.5007, + "p(90)": 617.8504, + "p(95)": 870.1356 + }, + "http_req_sending": { + "med": 0, + "max": 25.0245, + "p(90)": 0, + "p(95)": 0.3526, + "avg": 0.0658497809940964, + "min": 0 + }, + "data_received": { + "count": 1638476, + "rate": 53737.11121024116 + }, + "checks": { + "fails": 0, + "passes": 5250, + "value": 1 + }, + "http_reqs": { + "count": 5251, + "rate": 172.21709134889758 + }, + "http_req_failed": { + "fails": 5251, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.23883005141877747, + "min": 0, + "med": 0, + "max": 102.1601 + }, + "http_req_waiting": { + "p(95)": 870.1356, + "avg": 523.9336411159784, + "min": 7.4839, + "med": 363.2002, + "max": 6751.5007, + "p(90)": 617.8504 + }, + "http_req_duration": { + "avg": 524.1224986288331, + "min": 8.9558, + "med": 363.4109, + "max": 6751.5007, + "p(90)": 617.8504, + "p(95)": 870.1356 + }, + "vus": { + "value": 100, + "min": 100, + "max": 100 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-100vu-run3.txt b/benchmarks/raw/pool_keepalive_optimized-100vu-run3.txt new file mode 100644 index 0000000..9b99271 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-100vu-run3.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 116 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.8s/30s + +running (0m02.0s), 100/100 VUs, 369 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.8s/30s + +running (0m03.0s), 100/100 VUs, 624 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.8s/30s + +running (0m04.0s), 100/100 VUs, 859 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.8s/30s + +running (0m05.0s), 100/100 VUs, 1088 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.8s/30s + +running (0m06.0s), 100/100 VUs, 1246 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.8s/30s + +running (0m07.0s), 100/100 VUs, 1534 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.8s/30s + +running (0m08.0s), 100/100 VUs, 1712 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.8s/30s + +running (0m09.0s), 100/100 VUs, 1926 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.8s/30s + +running (0m10.0s), 100/100 VUs, 2084 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.8s/30s + +running (0m11.0s), 100/100 VUs, 2299 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.8s/30s + +running (0m12.0s), 100/100 VUs, 2494 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.8s/30s + +running (0m13.0s), 100/100 VUs, 2706 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.8s/30s + +running (0m14.0s), 100/100 VUs, 2936 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.8s/30s + +running (0m15.0s), 100/100 VUs, 3175 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.8s/30s + +running (0m16.0s), 100/100 VUs, 3403 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.8s/30s + +running (0m17.0s), 100/100 VUs, 3612 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.8s/30s + +running (0m18.0s), 100/100 VUs, 3844 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.8s/30s + +running (0m19.0s), 100/100 VUs, 4063 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.8s/30s + +running (0m20.0s), 100/100 VUs, 4233 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.8s/30s + +running (0m21.0s), 100/100 VUs, 4425 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.8s/30s + +running (0m22.0s), 100/100 VUs, 4718 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.8s/30s + +running (0m23.0s), 100/100 VUs, 4955 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.8s/30s + +running (0m24.0s), 100/100 VUs, 4955 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.8s/30s + +running (0m25.0s), 100/100 VUs, 4955 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.8s/30s + +running (0m26.0s), 100/100 VUs, 4955 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.8s/30s + +running (0m27.0s), 100/100 VUs, 4984 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.8s/30s + +running (0m28.0s), 100/100 VUs, 4985 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.8s/30s + +running (0m29.0s), 100/100 VUs, 4985 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.8s/30s + +running (0m30.0s), 100/100 VUs, 5133 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5250 172.184294/s + checks_succeeded...: 100.00% 5250 out of 5250 + checks_failed......: 0.00% 0 out of 5250 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=524.12ms min=8.95ms med=363.41ms max=6.75s p(90)=617.85ms p(95)=870.13ms + { expected_response:true }...: avg=524.12ms min=8.95ms med=363.41ms max=6.75s p(90)=617.85ms p(95)=870.13ms + http_req_failed................: 0.00% 0 out of 5251 + http_reqs......................: 5251 172.217091/s + + EXECUTION + iteration_duration.............: avg=576.11ms min=107.35ms med=414.68ms max=6.81s p(90)=671.4ms p(95)=924.43ms + iterations.....................: 5250 172.184294/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 1.6 MB 54 kB/s + data_sent......................: 2.4 MB 80 kB/s + + + + +running (0m30.5s), 000/100 VUs, 5250 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-100vu-warmup.json b/benchmarks/raw/pool_keepalive_optimized-100vu-warmup.json new file mode 100644 index 0000000..b465e48 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_blocked": { + "min": 0, + "med": 0, + "max": 52.2539, + "p(90)": 0, + "p(95)": 0, + "avg": 0.17042957328385905 + }, + "http_req_waiting": { + "max": 4198.336, + "p(90)": 740.55951, + "p(95)": 1198.0929150000004, + "avg": 507.52472474953703, + "min": 27.3318, + "med": 376.9436 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "checks": { + "passes": 5389, + "fails": 0, + "value": 1 + }, + "http_req_duration{expected_response:true}": { + "avg": 507.68550565862756, + "min": 27.3318, + "med": 377.1879, + "max": 4198.336, + "p(90)": 740.8086400000001, + "p(95)": 1198.0929150000004 + }, + "http_req_receiving": { + "max": 4.0706, + "p(90)": 0.5453100000000001, + "p(95)": 0.59521, + "avg": 0.11861048237476784, + "min": 0, + "med": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 5390, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_reqs": { + "count": 5390, + "rate": 177.475735222785 + }, + "http_req_duration": { + "avg": 507.68550565862756, + "min": 27.3318, + "med": 377.1879, + "max": 4198.336, + "p(90)": 740.8086400000001, + "p(95)": 1198.0929150000004 + }, + "data_sent": { + "count": 2500663, + "rate": 82338.9618681661 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.04217042671614104, + "min": 0, + "med": 0, + "max": 12.2217 + }, + "http_req_connecting": { + "max": 36.0653, + "p(90)": 0, + "p(95)": 0, + "avg": 0.14335187384044526, + "min": 0, + "med": 0 + }, + "iterations": { + "count": 5389, + "rate": 177.44280837023905 + }, + "vus": { + "value": 100, + "min": 100, + "max": 100 + }, + "data_received": { + "count": 1681844, + "rate": 55377.829393326465 + }, + "iteration_duration": { + "p(95)": 1250.2309599999999, + "avg": 559.1272982557095, + "min": 101.5498, + "med": 428.2403, + "max": 4248.8072, + "p(90)": 792.0917599999999 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5389, + "fails": 0 + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-100vu-warmup.txt b/benchmarks/raw/pool_keepalive_optimized-100vu-warmup.txt new file mode 100644 index 0000000..6c06e62 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-100vu-warmup.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 98 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.9s/30s + +running (0m02.0s), 100/100 VUs, 241 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.9s/30s + +running (0m03.0s), 100/100 VUs, 388 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 02.9s/30s + +running (0m04.0s), 100/100 VUs, 547 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.9s/30s + +running (0m05.0s), 100/100 VUs, 607 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.9s/30s + +running (0m06.0s), 100/100 VUs, 694 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 05.9s/30s + +running (0m07.0s), 100/100 VUs, 785 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.9s/30s + +running (0m08.0s), 100/100 VUs, 842 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.9s/30s + +running (0m09.0s), 100/100 VUs, 844 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 08.9s/30s + +running (0m10.0s), 100/100 VUs, 844 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.9s/30s + +running (0m11.0s), 100/100 VUs, 899 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.9s/30s + +running (0m12.0s), 100/100 VUs, 1082 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 11.9s/30s + +running (0m13.0s), 100/100 VUs, 1295 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.9s/30s + +running (0m14.0s), 100/100 VUs, 1486 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.9s/30s + +running (0m15.0s), 100/100 VUs, 1700 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 14.9s/30s + +running (0m16.0s), 100/100 VUs, 1892 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.9s/30s + +running (0m17.0s), 100/100 VUs, 2089 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.9s/30s + +running (0m18.0s), 100/100 VUs, 2300 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 17.9s/30s + +running (0m19.0s), 100/100 VUs, 2493 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.9s/30s + +running (0m20.0s), 100/100 VUs, 2782 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.9s/30s + +running (0m21.0s), 100/100 VUs, 3007 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 20.9s/30s + +running (0m22.0s), 100/100 VUs, 3266 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.9s/30s + +running (0m23.0s), 100/100 VUs, 3506 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.9s/30s + +running (0m24.0s), 100/100 VUs, 3722 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 23.9s/30s + +running (0m25.0s), 100/100 VUs, 3971 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.9s/30s + +running (0m26.0s), 100/100 VUs, 4253 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.9s/30s + +running (0m27.0s), 100/100 VUs, 4558 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 26.9s/30s + +running (0m28.0s), 100/100 VUs, 4757 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.9s/30s + +running (0m29.0s), 100/100 VUs, 4983 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.9s/30s + +running (0m30.0s), 100/100 VUs, 5275 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5389 177.442808/s + checks_succeeded...: 100.00% 5389 out of 5389 + checks_failed......: 0.00% 0 out of 5389 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=507.68ms min=27.33ms med=377.18ms max=4.19s p(90)=740.8ms p(95)=1.19s + { expected_response:true }...: avg=507.68ms min=27.33ms med=377.18ms max=4.19s p(90)=740.8ms p(95)=1.19s + http_req_failed................: 0.00% 0 out of 5390 + http_reqs......................: 5390 177.475735/s + + EXECUTION + iteration_duration.............: avg=559.12ms min=101.54ms med=428.24ms max=4.24s p(90)=792.09ms p(95)=1.25s + iterations.....................: 5389 177.442808/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 1.7 MB 55 kB/s + data_sent......................: 2.5 MB 82 kB/s + + + + +running (0m30.4s), 000/100 VUs, 5389 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-20vu-run1.json b/benchmarks/raw/pool_keepalive_optimized-20vu-run1.json new file mode 100644 index 0000000..93afd51 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 2808, + "fails": 0 + } + } + }, + "metrics": { + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_receiving": { + "max": 512.9931, + "p(90)": 0.56164, + "p(95)": 0.7791, + "avg": 0.8629841936632258, + "min": 0, + "med": 0 + }, + "http_reqs": { + "count": 2809, + "rate": 90.65548410669136 + }, + "http_req_waiting": { + "p(95)": 401.1550599999999, + "avg": 158.76762951228207, + "min": 16.9299, + "med": 112.1776, + "max": 1917.7841, + "p(90)": 268.01386000000014 + }, + "vus_max": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 401.1550599999999, + "avg": 159.79364660021358, + "min": 16.9299, + "med": 112.3223, + "max": 1917.9133, + "p(90)": 268.07834 + }, + "http_req_sending": { + "avg": 0.16303289426842288, + "min": 0, + "med": 0, + "max": 86.0575, + "p(90)": 0, + "p(95)": 0.52626 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_req_duration": { + "p(95)": 401.1550599999999, + "avg": 159.79364660021358, + "min": 16.9299, + "med": 112.3223, + "max": 1917.9133, + "p(90)": 268.07834 + }, + "http_req_failed": { + "passes": 0, + "fails": 2809, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "data_received": { + "rate": 28289.803849900556, + "count": 876572 + }, + "http_req_connecting": { + "avg": 0.05930729797080811, + "min": 0, + "med": 0, + "max": 77.958, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.37140316838732657, + "min": 0, + "med": 0, + "max": 274.5784 + }, + "checks": { + "passes": 2808, + "fails": 0, + "value": 1 + }, + "iterations": { + "count": 2808, + "rate": 90.62321088344228 + }, + "data_sent": { + "count": 1303079, + "rate": 42054.559478199815 + }, + "iteration_duration": { + "med": 166.00065, + "max": 1969.5938, + "p(90)": 323.6981, + "p(95)": 463.93080000000003, + "avg": 213.89716524216533, + "min": 67.9772 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-20vu-run1.txt b/benchmarks/raw/pool_keepalive_optimized-20vu-run1.txt new file mode 100644 index 0000000..d59c559 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-20vu-run1.txt @@ -0,0 +1,151 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Init [ 0% ] 00/20 VUs initialized +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +running (0m01.2s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 2% ] 20 VUs 00.5s/30s + +running (0m02.3s), 20/20 VUs, 37 complete and 0 interrupted iterations +default [ 5% ] 20 VUs 01.5s/30s + +running (0m03.2s), 20/20 VUs, 118 complete and 0 interrupted iterations +default [ 8% ] 20 VUs 02.5s/30s + +running (0m04.3s), 20/20 VUs, 232 complete and 0 interrupted iterations +default [ 12% ] 20 VUs 03.5s/30s + +running (0m05.3s), 20/20 VUs, 360 complete and 0 interrupted iterations +default [ 15% ] 20 VUs 04.5s/30s + +running (0m06.3s), 20/20 VUs, 463 complete and 0 interrupted iterations +default [ 18% ] 20 VUs 05.5s/30s + +running (0m07.2s), 20/20 VUs, 557 complete and 0 interrupted iterations +default [ 22% ] 20 VUs 06.5s/30s + +running (0m08.3s), 20/20 VUs, 691 complete and 0 interrupted iterations +default [ 25% ] 20 VUs 07.5s/30s + +running (0m09.2s), 20/20 VUs, 812 complete and 0 interrupted iterations +default [ 28% ] 20 VUs 08.5s/30s + +running (0m10.2s), 20/20 VUs, 929 complete and 0 interrupted iterations +default [ 32% ] 20 VUs 09.5s/30s + +running (0m11.2s), 20/20 VUs, 1068 complete and 0 interrupted iterations +default [ 35% ] 20 VUs 10.5s/30s + +running (0m12.2s), 20/20 VUs, 1167 complete and 0 interrupted iterations +default [ 38% ] 20 VUs 11.5s/30s + +running (0m13.2s), 20/20 VUs, 1211 complete and 0 interrupted iterations +default [ 42% ] 20 VUs 12.5s/30s + +running (0m14.2s), 20/20 VUs, 1224 complete and 0 interrupted iterations +default [ 45% ] 20 VUs 13.5s/30s + +running (0m15.2s), 20/20 VUs, 1301 complete and 0 interrupted iterations +default [ 48% ] 20 VUs 14.5s/30s + +running (0m16.2s), 20/20 VUs, 1394 complete and 0 interrupted iterations +default [ 52% ] 20 VUs 15.5s/30s + +running (0m17.2s), 20/20 VUs, 1535 complete and 0 interrupted iterations +default [ 55% ] 20 VUs 16.5s/30s + +running (0m18.2s), 20/20 VUs, 1628 complete and 0 interrupted iterations +default [ 58% ] 20 VUs 17.5s/30s + +running (0m19.2s), 20/20 VUs, 1746 complete and 0 interrupted iterations +default [ 62% ] 20 VUs 18.5s/30s + +running (0m20.3s), 20/20 VUs, 1854 complete and 0 interrupted iterations +default [ 65% ] 20 VUs 19.5s/30s + +running (0m21.2s), 20/20 VUs, 1965 complete and 0 interrupted iterations +default [ 68% ] 20 VUs 20.5s/30s + +running (0m22.2s), 20/20 VUs, 1980 complete and 0 interrupted iterations +default [ 72% ] 20 VUs 21.5s/30s + +running (0m23.2s), 20/20 VUs, 2110 complete and 0 interrupted iterations +default [ 75% ] 20 VUs 22.5s/30s + +running (0m24.2s), 20/20 VUs, 2256 complete and 0 interrupted iterations +default [ 78% ] 20 VUs 23.5s/30s + +running (0m25.3s), 20/20 VUs, 2362 complete and 0 interrupted iterations +default [ 82% ] 20 VUs 24.5s/30s + +running (0m26.3s), 20/20 VUs, 2472 complete and 0 interrupted iterations +default [ 85% ] 20 VUs 25.5s/30s + +running (0m27.3s), 20/20 VUs, 2531 complete and 0 interrupted iterations +default [ 88% ] 20 VUs 26.5s/30s + +running (0m28.4s), 20/20 VUs, 2570 complete and 0 interrupted iterations +default [ 92% ] 20 VUs 27.7s/30s + +running (0m29.3s), 20/20 VUs, 2629 complete and 0 interrupted iterations +default [ 95% ] 20 VUs 28.5s/30s + +running (0m30.2s), 20/20 VUs, 2733 complete and 0 interrupted iterations +default [ 98% ] 20 VUs 29.5s/30s + +running (0m31.0s), 00/20 VUs, 2808 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 2808 90.623211/s + checks_succeeded...: 100.00% 2808 out of 2808 + checks_failed......: 0.00% 0 out of 2808 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=159.79ms min=16.92ms med=112.32ms max=1.91s p(90)=268.07ms p(95)=401.15ms + { expected_response:true }...: avg=159.79ms min=16.92ms med=112.32ms max=1.91s p(90)=268.07ms p(95)=401.15ms + http_req_failed................: 0.00% 0 out of 2809 + http_reqs......................: 2809 90.655484/s + + EXECUTION + iteration_duration.............: avg=213.89ms min=67.97ms med=166ms max=1.96s p(90)=323.69ms p(95)=463.93ms + iterations.....................: 2808 90.623211/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=0 max=20 + + NETWORK + data_received..................: 877 kB 28 kB/s + data_sent......................: 1.3 MB 42 kB/s + + + + +running (0m31.0s), 00/20 VUs, 2808 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-20vu-run2.json b/benchmarks/raw/pool_keepalive_optimized-20vu-run2.json new file mode 100644 index 0000000..8aea0c9 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 3226, + "fails": 0, + "name": "status is 200" + } + } + }, + "metrics": { + "data_sent": { + "count": 1497031, + "rate": 48242.37089128123 + }, + "http_req_blocked": { + "avg": 0.17912854044003718, + "min": 0, + "med": 0, + "max": 277.7505, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 3226, + "fails": 0, + "value": 1 + }, + "http_req_connecting": { + "max": 127.4919, + "p(90)": 0, + "p(95)": 0, + "avg": 0.09378304927176943, + "min": 0, + "med": 0 + }, + "http_req_waiting": { + "avg": 130.28336854663766, + "min": 10.7015, + "med": 85.5353, + "max": 1712.1356, + "p(90)": 289.2443400000001, + "p(95)": 399.39309 + }, + "iterations": { + "count": 3226, + "rate": 103.95902856739322 + }, + "http_req_duration": { + "p(95)": 400.31000999999986, + "avg": 132.32671524635876, + "min": 10.7015, + "med": 86.5009, + "max": 1712.1356, + "p(90)": 293.78174 + }, + "http_req_duration{expected_response:true}": { + "med": 86.5009, + "max": 1712.1356, + "p(90)": 293.78174, + "p(95)": 400.31000999999986, + "avg": 132.32671524635876, + "min": 10.7015 + }, + "vus": { + "min": 0, + "max": 20, + "value": 20 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "iteration_duration": { + "avg": 186.12272389956624, + "min": 60.9559, + "med": 140.5205, + "max": 1771.3776, + "p(90)": 348.88255, + "p(95)": 462.41499999999996 + }, + "http_reqs": { + "count": 3227, + "rate": 103.99125393272719 + }, + "http_req_receiving": { + "avg": 1.3273898047722328, + "min": 0, + "med": 0, + "max": 270.1257, + "p(90)": 0.56658, + "p(95)": 0.782 + }, + "http_req_sending": { + "avg": 0.7159568949488683, + "min": 0, + "med": 0, + "max": 610.7375, + "p(90)": 0, + "p(95)": 0.5094899999999999 + }, + "http_req_failed": { + "passes": 0, + "fails": 3227, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "data_received": { + "rate": 32450.556186925656, + "count": 1006988 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-20vu-run2.txt b/benchmarks/raw/pool_keepalive_optimized-20vu-run2.txt new file mode 100644 index 0000000..25eb5fc --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-20vu-run2.txt @@ -0,0 +1,148 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Init [ 100% ] 20/20 VUs initialized +default [ 0% ] + +Run [ 100% ] setup() +default [ 0% ] + +running (0m01.9s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 01.0s/30s + +running (0m02.9s), 20/20 VUs, 43 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.0s/30s + +running (0m03.9s), 20/20 VUs, 102 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.0s/30s + +running (0m04.9s), 20/20 VUs, 170 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 04.0s/30s + +running (0m05.9s), 20/20 VUs, 288 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.0s/30s + +running (0m06.9s), 20/20 VUs, 372 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.0s/30s + +running (0m07.9s), 20/20 VUs, 455 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 07.0s/30s + +running (0m08.9s), 20/20 VUs, 564 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m09.9s), 20/20 VUs, 680 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.0s/30s + +running (0m10.9s), 20/20 VUs, 800 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 10.0s/30s + +running (0m11.9s), 20/20 VUs, 918 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m12.9s), 20/20 VUs, 1029 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m13.9s), 20/20 VUs, 1111 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m14.9s), 20/20 VUs, 1131 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.0s/30s + +running (0m15.9s), 20/20 VUs, 1221 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.0s/30s + +running (0m16.9s), 20/20 VUs, 1339 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 16.0s/30s + +running (0m17.9s), 20/20 VUs, 1479 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.0s/30s + +running (0m18.9s), 20/20 VUs, 1551 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.0s/30s + +running (0m19.9s), 20/20 VUs, 1610 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 19.0s/30s + +running (0m20.9s), 20/20 VUs, 1656 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.0s/30s + +running (0m21.9s), 20/20 VUs, 1709 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.0s/30s + +running (0m22.9s), 20/20 VUs, 1763 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 22.0s/30s + +running (0m23.9s), 20/20 VUs, 1815 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.0s/30s + +running (0m24.9s), 20/20 VUs, 1952 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.0s/30s + +running (0m25.9s), 20/20 VUs, 2187 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 25.0s/30s + +running (0m26.9s), 20/20 VUs, 2393 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.0s/30s + +running (0m27.9s), 20/20 VUs, 2570 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m28.9s), 20/20 VUs, 2772 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m29.9s), 20/20 VUs, 2996 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m30.9s), 20/20 VUs, 3202 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 30.0s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 3226 103.959029/s + checks_succeeded...: 100.00% 3226 out of 3226 + checks_failed......: 0.00% 0 out of 3226 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=132.32ms min=10.7ms med=86.5ms max=1.71s p(90)=293.78ms p(95)=400.31ms + { expected_response:true }...: avg=132.32ms min=10.7ms med=86.5ms max=1.71s p(90)=293.78ms p(95)=400.31ms + http_req_failed................: 0.00% 0 out of 3227 + http_reqs......................: 3227 103.991254/s + + EXECUTION + iteration_duration.............: avg=186.12ms min=60.95ms med=140.52ms max=1.77s p(90)=348.88ms p(95)=462.41ms + iterations.....................: 3226 103.959029/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.0 MB 33 kB/s + data_sent......................: 1.5 MB 48 kB/s + + + + +running (0m31.0s), 00/20 VUs, 3226 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-20vu-run3.json b/benchmarks/raw/pool_keepalive_optimized-20vu-run3.json new file mode 100644 index 0000000..b41dad7 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_receiving": { + "avg": 0.15547970370370368, + "min": 0, + "med": 0, + "max": 14.5638, + "p(90)": 0.54974, + "p(95)": 0.7018599999999975 + }, + "http_req_failed": { + "passes": 0, + "fails": 3375, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_duration{expected_response:true}": { + "avg": 123.4514147555554, + "min": 7.3612, + "med": 95.9608, + "max": 817.8098, + "p(90)": 234.32513999999998, + "p(95)": 292.0354 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_duration": { + "avg": 123.4514147555554, + "min": 7.3612, + "med": 95.9608, + "max": 817.8098, + "p(90)": 234.32513999999998, + "p(95)": 292.0354 + }, + "data_received": { + "count": 1053164, + "rate": 34829.60516438973 + }, + "iteration_duration": { + "med": 149.3063, + "max": 908.5386, + "p(90)": 293.5825000000002, + "p(95)": 352.474765, + "avg": 178.3773811499703, + "min": 61.6159 + }, + "http_req_connecting": { + "min": 0, + "med": 0, + "max": 5.2915, + "p(90)": 0, + "p(95)": 0, + "avg": 0.016842992592592594 + }, + "http_reqs": { + "count": 3375, + "rate": 111.61596620261929 + }, + "http_req_waiting": { + "p(95)": 291.58592999999985, + "avg": 123.25197348148131, + "min": 6.7659, + "med": 95.9366, + "max": 817.8098, + "p(90)": 233.8892 + }, + "data_sent": { + "count": 1565703, + "rate": 51779.98611298952 + }, + "http_req_sending": { + "max": 6.8607, + "p(90)": 0, + "p(95)": 0.3561299999999989, + "avg": 0.04396157037037037, + "min": 0, + "med": 0 + }, + "checks": { + "passes": 3374, + "fails": 0, + "value": 1 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_blocked": { + "p(95)": 0, + "avg": 0.04046444444444445, + "min": 0, + "med": 0, + "max": 54.2459, + "p(90)": 0 + }, + "iterations": { + "count": 3374, + "rate": 111.58289480522592 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 3374 + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-20vu-run3.txt b/benchmarks/raw/pool_keepalive_optimized-20vu-run3.txt new file mode 100644 index 0000000..7fcfbd3 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-20vu-run3.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 136 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m02.0s), 20/20 VUs, 347 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m03.0s), 20/20 VUs, 532 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m04.0s), 20/20 VUs, 695 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m05.0s), 20/20 VUs, 809 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m06.0s), 20/20 VUs, 949 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m07.0s), 20/20 VUs, 1076 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m08.0s), 20/20 VUs, 1206 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.9s/30s + +running (0m09.0s), 20/20 VUs, 1325 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m10.0s), 20/20 VUs, 1417 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m11.1s), 20/20 VUs, 1494 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.0s/30s + +running (0m12.0s), 20/20 VUs, 1551 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.0s/30s + +running (0m13.0s), 20/20 VUs, 1633 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.9s/30s + +running (0m14.0s), 20/20 VUs, 1709 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m15.0s), 20/20 VUs, 1809 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m16.0s), 20/20 VUs, 1926 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m17.0s), 20/20 VUs, 2068 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m18.0s), 20/20 VUs, 2184 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m19.0s), 20/20 VUs, 2311 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m20.0s), 20/20 VUs, 2461 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m21.0s), 20/20 VUs, 2607 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m22.0s), 20/20 VUs, 2730 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m23.0s), 20/20 VUs, 2846 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m24.0s), 20/20 VUs, 2933 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m25.0s), 20/20 VUs, 3023 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m26.0s), 20/20 VUs, 3100 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m27.0s), 20/20 VUs, 3197 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.0s/30s + +running (0m28.0s), 20/20 VUs, 3261 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 28.0s/30s + +running (0m29.0s), 20/20 VUs, 3295 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.9s/30s + +running (0m30.0s), 20/20 VUs, 3340 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 3374 111.582895/s + checks_succeeded...: 100.00% 3374 out of 3374 + checks_failed......: 0.00% 0 out of 3374 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=123.45ms min=7.36ms med=95.96ms max=817.8ms p(90)=234.32ms p(95)=292.03ms + { expected_response:true }...: avg=123.45ms min=7.36ms med=95.96ms max=817.8ms p(90)=234.32ms p(95)=292.03ms + http_req_failed................: 0.00% 0 out of 3375 + http_reqs......................: 3375 111.615966/s + + EXECUTION + iteration_duration.............: avg=178.37ms min=61.61ms med=149.3ms max=908.53ms p(90)=293.58ms p(95)=352.47ms + iterations.....................: 3374 111.582895/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.1 MB 35 kB/s + data_sent......................: 1.6 MB 52 kB/s + + + + +running (0m30.2s), 00/20 VUs, 3374 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-20vu-warmup.json b/benchmarks/raw/pool_keepalive_optimized-20vu-warmup.json new file mode 100644 index 0000000..759f535 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 1869, + "fails": 0 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_failed": { + "passes": 0, + "fails": 1870, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "avg": 0.027183315508021402, + "min": 0, + "med": 0, + "max": 10.8336, + "p(90)": 0, + "p(95)": 0 + }, + "vus_max": { + "max": 20, + "value": 20, + "min": 20 + }, + "http_reqs": { + "rate": 61.723596171319, + "count": 1870 + }, + "data_received": { + "count": 583604, + "rate": 19263.175197843022 + }, + "iterations": { + "count": 1869, + "rate": 61.69058890063915 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_blocked": { + "med": 0, + "max": 37.4837, + "p(90)": 0, + "p(95)": 0, + "avg": 0.08942165775401072, + "min": 0 + }, + "http_req_waiting": { + "med": 129.9836, + "max": 1865.8499, + "p(90)": 667.5634900000001, + "p(95)": 889.610235, + "avg": 266.06786459893, + "min": 16.7877 + }, + "http_req_duration{expected_response:true}": { + "avg": 266.7579357219247, + "min": 17.1751, + "med": 130.4708, + "max": 1866.4271, + "p(90)": 667.5634900000001, + "p(95)": 889.610235 + }, + "iteration_duration": { + "avg": 322.638715088283, + "min": 68.0535, + "med": 182.2451, + "max": 1940.4886, + "p(90)": 731.3710400000002, + "p(95)": 942.12934 + }, + "data_sent": { + "count": 867383, + "rate": 28629.9454641001 + }, + "checks": { + "fails": 0, + "passes": 1869, + "value": 1 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_sending": { + "avg": 0.5005251871657753, + "min": 0, + "med": 0, + "max": 300.9541, + "p(90)": 0, + "p(95)": 0.5238499999999999 + }, + "http_req_duration": { + "avg": 266.7579357219247, + "min": 17.1751, + "med": 130.4708, + "max": 1866.4271, + "p(90)": 667.5634900000001, + "p(95)": 889.610235 + }, + "http_req_receiving": { + "p(90)": 0.55142, + "p(95)": 0.742015, + "avg": 0.18954593582887716, + "min": 0, + "med": 0, + "max": 26.1852 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-20vu-warmup.txt b/benchmarks/raw/pool_keepalive_optimized-20vu-warmup.txt new file mode 100644 index 0000000..d24bf0c --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-20vu-warmup.txt @@ -0,0 +1,151 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 69 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.9s/30s + +running (0m02.0s), 20/20 VUs, 182 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.9s/30s + +running (0m03.0s), 20/20 VUs, 247 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 02.9s/30s + +running (0m04.0s), 20/20 VUs, 324 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.9s/30s + +running (0m05.0s), 20/20 VUs, 333 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.9s/30s + +running (0m06.0s), 20/20 VUs, 384 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 05.9s/30s + +running (0m07.0s), 20/20 VUs, 392 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.9s/30s + +running (0m08.1s), 20/20 VUs, 411 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.0s/30s + +running (0m09.0s), 20/20 VUs, 440 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 08.9s/30s + +running (0m10.0s), 20/20 VUs, 484 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.9s/30s + +running (0m11.1s), 20/20 VUs, 544 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.1s/30s + +running (0m12.0s), 20/20 VUs, 562 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 11.9s/30s + +running (0m13.1s), 20/20 VUs, 628 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 13.0s/30s + +running (0m14.0s), 20/20 VUs, 655 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.9s/30s + +running (0m15.0s), 20/20 VUs, 688 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 14.9s/30s + +running (0m16.0s), 20/20 VUs, 720 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.9s/30s + +running (0m17.0s), 20/20 VUs, 757 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.9s/30s + +running (0m18.0s), 20/20 VUs, 791 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 17.9s/30s + +running (0m19.0s), 20/20 VUs, 848 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.9s/30s + +running (0m20.0s), 20/20 VUs, 996 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.9s/30s + +running (0m21.0s), 20/20 VUs, 1177 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 20.9s/30s + +running (0m22.0s), 20/20 VUs, 1336 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.9s/30s + +running (0m23.0s), 20/20 VUs, 1473 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.9s/30s + +running (0m24.0s), 20/20 VUs, 1593 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 23.9s/30s + +running (0m25.0s), 20/20 VUs, 1697 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.9s/30s + +running (0m26.0s), 20/20 VUs, 1763 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.9s/30s + +running (0m27.0s), 20/20 VUs, 1788 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 26.9s/30s + +running (0m28.0s), 20/20 VUs, 1809 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.9s/30s + +running (0m29.1s), 20/20 VUs, 1829 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.0s/30s + +running (0m30.0s), 20/20 VUs, 1849 complete and 0 interrupted iterations +default [ 100% ] 20 VUs 30.0s/30s + +running (0m30.3s), 00/20 VUs, 1869 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s + +running (0m30.3s), 00/20 VUs, 1869 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s + +running (0m30.3s), 00/20 VUs, 1869 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 1869 61.690589/s + checks_succeeded...: 100.00% 1869 out of 1869 + checks_failed......: 0.00% 0 out of 1869 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=266.75ms min=17.17ms med=130.47ms max=1.86s p(90)=667.56ms p(95)=889.61ms + { expected_response:true }...: avg=266.75ms min=17.17ms med=130.47ms max=1.86s p(90)=667.56ms p(95)=889.61ms + http_req_failed................: 0.00% 0 out of 1870 + http_reqs......................: 1870 61.723596/s + + EXECUTION + iteration_duration.............: avg=322.63ms min=68.05ms med=182.24ms max=1.94s p(90)=731.37ms p(95)=942.12ms + iterations.....................: 1869 61.690589/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 584 kB 19 kB/s + data_sent......................: 867 kB 29 kB/s + + + + +running (0m30.3s), 00/20 VUs, 1869 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-50vu-run1.json b/benchmarks/raw/pool_keepalive_optimized-50vu-run1.json new file mode 100644 index 0000000..db8e40b --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_waiting": { + "min": 9.0515, + "med": 264.64725, + "max": 3197.8642, + "p(90)": 685.1877999999999, + "p(95)": 1279.447325, + "avg": 383.430341564506 + }, + "http_req_failed": { + "fails": 3426, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "p(95)": 0, + "avg": 0.0333983946293053, + "min": 0, + "med": 0, + "max": 10.9062, + "p(90)": 0 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "checks": { + "passes": 3425, + "fails": 0, + "value": 1 + }, + "http_req_duration{expected_response:true}": { + "avg": 383.9144265907761, + "min": 9.5341, + "med": 265.00525, + "max": 3197.8642, + "p(90)": 685.1877999999999, + "p(95)": 1279.787 + }, + "http_req_blocked": { + "avg": 0.07895484530064215, + "min": 0, + "med": 0, + "max": 49.4908, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_receiving": { + "p(90)": 0.5714, + "p(95)": 0.7812, + "avg": 0.3937600408639812, + "min": 0, + "med": 0, + "max": 252.4918 + }, + "http_req_duration": { + "med": 265.00525, + "max": 3197.8642, + "p(90)": 685.1877999999999, + "p(95)": 1279.787, + "avg": 383.9144265907761, + "min": 9.5341 + }, + "http_reqs": { + "count": 3426, + "rate": 113.19520016668044 + }, + "vus_max": { + "max": 50, + "value": 50, + "min": 50 + }, + "data_sent": { + "count": 1589367, + "rate": 52512.75998345487 + }, + "data_received": { + "count": 1069076, + "rate": 35322.32101967135 + }, + "http_req_sending": { + "max": 52.0519, + "p(90)": 0, + "p(95)": 0.5255, + "avg": 0.09032498540572093, + "min": 0, + "med": 0 + }, + "iterations": { + "count": 3425, + "rate": 113.16216011993009 + }, + "vus": { + "value": 50, + "min": 50, + "max": 50 + }, + "iteration_duration": { + "p(90)": 749.7126, + "p(95)": 1406.0214599999968, + "avg": 439.6974735474464, + "min": 96.1177, + "med": 318.1636, + "max": 3258.559 + } + }, + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 3425, + "fails": 0 + } + }, + "name": "" + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-50vu-run1.txt b/benchmarks/raw/pool_keepalive_optimized-50vu-run1.txt new file mode 100644 index 0000000..f228140 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-50vu-run1.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 129 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.9s/30s + +running (0m02.0s), 50/50 VUs, 215 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.9s/30s + +running (0m03.1s), 50/50 VUs, 263 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 03.0s/30s + +running (0m04.2s), 50/50 VUs, 265 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.1s/30s + +running (0m05.0s), 50/50 VUs, 315 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.9s/30s + +running (0m06.0s), 50/50 VUs, 345 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m07.0s), 50/50 VUs, 395 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.9s/30s + +running (0m08.0s), 50/50 VUs, 455 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m09.0s), 50/50 VUs, 562 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m10.0s), 50/50 VUs, 665 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 10.0s/30s + +running (0m11.0s), 50/50 VUs, 706 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.9s/30s + +running (0m12.0s), 50/50 VUs, 739 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 11.9s/30s + +running (0m13.0s), 50/50 VUs, 767 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.9s/30s + +running (0m14.0s), 50/50 VUs, 790 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.9s/30s + +running (0m15.0s), 50/50 VUs, 900 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 14.9s/30s + +running (0m16.0s), 50/50 VUs, 1015 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.9s/30s + +running (0m17.0s), 50/50 VUs, 1140 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m18.0s), 50/50 VUs, 1306 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 17.9s/30s + +running (0m19.0s), 50/50 VUs, 1460 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.9s/30s + +running (0m20.0s), 50/50 VUs, 1635 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m21.0s), 50/50 VUs, 1782 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 20.9s/30s + +running (0m22.0s), 50/50 VUs, 1957 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.9s/30s + +running (0m23.0s), 50/50 VUs, 2185 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.9s/30s + +running (0m24.0s), 50/50 VUs, 2399 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 23.9s/30s + +running (0m25.0s), 50/50 VUs, 2608 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.9s/30s + +running (0m26.0s), 50/50 VUs, 2716 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m27.0s), 50/50 VUs, 2882 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m28.0s), 50/50 VUs, 3033 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m29.0s), 50/50 VUs, 3212 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.9s/30s + +running (0m30.0s), 50/50 VUs, 3353 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 3425 113.16216/s + checks_succeeded...: 100.00% 3425 out of 3425 + checks_failed......: 0.00% 0 out of 3425 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=383.91ms min=9.53ms med=265ms max=3.19s p(90)=685.18ms p(95)=1.27s + { expected_response:true }...: avg=383.91ms min=9.53ms med=265ms max=3.19s p(90)=685.18ms p(95)=1.27s + http_req_failed................: 0.00% 0 out of 3426 + http_reqs......................: 3426 113.1952/s + + EXECUTION + iteration_duration.............: avg=439.69ms min=96.11ms med=318.16ms max=3.25s p(90)=749.71ms p(95)=1.4s + iterations.....................: 3425 113.16216/s + vus............................: 50 min=50 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 1.1 MB 35 kB/s + data_sent......................: 1.6 MB 53 kB/s + + + + +running (0m30.3s), 00/50 VUs, 3425 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-50vu-run2.json b/benchmarks/raw/pool_keepalive_optimized-50vu-run2.json new file mode 100644 index 0000000..2682047 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_duration{expected_response:true}": { + "med": 187.74625, + "max": 1043.7325, + "p(90)": 312.83258000000006, + "p(95)": 410.2304, + "avg": 213.20057775825765, + "min": 18.4937 + }, + "http_reqs": { + "count": 5692, + "rate": 188.2921190928996 + }, + "http_req_duration": { + "p(95)": 410.2304, + "avg": 213.20057775825765, + "min": 18.4937, + "med": 187.74625, + "max": 1043.7325, + "p(90)": 312.83258000000006 + }, + "http_req_waiting": { + "avg": 213.03564826071693, + "min": 18.4937, + "med": 187.6997, + "max": 1043.7325, + "p(90)": 312.6871400000003, + "p(95)": 409.91891 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0.3026699999999995, + "avg": 0.044812842586085734, + "min": 0, + "med": 0, + "max": 40.5492 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "http_req_connecting": { + "med": 0, + "max": 3.0565, + "p(90)": 0, + "p(95)": 0, + "avg": 0.01046379128601546, + "min": 0 + }, + "vus": { + "max": 50, + "value": 50, + "min": 50 + }, + "iteration_duration": { + "p(95)": 461.0177, + "avg": 264.55474965735385, + "min": 88.2268, + "med": 239.015, + "max": 1093.8639, + "p(90)": 364.2817 + }, + "http_req_receiving": { + "max": 25.8427, + "p(90)": 0.5430900000000001, + "p(95)": 0.6022, + "avg": 0.12011665495432185, + "min": 0, + "med": 0 + }, + "data_sent": { + "count": 2640791, + "rate": 87357.71845949709 + }, + "http_req_blocked": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.03143350316233309, + "min": 0, + "med": 0, + "max": 54.2397 + }, + "data_received": { + "count": 1776068, + "rate": 58752.56629885594 + }, + "http_req_failed": { + "passes": 0, + "fails": 5692, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "checks": { + "passes": 5691, + "fails": 0, + "value": 1 + }, + "iterations": { + "count": 5691, + "rate": 188.25903895953823 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5691, + "fails": 0 + } + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-50vu-run2.txt b/benchmarks/raw/pool_keepalive_optimized-50vu-run2.txt new file mode 100644 index 0000000..89cfd81 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-50vu-run2.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 155 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.9s/30s + +running (0m02.0s), 50/50 VUs, 340 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.9s/30s + +running (0m03.0s), 50/50 VUs, 603 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 02.9s/30s + +running (0m04.0s), 50/50 VUs, 766 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.9s/30s + +running (0m05.0s), 50/50 VUs, 911 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.9s/30s + +running (0m06.0s), 50/50 VUs, 969 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m07.0s), 50/50 VUs, 999 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.9s/30s + +running (0m08.0s), 50/50 VUs, 1125 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m09.0s), 50/50 VUs, 1335 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m10.0s), 50/50 VUs, 1463 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.9s/30s + +running (0m11.0s), 50/50 VUs, 1633 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.9s/30s + +running (0m12.0s), 50/50 VUs, 1802 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 11.9s/30s + +running (0m13.0s), 50/50 VUs, 1965 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.9s/30s + +running (0m14.0s), 50/50 VUs, 2150 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.9s/30s + +running (0m15.0s), 50/50 VUs, 2376 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 14.9s/30s + +running (0m16.0s), 50/50 VUs, 2610 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.9s/30s + +running (0m17.0s), 50/50 VUs, 2778 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m18.0s), 50/50 VUs, 2986 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 17.9s/30s + +running (0m19.0s), 50/50 VUs, 3230 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.9s/30s + +running (0m20.0s), 50/50 VUs, 3415 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m21.0s), 50/50 VUs, 3610 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 20.9s/30s + +running (0m22.0s), 50/50 VUs, 3843 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.9s/30s + +running (0m23.0s), 50/50 VUs, 4050 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.9s/30s + +running (0m24.0s), 50/50 VUs, 4247 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 23.9s/30s + +running (0m25.0s), 50/50 VUs, 4464 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.9s/30s + +running (0m26.0s), 50/50 VUs, 4678 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m27.0s), 50/50 VUs, 4865 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m28.0s), 50/50 VUs, 5092 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m29.0s), 50/50 VUs, 5392 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.9s/30s + +running (0m30.0s), 50/50 VUs, 5599 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5691 188.259039/s + checks_succeeded...: 100.00% 5691 out of 5691 + checks_failed......: 0.00% 0 out of 5691 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=213.2ms min=18.49ms med=187.74ms max=1.04s p(90)=312.83ms p(95)=410.23ms + { expected_response:true }...: avg=213.2ms min=18.49ms med=187.74ms max=1.04s p(90)=312.83ms p(95)=410.23ms + http_req_failed................: 0.00% 0 out of 5692 + http_reqs......................: 5692 188.292119/s + + EXECUTION + iteration_duration.............: avg=264.55ms min=88.22ms med=239.01ms max=1.09s p(90)=364.28ms p(95)=461.01ms + iterations.....................: 5691 188.259039/s + vus............................: 50 min=50 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 1.8 MB 59 kB/s + data_sent......................: 2.6 MB 87 kB/s + + + + +running (0m30.2s), 00/50 VUs, 5691 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-50vu-run3.json b/benchmarks/raw/pool_keepalive_optimized-50vu-run3.json new file mode 100644 index 0000000..8de48d1 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5867 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "http_req_failed": { + "passes": 0, + "fails": 5868, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_receiving": { + "max": 139.5378, + "p(90)": 0.54683, + "p(95)": 0.6532849999999997, + "avg": 0.16785288002726662, + "min": 0, + "med": 0 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "vus": { + "value": 50, + "min": 50, + "max": 50 + }, + "iterations": { + "count": 5867, + "rate": 193.63140021043742 + }, + "http_req_blocked": { + "avg": 0.06403394683026582, + "min": 0, + "med": 0, + "max": 134.201, + "p(90)": 0, + "p(95)": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_connecting": { + "max": 13.7416, + "p(90)": 0, + "p(95)": 0, + "avg": 0.0201931833674165, + "min": 0, + "med": 0 + }, + "data_sent": { + "rate": 89850.48127832051, + "count": 2722455 + }, + "http_req_waiting": { + "avg": 203.473189127471, + "min": 10.9936, + "med": 194.1273, + "max": 553.0504, + "p(90)": 294.12888, + "p(95)": 346.71693999999997 + }, + "data_received": { + "count": 1830980, + "rate": 60428.70652076133 + }, + "http_req_duration": { + "avg": 203.71811668370822, + "min": 11.5367, + "med": 194.48585, + "max": 553.0504, + "p(90)": 294.57042, + "p(95)": 347.22975499999995 + }, + "checks": { + "passes": 5867, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 5868, + "rate": 193.66440368754846 + }, + "http_req_sending": { + "med": 0, + "max": 17.3134, + "p(90)": 0, + "p(95)": 0.46025999999999984, + "avg": 0.07707467620995226, + "min": 0 + }, + "iteration_duration": { + "med": 246.9847, + "max": 605.7256, + "p(90)": 349.10742000000005, + "p(95)": 403.92301999999995, + "avg": 256.37983707175806, + "min": 97.5703 + }, + "http_req_duration{expected_response:true}": { + "avg": 203.71811668370822, + "min": 11.5367, + "med": 194.48585, + "max": 553.0504, + "p(90)": 294.57042, + "p(95)": 347.22975499999995 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-50vu-run3.txt b/benchmarks/raw/pool_keepalive_optimized-50vu-run3.txt new file mode 100644 index 0000000..68415a0 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-50vu-run3.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m00.9s), 50/50 VUs, 141 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m01.9s), 50/50 VUs, 293 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.8s/30s + +running (0m02.9s), 50/50 VUs, 434 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m03.9s), 50/50 VUs, 596 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.8s/30s + +running (0m04.9s), 50/50 VUs, 746 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m05.9s), 50/50 VUs, 934 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.8s/30s + +running (0m06.9s), 50/50 VUs, 1191 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m07.9s), 50/50 VUs, 1453 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.8s/30s + +running (0m08.9s), 50/50 VUs, 1655 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.8s/30s + +running (0m09.9s), 50/50 VUs, 1825 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m10.9s), 50/50 VUs, 1952 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.8s/30s + +running (0m11.9s), 50/50 VUs, 2160 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.8s/30s + +running (0m12.9s), 50/50 VUs, 2391 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m13.9s), 50/50 VUs, 2686 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.8s/30s + +running (0m14.9s), 50/50 VUs, 2883 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m15.9s), 50/50 VUs, 3126 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.8s/30s + +running (0m16.9s), 50/50 VUs, 3394 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.8s/30s + +running (0m17.9s), 50/50 VUs, 3618 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m18.9s), 50/50 VUs, 3805 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.8s/30s + +running (0m19.9s), 50/50 VUs, 3952 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.8s/30s + +running (0m20.9s), 50/50 VUs, 4118 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m21.9s), 50/50 VUs, 4309 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m22.9s), 50/50 VUs, 4478 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m23.9s), 50/50 VUs, 4656 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.8s/30s + +running (0m24.9s), 50/50 VUs, 4831 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m25.9s), 50/50 VUs, 5022 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.8s/30s + +running (0m26.9s), 50/50 VUs, 5231 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.8s/30s + +running (0m27.9s), 50/50 VUs, 5433 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.8s/30s + +running (0m28.9s), 50/50 VUs, 5595 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m29.9s), 50/50 VUs, 5799 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5867 193.6314/s + checks_succeeded...: 100.00% 5867 out of 5867 + checks_failed......: 0.00% 0 out of 5867 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=203.71ms min=11.53ms med=194.48ms max=553.05ms p(90)=294.57ms p(95)=347.22ms + { expected_response:true }...: avg=203.71ms min=11.53ms med=194.48ms max=553.05ms p(90)=294.57ms p(95)=347.22ms + http_req_failed................: 0.00% 0 out of 5868 + http_reqs......................: 5868 193.664404/s + + EXECUTION + iteration_duration.............: avg=256.37ms min=97.57ms med=246.98ms max=605.72ms p(90)=349.1ms p(95)=403.92ms + iterations.....................: 5867 193.6314/s + vus............................: 50 min=50 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 1.8 MB 60 kB/s + data_sent......................: 2.7 MB 90 kB/s + + + + +running (0m30.3s), 00/50 VUs, 5867 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_keepalive_optimized-50vu-warmup.json b/benchmarks/raw/pool_keepalive_optimized-50vu-warmup.json new file mode 100644 index 0000000..dd63a84 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 3143, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + } + }, + "metrics": { + "checks": { + "passes": 3143, + "fails": 0, + "value": 1 + }, + "http_req_failed": { + "fails": 3144, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_connecting": { + "p(90)": 0, + "p(95)": 0, + "avg": 0.10746666666666667, + "min": 0, + "med": 0, + "max": 20.5058 + }, + "data_received": { + "count": 981092, + "rate": 31674.522901312324 + }, + "iteration_duration": { + "avg": 484.0102562838054, + "min": 130.41, + "med": 382.1228, + "max": 1979.1539, + "p(90)": 898.1827800000001, + "p(95)": 1011.8494199999998 + }, + "http_req_waiting": { + "p(95)": 951.2013799999999, + "avg": 429.7673935114507, + "min": 28.435, + "med": 326.41274999999996, + "max": 1906.2247, + "p(90)": 845.79913 + }, + "iterations": { + "count": 3143, + "rate": 101.47165146471956 + }, + "http_reqs": { + "count": 3144, + "rate": 101.50393643177802 + }, + "http_req_duration": { + "avg": 429.96653950381676, + "min": 28.435, + "med": 326.86019999999996, + "max": 1906.7334, + "p(90)": 845.79913, + "p(95)": 951.2013799999999 + }, + "http_req_duration{expected_response:true}": { + "min": 28.435, + "med": 326.86019999999996, + "max": 1906.7334, + "p(90)": 845.79913, + "p(95)": 951.2013799999999, + "avg": 429.96653950381676 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "data_sent": { + "count": 1458519, + "rate": 47088.237869128636 + }, + "http_req_blocked": { + "max": 58.0992, + "p(90)": 0, + "p(95)": 0, + "avg": 0.14359631043257, + "min": 0, + "med": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_sending": { + "p(90)": 0, + "p(95)": 0.5126149999999998, + "avg": 0.05611743002544533, + "min": 0, + "med": 0, + "max": 5.0358 + }, + "http_req_receiving": { + "p(90)": 0.54964, + "p(95)": 0.7022849999999993, + "avg": 0.143028562340967, + "min": 0, + "med": 0, + "max": 16.3626 + }, + "vus": { + "value": 50, + "min": 50, + "max": 50 + } + } +} diff --git a/benchmarks/raw/pool_keepalive_optimized-50vu-warmup.txt b/benchmarks/raw/pool_keepalive_optimized-50vu-warmup.txt new file mode 100644 index 0000000..73db141 --- /dev/null +++ b/benchmarks/raw/pool_keepalive_optimized-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 50/50 VUs, 39 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.9s/30s + +running (0m02.0s), 50/50 VUs, 102 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.9s/30s + +running (0m03.0s), 50/50 VUs, 187 complete and 0 interrupted iterations +default [ 10% ] 50 VUs 02.9s/30s + +running (0m04.1s), 50/50 VUs, 257 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 04.0s/30s + +running (0m05.0s), 50/50 VUs, 339 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.9s/30s + +running (0m06.0s), 50/50 VUs, 400 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m07.0s), 50/50 VUs, 516 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.9s/30s + +running (0m08.0s), 50/50 VUs, 604 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m09.0s), 50/50 VUs, 720 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m10.0s), 50/50 VUs, 779 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.9s/30s + +running (0m11.0s), 50/50 VUs, 838 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.9s/30s + +running (0m12.0s), 50/50 VUs, 896 complete and 0 interrupted iterations +default [ 40% ] 50 VUs 11.9s/30s + +running (0m13.0s), 50/50 VUs, 955 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.9s/30s + +running (0m14.0s), 50/50 VUs, 997 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.9s/30s + +running (0m15.0s), 50/50 VUs, 1085 complete and 0 interrupted iterations +default [ 50% ] 50 VUs 14.9s/30s + +running (0m16.0s), 50/50 VUs, 1144 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.9s/30s + +running (0m17.0s), 50/50 VUs, 1219 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m18.0s), 50/50 VUs, 1290 complete and 0 interrupted iterations +default [ 60% ] 50 VUs 17.9s/30s + +running (0m19.0s), 50/50 VUs, 1349 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.9s/30s + +running (0m20.0s), 50/50 VUs, 1454 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m21.0s), 50/50 VUs, 1611 complete and 0 interrupted iterations +default [ 70% ] 50 VUs 20.9s/30s + +running (0m22.0s), 50/50 VUs, 1793 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.9s/30s + +running (0m23.0s), 50/50 VUs, 1962 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.9s/30s + +running (0m24.0s), 50/50 VUs, 2208 complete and 0 interrupted iterations +default [ 80% ] 50 VUs 23.9s/30s + +running (0m25.0s), 50/50 VUs, 2408 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.9s/30s + +running (0m26.0s), 50/50 VUs, 2616 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m27.0s), 50/50 VUs, 2773 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m28.0s), 50/50 VUs, 2944 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m29.0s), 50/50 VUs, 3040 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.9s/30s + +running (0m30.0s), 50/50 VUs, 3093 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + +running (0m31.0s), 00/50 VUs, 3143 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 3143 101.471651/s + checks_succeeded...: 100.00% 3143 out of 3143 + checks_failed......: 0.00% 0 out of 3143 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=429.96ms min=28.43ms med=326.86ms max=1.9s p(90)=845.79ms p(95)=951.2ms + { expected_response:true }...: avg=429.96ms min=28.43ms med=326.86ms max=1.9s p(90)=845.79ms p(95)=951.2ms + http_req_failed................: 0.00% 0 out of 3144 + http_reqs......................: 3144 101.503936/s + + EXECUTION + iteration_duration.............: avg=484.01ms min=130.41ms med=382.12ms max=1.97s p(90)=898.18ms p(95)=1.01s + iterations.....................: 3143 101.471651/s + vus............................: 50 min=50 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 981 kB 32 kB/s + data_sent......................: 1.5 MB 47 kB/s + + + + +running (0m31.0s), 00/50 VUs, 3143 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_only-100vu-run1.json b/benchmarks/raw/pool_only-100vu-run1.json new file mode 100644 index 0000000..4c97d67 --- /dev/null +++ b/benchmarks/raw/pool_only-100vu-run1.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "checks": { + "passes": 6856, + "fails": 0, + "value": 1 + }, + "http_req_sending": { + "p(95)": 0.5454, + "avg": 0.09391598366632643, + "min": 0, + "med": 0, + "max": 52.1686, + "p(90)": 0 + }, + "http_req_duration": { + "p(95)": 524.96764, + "avg": 387.5184309173095, + "min": 23.9036, + "med": 387.905, + "max": 1247.3264, + "p(90)": 492.99224000000004 + }, + "http_req_duration{expected_response:true}": { + "min": 23.9036, + "med": 387.905, + "max": 1247.3264, + "p(90)": 492.99224000000004, + "p(95)": 524.96764, + "avg": 387.5184309173095 + }, + "http_req_failed": { + "passes": 0, + "fails": 6857, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "iteration_duration": { + "avg": 439.72967736289286, + "min": 83.1609, + "med": 440.01975000000004, + "max": 930.2215, + "p(90)": 545.3118, + "p(95)": 578.4997249999999 + }, + "http_req_waiting": { + "avg": 387.28777994749737, + "min": 22.5857, + "med": 387.8143, + "max": 1244.6645, + "p(90)": 492.8245, + "p(95)": 524.96764 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_reqs": { + "count": 6857, + "rate": 216.15154787567175 + }, + "http_req_receiving": { + "p(90)": 0.54554, + "p(95)": 0.58798, + "avg": 0.13673498614554475, + "min": 0, + "med": 0, + "max": 21.781 + }, + "http_req_blocked": { + "p(95)": 2.80212, + "avg": 1.5385571241067577, + "min": 0, + "med": 1.147, + "max": 47.6788, + "p(90)": 2.2947800000000003 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "data_received": { + "count": 2142070, + "rate": 67523.95306373636 + }, + "iterations": { + "count": 6856, + "rate": 216.12002511821578 + }, + "data_sent": { + "count": 3111801, + "rate": 98092.54817428369 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_connecting": { + "min": 0, + "med": 1.1048, + "max": 35.9045, + "p(90)": 2.2253200000000004, + "p(95)": 2.7045399999999997, + "avg": 1.4202655096981234 + } + }, + "root_group": { + "checks": { + "status is 200": { + "passes": 6856, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + } +} diff --git a/benchmarks/raw/pool_only-100vu-run1.txt b/benchmarks/raw/pool_only-100vu-run1.txt new file mode 100644 index 0000000..3bc2c7d --- /dev/null +++ b/benchmarks/raw/pool_only-100vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 130 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.7s/30s + +running (0m03.0s), 100/100 VUs, 330 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.7s/30s + +running (0m04.0s), 100/100 VUs, 514 complete and 0 interrupted iterations +default [ 9% ] 100 VUs 02.7s/30s + +running (0m05.0s), 100/100 VUs, 737 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.7s/30s + +running (0m06.0s), 100/100 VUs, 975 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.7s/30s + +running (0m07.0s), 100/100 VUs, 1178 complete and 0 interrupted iterations +default [ 19% ] 100 VUs 05.7s/30s + +running (0m08.0s), 100/100 VUs, 1428 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.7s/30s + +running (0m09.0s), 100/100 VUs, 1676 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.7s/30s + +running (0m10.0s), 100/100 VUs, 1901 complete and 0 interrupted iterations +default [ 29% ] 100 VUs 08.7s/30s + +running (0m11.0s), 100/100 VUs, 2143 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.7s/30s + +running (0m12.0s), 100/100 VUs, 2323 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.7s/30s + +running (0m13.0s), 100/100 VUs, 2530 complete and 0 interrupted iterations +default [ 39% ] 100 VUs 11.7s/30s + +running (0m14.0s), 100/100 VUs, 2745 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.7s/30s + +running (0m15.0s), 100/100 VUs, 3053 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.7s/30s + +running (0m16.0s), 100/100 VUs, 3291 complete and 0 interrupted iterations +default [ 49% ] 100 VUs 14.7s/30s + +running (0m17.0s), 100/100 VUs, 3638 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.7s/30s + +running (0m18.0s), 100/100 VUs, 3928 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.7s/30s + +running (0m19.0s), 100/100 VUs, 4089 complete and 0 interrupted iterations +default [ 59% ] 100 VUs 17.7s/30s + +running (0m20.0s), 100/100 VUs, 4328 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.7s/30s + +running (0m21.0s), 100/100 VUs, 4517 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.7s/30s + +running (0m22.0s), 100/100 VUs, 4702 complete and 0 interrupted iterations +default [ 69% ] 100 VUs 20.7s/30s + +running (0m23.0s), 100/100 VUs, 4901 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.7s/30s + +running (0m24.0s), 100/100 VUs, 5083 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.7s/30s + +running (0m25.0s), 100/100 VUs, 5326 complete and 0 interrupted iterations +default [ 79% ] 100 VUs 23.7s/30s + +running (0m26.0s), 100/100 VUs, 5547 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.7s/30s + +running (0m27.0s), 100/100 VUs, 5761 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.7s/30s + +running (0m28.0s), 100/100 VUs, 5985 complete and 0 interrupted iterations +default [ 89% ] 100 VUs 26.7s/30s + +running (0m29.0s), 100/100 VUs, 6212 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.7s/30s + +running (0m30.0s), 100/100 VUs, 6428 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.7s/30s + +running (0m31.0s), 100/100 VUs, 6687 complete and 0 interrupted iterations +default [ 99% ] 100 VUs 29.7s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6856 216.120025/s + checks_succeeded...: 100.00% 6856 out of 6856 + checks_failed......: 0.00% 0 out of 6856 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=387.51ms min=23.9ms med=387.9ms max=1.24s p(90)=492.99ms p(95)=524.96ms + { expected_response:true }...: avg=387.51ms min=23.9ms med=387.9ms max=1.24s p(90)=492.99ms p(95)=524.96ms + http_req_failed................: 0.00% 0 out of 6857 + http_reqs......................: 6857 216.151548/s + + EXECUTION + iteration_duration.............: avg=439.72ms min=83.16ms med=440.01ms max=930.22ms p(90)=545.31ms p(95)=578.49ms + iterations.....................: 6856 216.120025/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.1 MB 68 kB/s + data_sent......................: 3.1 MB 98 kB/s + + + + +running (0m31.7s), 000/100 VUs, 6856 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_only-100vu-run2.json b/benchmarks/raw/pool_only-100vu-run2.json new file mode 100644 index 0000000..d295716 --- /dev/null +++ b/benchmarks/raw/pool_only-100vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6553 + } + }, + "name": "", + "path": "" + }, + "metrics": { + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_duration": { + "avg": 406.60605346353503, + "min": 113.3377, + "med": 403.71205, + "max": 1497.2804, + "p(90)": 485.59324000000004, + "p(95)": 501.82628 + }, + "http_req_connecting": { + "p(90)": 2.5206199999999996, + "p(95)": 2.9042799999999995, + "avg": 2.0076104363747382, + "min": 0, + "med": 1.7755, + "max": 37.0322 + }, + "data_sent": { + "count": 2974239, + "rate": 93216.7228796064 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 485.59324000000004, + "p(95)": 501.82628, + "avg": 406.60605346353503, + "min": 113.3377, + "med": 403.71205, + "max": 1497.2804 + }, + "http_req_blocked": { + "min": 0, + "med": 1.87255, + "max": 42.9528, + "p(90)": 2.6687499999999997, + "p(95)": 3.033799999999999, + "avg": 2.1023657308513974 + }, + "iterations": { + "count": 6553, + "rate": 205.3799930099971 + }, + "http_req_receiving": { + "p(90)": 0.5471, + "p(95)": 0.5935699999999999, + "avg": 0.14101551724137934, + "min": 0, + "med": 0, + "max": 4.9934 + }, + "data_received": { + "count": 2056018, + "rate": 64438.419421399085 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_sending": { + "avg": 0.12197233750381434, + "min": 0, + "med": 0, + "max": 70.4779, + "p(90)": 0.39095999999999986, + "p(95)": 0.5464 + }, + "checks": { + "passes": 6553, + "fails": 0, + "value": 1 + }, + "http_req_waiting": { + "avg": 406.343065608789, + "min": 91.1876, + "med": 403.4295, + "max": 1494.857, + "p(90)": 485.33981, + "p(95)": 501.4492249999998 + }, + "iteration_duration": { + "max": 611.5049, + "p(90)": 538.1645000000001, + "p(95)": 554.70396, + "avg": 459.2614043186329, + "min": 170.1101, + "med": 456.5897 + }, + "http_req_failed": { + "fails": 6554, + "passes": 0, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_reqs": { + "count": 6554, + "rate": 205.4113343792951 + } + } +} diff --git a/benchmarks/raw/pool_only-100vu-run2.txt b/benchmarks/raw/pool_only-100vu-run2.txt new file mode 100644 index 0000000..2ffed42 --- /dev/null +++ b/benchmarks/raw/pool_only-100vu-run2.txt @@ -0,0 +1,148 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 49 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 00.4s/30s + +running (0m03.0s), 100/100 VUs, 251 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.4s/30s + +running (0m04.0s), 100/100 VUs, 455 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 02.4s/30s + +running (0m05.0s), 100/100 VUs, 654 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 03.4s/30s + +running (0m06.0s), 100/100 VUs, 861 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.4s/30s + +running (0m07.0s), 100/100 VUs, 1070 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 05.4s/30s + +running (0m08.0s), 100/100 VUs, 1271 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 06.4s/30s + +running (0m09.0s), 100/100 VUs, 1463 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.4s/30s + +running (0m10.0s), 100/100 VUs, 1657 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 08.4s/30s + +running (0m11.0s), 100/100 VUs, 1836 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 09.4s/30s + +running (0m12.0s), 100/100 VUs, 2041 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.4s/30s + +running (0m13.0s), 100/100 VUs, 2280 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 11.4s/30s + +running (0m14.0s), 100/100 VUs, 2531 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 12.4s/30s + +running (0m15.0s), 100/100 VUs, 2762 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.4s/30s + +running (0m16.0s), 100/100 VUs, 2974 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 14.4s/30s + +running (0m17.0s), 100/100 VUs, 3195 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 15.4s/30s + +running (0m18.0s), 100/100 VUs, 3403 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.4s/30s + +running (0m19.0s), 100/100 VUs, 3598 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 17.4s/30s + +running (0m20.0s), 100/100 VUs, 3830 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 18.4s/30s + +running (0m21.0s), 100/100 VUs, 4027 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.4s/30s + +running (0m22.0s), 100/100 VUs, 4266 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 20.4s/30s + +running (0m23.0s), 100/100 VUs, 4501 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 21.4s/30s + +running (0m24.0s), 100/100 VUs, 4742 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.4s/30s + +running (0m25.0s), 100/100 VUs, 4987 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 23.4s/30s + +running (0m26.0s), 100/100 VUs, 5187 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 24.4s/30s + +running (0m27.0s), 100/100 VUs, 5392 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.4s/30s + +running (0m28.0s), 100/100 VUs, 5582 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 26.4s/30s + +running (0m29.0s), 100/100 VUs, 5807 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 27.4s/30s + +running (0m30.0s), 100/100 VUs, 6047 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.4s/30s + +running (0m31.0s), 100/100 VUs, 6299 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 29.4s/30s + +running (0m31.9s), 000/100 VUs, 6553 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6553 205.379993/s + checks_succeeded...: 100.00% 6553 out of 6553 + checks_failed......: 0.00% 0 out of 6553 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=406.6ms min=113.33ms med=403.71ms max=1.49s p(90)=485.59ms p(95)=501.82ms + { expected_response:true }...: avg=406.6ms min=113.33ms med=403.71ms max=1.49s p(90)=485.59ms p(95)=501.82ms + http_req_failed................: 0.00% 0 out of 6554 + http_reqs......................: 6554 205.411334/s + + EXECUTION + iteration_duration.............: avg=459.26ms min=170.11ms med=456.58ms max=611.5ms p(90)=538.16ms p(95)=554.7ms + iterations.....................: 6553 205.379993/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.1 MB 64 kB/s + data_sent......................: 3.0 MB 93 kB/s + + + + +running (0m31.9s), 000/100 VUs, 6553 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_only-100vu-run3.json b/benchmarks/raw/pool_only-100vu-run3.json new file mode 100644 index 0000000..37558a9 --- /dev/null +++ b/benchmarks/raw/pool_only-100vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_sending": { + "p(90)": 0.49684000000000034, + "p(95)": 0.5471, + "avg": 0.0795217593900029, + "min": 0, + "med": 0, + "max": 36.2267 + }, + "checks": { + "passes": 7081, + "fails": 0, + "value": 1 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_duration{expected_response:true}": { + "avg": 372.97637287489454, + "min": 39.7424, + "med": 360.84175, + "max": 1596.8432, + "p(90)": 424.88804000000005, + "p(95)": 453.053135 + }, + "http_req_duration": { + "avg": 372.97637287489454, + "min": 39.7424, + "med": 360.84175, + "max": 1596.8432, + "p(90)": 424.88804000000005, + "p(95)": 453.053135 + }, + "iterations": { + "count": 7081, + "rate": 222.22549166974204 + }, + "data_received": { + "rate": 69230.7255837736, + "count": 2205970 + }, + "iteration_duration": { + "p(90)": 477.6465, + "p(95)": 505.7183, + "avg": 425.30106102245696, + "min": 97.2811, + "med": 413.5477, + "max": 1649.7873 + }, + "http_req_blocked": { + "avg": 1.878211804574976, + "min": 0, + "med": 1.6731500000000001, + "max": 41.9969, + "p(90)": 2.5531200000000003, + "p(95)": 2.83669 + }, + "http_req_failed": { + "passes": 0, + "fails": 7082, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_waiting": { + "max": 1596.3576, + "p(90)": 424.69316, + "p(95)": 453.022095, + "avg": 372.7671847924321, + "min": 31.3666, + "med": 360.71315 + }, + "data_sent": { + "count": 3213951, + "rate": 100864.54472213799 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_req_connecting": { + "avg": 1.79956597006495, + "min": 0, + "med": 1.6428500000000001, + "max": 40.1726, + "p(90)": 2.459230000000001, + "p(95)": 2.77819 + }, + "http_reqs": { + "count": 7082, + "rate": 222.25687501837496 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_receiving": { + "p(95)": 0.568595, + "avg": 0.1296663230725783, + "min": 0, + "med": 0, + "max": 12.9209, + "p(90)": 0.5434 + } + }, + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "passes": 7081, + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f" + } + }, + "name": "" + } +} diff --git a/benchmarks/raw/pool_only-100vu-run3.txt b/benchmarks/raw/pool_only-100vu-run3.txt new file mode 100644 index 0000000..c66adc9 --- /dev/null +++ b/benchmarks/raw/pool_only-100vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 89 complete and 0 interrupted iterations +default [ 2% ] 100 VUs 00.5s/30s + +running (0m03.0s), 100/100 VUs, 313 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 01.5s/30s + +running (0m04.0s), 100/100 VUs, 520 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 02.5s/30s + +running (0m05.0s), 100/100 VUs, 783 complete and 0 interrupted iterations +default [ 12% ] 100 VUs 03.5s/30s + +running (0m06.0s), 100/100 VUs, 1056 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 04.5s/30s + +running (0m07.0s), 100/100 VUs, 1309 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 05.5s/30s + +running (0m08.0s), 100/100 VUs, 1463 complete and 0 interrupted iterations +default [ 22% ] 100 VUs 06.5s/30s + +running (0m09.0s), 100/100 VUs, 1505 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 07.5s/30s + +running (0m10.0s), 100/100 VUs, 1779 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 08.5s/30s + +running (0m11.0s), 100/100 VUs, 1983 complete and 0 interrupted iterations +default [ 32% ] 100 VUs 09.5s/30s + +running (0m12.0s), 100/100 VUs, 2269 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 10.5s/30s + +running (0m13.0s), 100/100 VUs, 2560 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 11.5s/30s + +running (0m14.0s), 100/100 VUs, 2807 complete and 0 interrupted iterations +default [ 42% ] 100 VUs 12.5s/30s + +running (0m15.0s), 100/100 VUs, 3041 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 13.5s/30s + +running (0m16.0s), 100/100 VUs, 3246 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 14.5s/30s + +running (0m17.0s), 100/100 VUs, 3465 complete and 0 interrupted iterations +default [ 52% ] 100 VUs 15.5s/30s + +running (0m18.0s), 100/100 VUs, 3721 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 16.5s/30s + +running (0m19.0s), 100/100 VUs, 3978 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 17.5s/30s + +running (0m20.0s), 100/100 VUs, 4227 complete and 0 interrupted iterations +default [ 62% ] 100 VUs 18.5s/30s + +running (0m21.0s), 100/100 VUs, 4477 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 19.5s/30s + +running (0m22.0s), 100/100 VUs, 4726 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 20.5s/30s + +running (0m23.0s), 100/100 VUs, 4948 complete and 0 interrupted iterations +default [ 72% ] 100 VUs 21.5s/30s + +running (0m24.0s), 100/100 VUs, 5189 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 22.5s/30s + +running (0m25.0s), 100/100 VUs, 5417 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 23.5s/30s + +running (0m26.0s), 100/100 VUs, 5680 complete and 0 interrupted iterations +default [ 82% ] 100 VUs 24.5s/30s + +running (0m27.0s), 100/100 VUs, 5919 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 25.5s/30s + +running (0m28.0s), 100/100 VUs, 6153 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 26.5s/30s + +running (0m29.0s), 100/100 VUs, 6390 complete and 0 interrupted iterations +default [ 92% ] 100 VUs 27.5s/30s + +running (0m30.0s), 100/100 VUs, 6647 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 28.5s/30s + +running (0m31.0s), 100/100 VUs, 6867 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 29.5s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7081 222.225492/s + checks_succeeded...: 100.00% 7081 out of 7081 + checks_failed......: 0.00% 0 out of 7081 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=372.97ms min=39.74ms med=360.84ms max=1.59s p(90)=424.88ms p(95)=453.05ms + { expected_response:true }...: avg=372.97ms min=39.74ms med=360.84ms max=1.59s p(90)=424.88ms p(95)=453.05ms + http_req_failed................: 0.00% 0 out of 7082 + http_reqs......................: 7082 222.256875/s + + EXECUTION + iteration_duration.............: avg=425.3ms min=97.28ms med=413.54ms max=1.64s p(90)=477.64ms p(95)=505.71ms + iterations.....................: 7081 222.225492/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.2 MB 69 kB/s + data_sent......................: 3.2 MB 101 kB/s + + + + +running (0m31.9s), 000/100 VUs, 7081 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_only-100vu-warmup.json b/benchmarks/raw/pool_only-100vu-warmup.json new file mode 100644 index 0000000..39e05c2 --- /dev/null +++ b/benchmarks/raw/pool_only-100vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6960 + } + } + }, + "metrics": { + "http_req_failed": { + "passes": 0, + "fails": 6961, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 100, + "min": 100, + "max": 100 + }, + "http_req_sending": { + "avg": 0.07729222812814251, + "min": 0, + "med": 0, + "max": 44.8274, + "p(90)": 0.3323, + "p(95)": 0.5459 + }, + "checks": { + "passes": 6960, + "fails": 0, + "value": 1 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "avg": 433.0313903160913, + "min": 104.7718, + "med": 431.1669, + "max": 786.726, + "p(90)": 484.55853, + "p(95)": 510.03294999999974 + }, + "http_req_blocked": { + "avg": 1.8088054015227737, + "min": 0, + "med": 1.6473, + "max": 47.1098, + "p(90)": 2.3339, + "p(95)": 2.6876 + }, + "data_received": { + "count": 2171606, + "rate": 68968.70346655989 + }, + "http_req_waiting": { + "avg": 380.51827939951085, + "min": 23.71, + "med": 378.7933, + "max": 1043.1249, + "p(90)": 432.1242, + "p(95)": 457.2161 + }, + "http_req_duration": { + "med": 379.0028, + "max": 1045.9441, + "p(90)": 432.2762, + "p(95)": 457.7899, + "avg": 380.7208372072968, + "min": 32.969 + }, + "http_req_receiving": { + "avg": 0.125265579658095, + "min": 0, + "med": 0, + "max": 9.259, + "p(90)": 0.5442, + "p(95)": 0.5684 + }, + "http_req_duration{expected_response:true}": { + "p(95)": 457.7899, + "avg": 380.7208372072968, + "min": 32.969, + "med": 379.0028, + "max": 1045.9441, + "p(90)": 432.2762 + }, + "http_req_connecting": { + "p(90)": 2.2722, + "p(95)": 2.628, + "avg": 1.7241390030168104, + "min": 0, + "med": 1.6315, + "max": 29.3958 + }, + "data_sent": { + "count": 3159017, + "rate": 100328.1933826033 + }, + "vus": { + "value": 100, + "min": 0, + "max": 100 + }, + "http_reqs": { + "count": 6961, + "rate": 221.07654189144966 + }, + "iterations": { + "count": 6960, + "rate": 221.04478258360717 + } + } +} diff --git a/benchmarks/raw/pool_only-100vu-warmup.txt b/benchmarks/raw/pool_only-100vu-warmup.txt new file mode 100644 index 0000000..47d464d --- /dev/null +++ b/benchmarks/raw/pool_only-100vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m0s max duration (incl. graceful stop): + * default: 100 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 100/100 VUs, 178 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 00.9s/30s + +running (0m03.0s), 100/100 VUs, 417 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 01.9s/30s + +running (0m04.0s), 100/100 VUs, 655 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 02.9s/30s + +running (0m05.0s), 100/100 VUs, 882 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 03.9s/30s + +running (0m06.0s), 100/100 VUs, 1099 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 04.9s/30s + +running (0m07.0s), 100/100 VUs, 1304 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 05.9s/30s + +running (0m08.0s), 100/100 VUs, 1537 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 06.9s/30s + +running (0m09.0s), 100/100 VUs, 1772 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 07.9s/30s + +running (0m10.0s), 100/100 VUs, 2030 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 08.9s/30s + +running (0m11.0s), 100/100 VUs, 2279 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 09.9s/30s + +running (0m12.0s), 100/100 VUs, 2551 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 10.9s/30s + +running (0m13.0s), 100/100 VUs, 2795 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 11.9s/30s + +running (0m14.0s), 100/100 VUs, 3015 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 12.9s/30s + +running (0m15.0s), 100/100 VUs, 3251 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 13.9s/30s + +running (0m16.0s), 100/100 VUs, 3490 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 14.9s/30s + +running (0m17.0s), 100/100 VUs, 3707 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 15.9s/30s + +running (0m18.0s), 100/100 VUs, 3966 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 16.9s/30s + +running (0m19.0s), 100/100 VUs, 4205 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 17.9s/30s + +running (0m20.0s), 100/100 VUs, 4439 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 18.9s/30s + +running (0m21.0s), 100/100 VUs, 4687 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 19.9s/30s + +running (0m22.0s), 100/100 VUs, 4901 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 20.9s/30s + +running (0m23.0s), 100/100 VUs, 5109 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 21.9s/30s + +running (0m24.0s), 100/100 VUs, 5337 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 22.9s/30s + +running (0m25.0s), 100/100 VUs, 5558 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 23.9s/30s + +running (0m26.0s), 100/100 VUs, 5714 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 24.9s/30s + +running (0m27.0s), 100/100 VUs, 5954 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 25.9s/30s + +running (0m28.0s), 100/100 VUs, 6165 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 26.9s/30s + +running (0m29.0s), 100/100 VUs, 6390 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 27.9s/30s + +running (0m30.0s), 100/100 VUs, 6616 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 28.9s/30s + +running (0m31.0s), 100/100 VUs, 6833 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6960 221.044783/s + checks_succeeded...: 100.00% 6960 out of 6960 + checks_failed......: 0.00% 0 out of 6960 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=380.72ms min=32.96ms med=379ms max=1.04s p(90)=432.27ms p(95)=457.78ms + { expected_response:true }...: avg=380.72ms min=32.96ms med=379ms max=1.04s p(90)=432.27ms p(95)=457.78ms + http_req_failed................: 0.00% 0 out of 6961 + http_reqs......................: 6961 221.076542/s + + EXECUTION + iteration_duration.............: avg=433.03ms min=104.77ms med=431.16ms max=786.72ms p(90)=484.55ms p(95)=510.03ms + iterations.....................: 6960 221.044783/s + vus............................: 100 min=0 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 2.2 MB 69 kB/s + data_sent......................: 3.2 MB 100 kB/s + + + + +running (0m31.5s), 000/100 VUs, 6960 complete and 0 interrupted iterations +default โœ“ [ 100% ] 100 VUs 30s diff --git a/benchmarks/raw/pool_only-20vu-run1.json b/benchmarks/raw/pool_only-20vu-run1.json new file mode 100644 index 0000000..bbd1a92 --- /dev/null +++ b/benchmarks/raw/pool_only-20vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6015, + "fails": 0 + } + }, + "name": "" + }, + "metrics": { + "http_req_sending": { + "min": 0, + "med": 0, + "max": 1.5443, + "p(90)": 0, + "p(95)": 0.5424249999999999, + "avg": 0.055269232047872346 + }, + "http_req_tls_handshaking": { + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0 + }, + "http_req_failed": { + "passes": 0, + "fails": 6016, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_receiving": { + "avg": 0.14010472074468086, + "min": 0, + "med": 0, + "max": 5.6098, + "p(90)": 0.5475, + "p(95)": 0.6109 + }, + "http_req_blocked": { + "med": 1.5239, + "max": 28.9395, + "p(90)": 2.0657, + "p(95)": 2.284475, + "avg": 1.527927576462764, + "min": 0 + }, + "http_req_connecting": { + "avg": 1.4461391622340416, + "min": 0, + "med": 1.4116, + "max": 24.7496, + "p(90)": 1.942, + "p(95)": 2.19075 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_reqs": { + "count": 6016, + "rate": 192.30542766342475 + }, + "http_req_duration{expected_response:true}": { + "med": 44.8053, + "max": 1117.3821, + "p(90)": 70.35634999999999, + "p(95)": 81.064725, + "avg": 47.851201279920076, + "min": 14.3715 + }, + "iteration_duration": { + "max": 188.3586, + "p(90)": 122.78308, + "p(95)": 133.64075, + "avg": 99.9395594513716, + "min": 65.9802, + "med": 96.959 + }, + "http_req_duration": { + "med": 44.8053, + "max": 1117.3821, + "p(90)": 70.35634999999999, + "p(95)": 81.064725, + "avg": 47.851201279920076, + "min": 14.3715 + }, + "data_sent": { + "count": 2738817, + "rate": 87548.10081064793 + }, + "checks": { + "passes": 6015, + "fails": 0, + "value": 1 + }, + "iterations": { + "count": 6015, + "rate": 192.27346200058176 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_waiting": { + "avg": 47.6558273271275, + "min": 14.0033, + "med": 44.5817, + "max": 1113.9709, + "p(90)": 70.07405, + "p(95)": 80.664175 + }, + "data_received": { + "count": 1903226, + "rate": 60837.8806300115 + } + } +} diff --git a/benchmarks/raw/pool_only-20vu-run1.txt b/benchmarks/raw/pool_only-20vu-run1.txt new file mode 100644 index 0000000..b21aad8 --- /dev/null +++ b/benchmarks/raw/pool_only-20vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 162 complete and 0 interrupted iterations +default [ 3% ] 20 VUs 00.8s/30s + +running (0m03.0s), 20/20 VUs, 373 complete and 0 interrupted iterations +default [ 6% ] 20 VUs 01.8s/30s + +running (0m04.0s), 20/20 VUs, 561 complete and 0 interrupted iterations +default [ 9% ] 20 VUs 02.8s/30s + +running (0m05.0s), 20/20 VUs, 771 complete and 0 interrupted iterations +default [ 13% ] 20 VUs 03.8s/30s + +running (0m06.0s), 20/20 VUs, 988 complete and 0 interrupted iterations +default [ 16% ] 20 VUs 04.8s/30s + +running (0m07.0s), 20/20 VUs, 1192 complete and 0 interrupted iterations +default [ 19% ] 20 VUs 05.8s/30s + +running (0m08.0s), 20/20 VUs, 1409 complete and 0 interrupted iterations +default [ 23% ] 20 VUs 06.8s/30s + +running (0m09.0s), 20/20 VUs, 1604 complete and 0 interrupted iterations +default [ 26% ] 20 VUs 07.8s/30s + +running (0m10.0s), 20/20 VUs, 1810 complete and 0 interrupted iterations +default [ 29% ] 20 VUs 08.8s/30s + +running (0m11.0s), 20/20 VUs, 2016 complete and 0 interrupted iterations +default [ 33% ] 20 VUs 09.8s/30s + +running (0m12.0s), 20/20 VUs, 2199 complete and 0 interrupted iterations +default [ 36% ] 20 VUs 10.8s/30s + +running (0m13.0s), 20/20 VUs, 2366 complete and 0 interrupted iterations +default [ 39% ] 20 VUs 11.8s/30s + +running (0m14.0s), 20/20 VUs, 2531 complete and 0 interrupted iterations +default [ 43% ] 20 VUs 12.8s/30s + +running (0m15.0s), 20/20 VUs, 2723 complete and 0 interrupted iterations +default [ 46% ] 20 VUs 13.8s/30s + +running (0m16.0s), 20/20 VUs, 2936 complete and 0 interrupted iterations +default [ 49% ] 20 VUs 14.8s/30s + +running (0m17.0s), 20/20 VUs, 3158 complete and 0 interrupted iterations +default [ 53% ] 20 VUs 15.8s/30s + +running (0m18.0s), 20/20 VUs, 3370 complete and 0 interrupted iterations +default [ 56% ] 20 VUs 16.8s/30s + +running (0m19.0s), 20/20 VUs, 3572 complete and 0 interrupted iterations +default [ 59% ] 20 VUs 17.8s/30s + +running (0m20.0s), 20/20 VUs, 3763 complete and 0 interrupted iterations +default [ 63% ] 20 VUs 18.8s/30s + +running (0m21.0s), 20/20 VUs, 3961 complete and 0 interrupted iterations +default [ 66% ] 20 VUs 19.8s/30s + +running (0m22.0s), 20/20 VUs, 4157 complete and 0 interrupted iterations +default [ 69% ] 20 VUs 20.8s/30s + +running (0m23.0s), 20/20 VUs, 4363 complete and 0 interrupted iterations +default [ 73% ] 20 VUs 21.8s/30s + +running (0m24.0s), 20/20 VUs, 4554 complete and 0 interrupted iterations +default [ 76% ] 20 VUs 22.8s/30s + +running (0m25.0s), 20/20 VUs, 4766 complete and 0 interrupted iterations +default [ 79% ] 20 VUs 23.8s/30s + +running (0m26.0s), 20/20 VUs, 4974 complete and 0 interrupted iterations +default [ 83% ] 20 VUs 24.8s/30s + +running (0m27.0s), 20/20 VUs, 5194 complete and 0 interrupted iterations +default [ 86% ] 20 VUs 25.8s/30s + +running (0m28.0s), 20/20 VUs, 5401 complete and 0 interrupted iterations +default [ 89% ] 20 VUs 26.8s/30s + +running (0m29.0s), 20/20 VUs, 5590 complete and 0 interrupted iterations +default [ 93% ] 20 VUs 27.8s/30s + +running (0m30.0s), 20/20 VUs, 5772 complete and 0 interrupted iterations +default [ 96% ] 20 VUs 28.8s/30s + +running (0m31.0s), 20/20 VUs, 5966 complete and 0 interrupted iterations +default [ 99% ] 20 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6015 192.273462/s + checks_succeeded...: 100.00% 6015 out of 6015 + checks_failed......: 0.00% 0 out of 6015 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=47.85ms min=14.37ms med=44.8ms max=1.11s p(90)=70.35ms p(95)=81.06ms + { expected_response:true }...: avg=47.85ms min=14.37ms med=44.8ms max=1.11s p(90)=70.35ms p(95)=81.06ms + http_req_failed................: 0.00% 0 out of 6016 + http_reqs......................: 6016 192.305428/s + + EXECUTION + iteration_duration.............: avg=99.93ms min=65.98ms med=96.95ms max=188.35ms p(90)=122.78ms p(95)=133.64ms + iterations.....................: 6015 192.273462/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.9 MB 61 kB/s + data_sent......................: 2.7 MB 88 kB/s + + + + +running (0m31.3s), 00/20 VUs, 6015 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_only-20vu-run2.json b/benchmarks/raw/pool_only-20vu-run2.json new file mode 100644 index 0000000..f556432 --- /dev/null +++ b/benchmarks/raw/pool_only-20vu-run2.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5949, + "fails": 0 + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + }, + "metrics": { + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_receiving": { + "avg": 0.13492400000000027, + "min": 0, + "med": 0, + "max": 2.5294, + "p(90)": 0.5452, + "p(95)": 0.59172 + }, + "vus": { + "max": 20, + "value": 20, + "min": 20 + }, + "iterations": { + "count": 5949, + "rate": 191.92552569519358 + }, + "http_req_duration": { + "min": 11.9267, + "med": 44.11735, + "max": 875.3064, + "p(90)": 74.63353000000001, + "p(95)": 90.51522500000002, + "avg": 48.84560038655452 + }, + "http_req_sending": { + "avg": 0.058935210084033525, + "min": 0, + "med": 0, + "max": 10.1004, + "p(90)": 0, + "p(95)": 0.5411 + }, + "http_reqs": { + "count": 5950, + "rate": 191.95778750822018 + }, + "http_req_connecting": { + "avg": 1.5618509075630274, + "min": 0, + "med": 1.6041500000000002, + "max": 22.7337, + "p(90)": 2.1413, + "p(95)": 2.31325 + }, + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "iteration_duration": { + "min": 63.8568, + "med": 96.2855, + "max": 248.6355, + "p(90)": 127.15878, + "p(95)": 143.06563999999997, + "avg": 100.91542632375216 + }, + "http_req_failed": { + "passes": 0, + "fails": 5950, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "data_received": { + "count": 1884482, + "rate": 60796.80593597744 + }, + "checks": { + "passes": 5949, + "fails": 0, + "value": 1 + }, + "http_req_waiting": { + "avg": 48.65174117647059, + "min": 11.9267, + "med": 44.02285, + "max": 873.7287, + "p(90)": 74.53580000000001, + "p(95)": 90.03548000000004 + }, + "data_sent": { + "count": 2708721, + "rate": 87388.2504432023 + }, + "http_req_duration{expected_response:true}": { + "max": 875.3064, + "p(90)": 74.63353000000001, + "p(95)": 90.51522500000002, + "avg": 48.84560038655452, + "min": 11.9267, + "med": 44.11735 + }, + "http_req_blocked": { + "avg": 1.6381264201680665, + "min": 0, + "med": 1.61965, + "max": 25.8821, + "p(90)": 2.192, + "p(95)": 2.43447 + } + } +} diff --git a/benchmarks/raw/pool_only-20vu-run2.txt b/benchmarks/raw/pool_only-20vu-run2.txt new file mode 100644 index 0000000..b5da99b --- /dev/null +++ b/benchmarks/raw/pool_only-20vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 0 complete and 0 interrupted iterations +default [ 0% ] 20 VUs 00.1s/30s + +running (0m02.0s), 20/20 VUs, 168 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.1s/30s + +running (0m03.0s), 20/20 VUs, 340 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.1s/30s + +running (0m04.0s), 20/20 VUs, 541 complete and 0 interrupted iterations +default [ 10% ] 20 VUs 03.1s/30s + +running (0m05.0s), 20/20 VUs, 761 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.1s/30s + +running (0m06.0s), 20/20 VUs, 963 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.1s/30s + +running (0m07.0s), 20/20 VUs, 1160 complete and 0 interrupted iterations +default [ 20% ] 20 VUs 06.1s/30s + +running (0m08.0s), 20/20 VUs, 1379 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.1s/30s + +running (0m09.0s), 20/20 VUs, 1579 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.1s/30s + +running (0m10.0s), 20/20 VUs, 1778 complete and 0 interrupted iterations +default [ 30% ] 20 VUs 09.1s/30s + +running (0m11.0s), 20/20 VUs, 1984 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.1s/30s + +running (0m12.0s), 20/20 VUs, 2213 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.1s/30s + +running (0m13.0s), 20/20 VUs, 2415 complete and 0 interrupted iterations +default [ 40% ] 20 VUs 12.1s/30s + +running (0m14.0s), 20/20 VUs, 2628 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.1s/30s + +running (0m15.0s), 20/20 VUs, 2858 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.1s/30s + +running (0m16.0s), 20/20 VUs, 3077 complete and 0 interrupted iterations +default [ 50% ] 20 VUs 15.1s/30s + +running (0m17.0s), 20/20 VUs, 3268 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.1s/30s + +running (0m18.0s), 20/20 VUs, 3466 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.1s/30s + +running (0m19.0s), 20/20 VUs, 3654 complete and 0 interrupted iterations +default [ 60% ] 20 VUs 18.1s/30s + +running (0m20.0s), 20/20 VUs, 3859 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.1s/30s + +running (0m21.0s), 20/20 VUs, 4089 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.1s/30s + +running (0m22.0s), 20/20 VUs, 4303 complete and 0 interrupted iterations +default [ 70% ] 20 VUs 21.1s/30s + +running (0m23.0s), 20/20 VUs, 4529 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.1s/30s + +running (0m24.0s), 20/20 VUs, 4757 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.1s/30s + +running (0m25.0s), 20/20 VUs, 4953 complete and 0 interrupted iterations +default [ 80% ] 20 VUs 24.1s/30s + +running (0m26.0s), 20/20 VUs, 5121 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.1s/30s + +running (0m27.0s), 20/20 VUs, 5247 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.1s/30s + +running (0m28.0s), 20/20 VUs, 5390 complete and 0 interrupted iterations +default [ 90% ] 20 VUs 27.1s/30s + +running (0m29.0s), 20/20 VUs, 5565 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.1s/30s + +running (0m30.0s), 20/20 VUs, 5751 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.1s/30s + +running (0m31.0s), 01/20 VUs, 5949 complete and 0 interrupted iterations +default โ†“ [ 100% ] 20 VUs 30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5949 191.925526/s + checks_succeeded...: 100.00% 5949 out of 5949 + checks_failed......: 0.00% 0 out of 5949 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=48.84ms min=11.92ms med=44.11ms max=875.3ms p(90)=74.63ms p(95)=90.51ms + { expected_response:true }...: avg=48.84ms min=11.92ms med=44.11ms max=875.3ms p(90)=74.63ms p(95)=90.51ms + http_req_failed................: 0.00% 0 out of 5950 + http_reqs......................: 5950 191.957788/s + + EXECUTION + iteration_duration.............: avg=100.91ms min=63.85ms med=96.28ms max=248.63ms p(90)=127.15ms p(95)=143.06ms + iterations.....................: 5949 191.925526/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.9 MB 61 kB/s + data_sent......................: 2.7 MB 87 kB/s + + + + +running (0m31.0s), 00/20 VUs, 5949 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_only-20vu-run3.json b/benchmarks/raw/pool_only-20vu-run3.json new file mode 100644 index 0000000..b22c599 --- /dev/null +++ b/benchmarks/raw/pool_only-20vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_reqs": { + "count": 5524, + "rate": 175.1122517401051 + }, + "http_req_duration{expected_response:true}": { + "max": 1595.7633, + "p(90)": 77.39702, + "p(95)": 89.99211999999997, + "avg": 56.63390095944966, + "min": 10.8464, + "med": 47.16715 + }, + "http_req_connecting": { + "p(95)": 2.503325, + "avg": 1.5727381788559036, + "min": 0, + "med": 1.57205, + "max": 22.4534, + "p(90)": 2.17461 + }, + "iterations": { + "count": 5523, + "rate": 175.08055147729914 + }, + "http_req_sending": { + "max": 19.0318, + "p(90)": 0, + "p(95)": 0.5424549999999998, + "avg": 0.059896705286024636, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "avg": 108.75256619590775, + "min": 63.2026, + "med": 99.5014, + "max": 1647.7527, + "p(90)": 130.10136, + "p(95)": 142.91986999999997 + }, + "http_req_waiting": { + "p(95)": 89.77585499999995, + "avg": 56.43469623461267, + "min": 10.8464, + "med": 46.9884, + "max": 1595.7633, + "p(90)": 77.16727999999999 + }, + "data_received": { + "count": 1763498, + "rate": 55903.35005777912 + }, + "checks": { + "passes": 5523, + "fails": 0, + "value": 1 + }, + "vus_max": { + "min": 20, + "max": 20, + "value": 20 + }, + "http_req_duration": { + "avg": 56.63390095944966, + "min": 10.8464, + "med": 47.16715, + "max": 1595.7633, + "p(90)": 77.39702, + "p(95)": 89.99211999999997 + }, + "data_sent": { + "count": 2514465, + "rate": 79709.20131638004 + }, + "http_req_blocked": { + "avg": 1.6535681752353442, + "min": 0, + "med": 1.60445, + "max": 39.1024, + "p(90)": 2.2493, + "p(95)": 2.62057 + }, + "vus": { + "value": 20, + "min": 0, + "max": 20 + }, + "http_req_failed": { + "passes": 0, + "fails": 5524, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "http_req_receiving": { + "avg": 0.13930801955105018, + "min": 0, + "med": 0, + "max": 5.0905, + "p(90)": 0.5470700000000001, + "p(95)": 0.6100199999999993 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5523, + "fails": 0 + } + } + } +} diff --git a/benchmarks/raw/pool_only-20vu-run3.txt b/benchmarks/raw/pool_only-20vu-run3.txt new file mode 100644 index 0000000..3b397d2 --- /dev/null +++ b/benchmarks/raw/pool_only-20vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 20/20 VUs, 85 complete and 0 interrupted iterations +default [ 2% ] 20 VUs 00.5s/30s + +running (0m03.0s), 20/20 VUs, 295 complete and 0 interrupted iterations +default [ 5% ] 20 VUs 01.5s/30s + +running (0m04.0s), 20/20 VUs, 510 complete and 0 interrupted iterations +default [ 8% ] 20 VUs 02.5s/30s + +running (0m05.0s), 20/20 VUs, 706 complete and 0 interrupted iterations +default [ 12% ] 20 VUs 03.5s/30s + +running (0m06.0s), 20/20 VUs, 943 complete and 0 interrupted iterations +default [ 15% ] 20 VUs 04.5s/30s + +running (0m07.0s), 20/20 VUs, 1158 complete and 0 interrupted iterations +default [ 18% ] 20 VUs 05.5s/30s + +running (0m08.0s), 20/20 VUs, 1371 complete and 0 interrupted iterations +default [ 22% ] 20 VUs 06.5s/30s + +running (0m09.0s), 20/20 VUs, 1570 complete and 0 interrupted iterations +default [ 25% ] 20 VUs 07.5s/30s + +running (0m10.0s), 20/20 VUs, 1768 complete and 0 interrupted iterations +default [ 28% ] 20 VUs 08.5s/30s + +running (0m11.0s), 20/20 VUs, 1984 complete and 0 interrupted iterations +default [ 32% ] 20 VUs 09.5s/30s + +running (0m12.0s), 20/20 VUs, 2193 complete and 0 interrupted iterations +default [ 35% ] 20 VUs 10.5s/30s + +running (0m13.0s), 20/20 VUs, 2392 complete and 0 interrupted iterations +default [ 38% ] 20 VUs 11.5s/30s + +running (0m14.0s), 20/20 VUs, 2600 complete and 0 interrupted iterations +default [ 42% ] 20 VUs 12.5s/30s + +running (0m15.0s), 20/20 VUs, 2801 complete and 0 interrupted iterations +default [ 45% ] 20 VUs 13.5s/30s + +running (0m16.0s), 20/20 VUs, 3015 complete and 0 interrupted iterations +default [ 48% ] 20 VUs 14.5s/30s + +running (0m17.0s), 20/20 VUs, 3192 complete and 0 interrupted iterations +default [ 52% ] 20 VUs 15.5s/30s + +running (0m18.0s), 20/20 VUs, 3379 complete and 0 interrupted iterations +default [ 55% ] 20 VUs 16.5s/30s + +running (0m19.0s), 20/20 VUs, 3578 complete and 0 interrupted iterations +default [ 58% ] 20 VUs 17.5s/30s + +running (0m20.0s), 20/20 VUs, 3774 complete and 0 interrupted iterations +default [ 62% ] 20 VUs 18.5s/30s + +running (0m21.0s), 20/20 VUs, 3963 complete and 0 interrupted iterations +default [ 65% ] 20 VUs 19.5s/30s + +running (0m22.0s), 20/20 VUs, 4137 complete and 0 interrupted iterations +default [ 68% ] 20 VUs 20.5s/30s + +running (0m23.0s), 20/20 VUs, 4335 complete and 0 interrupted iterations +default [ 72% ] 20 VUs 21.5s/30s + +running (0m24.0s), 20/20 VUs, 4519 complete and 0 interrupted iterations +default [ 75% ] 20 VUs 22.5s/30s + +running (0m25.0s), 20/20 VUs, 4674 complete and 0 interrupted iterations +default [ 78% ] 20 VUs 23.5s/30s + +running (0m26.0s), 20/20 VUs, 4827 complete and 0 interrupted iterations +default [ 82% ] 20 VUs 24.5s/30s + +running (0m27.0s), 20/20 VUs, 4976 complete and 0 interrupted iterations +default [ 85% ] 20 VUs 25.5s/30s + +running (0m28.0s), 20/20 VUs, 5162 complete and 0 interrupted iterations +default [ 88% ] 20 VUs 26.5s/30s + +running (0m29.0s), 20/20 VUs, 5367 complete and 0 interrupted iterations +default [ 92% ] 20 VUs 27.5s/30s + +running (0m30.0s), 20/20 VUs, 5421 complete and 0 interrupted iterations +default [ 95% ] 20 VUs 28.5s/30s + +running (0m31.0s), 20/20 VUs, 5441 complete and 0 interrupted iterations +default [ 98% ] 20 VUs 29.5s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5523 175.080551/s + checks_succeeded...: 100.00% 5523 out of 5523 + checks_failed......: 0.00% 0 out of 5523 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=56.63ms min=10.84ms med=47.16ms max=1.59s p(90)=77.39ms p(95)=89.99ms + { expected_response:true }...: avg=56.63ms min=10.84ms med=47.16ms max=1.59s p(90)=77.39ms p(95)=89.99ms + http_req_failed................: 0.00% 0 out of 5524 + http_reqs......................: 5524 175.112252/s + + EXECUTION + iteration_duration.............: avg=108.75ms min=63.2ms med=99.5ms max=1.64s p(90)=130.1ms p(95)=142.91ms + iterations.....................: 5523 175.080551/s + vus............................: 20 min=0 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.8 MB 56 kB/s + data_sent......................: 2.5 MB 80 kB/s + + + + +running (0m31.5s), 00/20 VUs, 5523 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_only-20vu-warmup.json b/benchmarks/raw/pool_only-20vu-warmup.json new file mode 100644 index 0000000..21a0838 --- /dev/null +++ b/benchmarks/raw/pool_only-20vu-warmup.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 5946, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + } + }, + "metrics": { + "http_req_tls_handshaking": { + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0 + }, + "checks": { + "passes": 5946, + "fails": 0, + "value": 1 + }, + "iteration_duration": { + "max": 532.0136, + "p(90)": 126.11735, + "p(95)": 140.117275, + "avg": 100.99613212243509, + "min": 64.7356, + "med": 95.4827 + }, + "data_sent": { + "count": 2707353, + "rate": 87621.73135760042 + }, + "iterations": { + "count": 5946, + "rate": 192.4384499000655 + }, + "http_reqs": { + "count": 5947, + "rate": 192.47081425423642 + }, + "http_req_connecting": { + "avg": 1.2296993442071626, + "min": 0, + "med": 1.1106, + "max": 12.6386, + "p(90)": 1.6717600000000001, + "p(95)": 1.8367099999999998 + }, + "http_req_duration{expected_response:true}": { + "med": 43.5863, + "max": 787.4813, + "p(90)": 74.04312000000002, + "p(95)": 88.3522, + "avg": 49.28281397343188, + "min": 13.3593 + }, + "http_req_waiting": { + "max": 786.4287, + "p(90)": 74.01554, + "p(95)": 88.2038, + "avg": 49.109054195392645, + "min": 12.8026, + "med": 43.406 + }, + "vus_max": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_sending": { + "avg": 0.05099288717000169, + "min": 0, + "med": 0, + "max": 5.0949, + "p(90)": 0, + "p(95)": 0.54204 + }, + "data_received": { + "count": 1883630, + "rate": 60962.46844689883 + }, + "http_req_failed": { + "passes": 0, + "fails": 5947, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_blocked": { + "med": 1.1574, + "max": 24.7079, + "p(90)": 1.73054, + "p(95)": 1.9173499999999999, + "avg": 1.2915954262653424, + "min": 0 + }, + "http_req_duration": { + "p(95)": 88.3522, + "avg": 49.28281397343188, + "min": 13.3593, + "med": 43.5863, + "max": 787.4813, + "p(90)": 74.04312000000002 + }, + "vus": { + "value": 20, + "min": 20, + "max": 20 + }, + "http_req_receiving": { + "avg": 0.12276689086934585, + "min": 0, + "med": 0, + "max": 2.9766, + "p(90)": 0.5438, + "p(95)": 0.5747399999999999 + } + } +} diff --git a/benchmarks/raw/pool_only-20vu-warmup.txt b/benchmarks/raw/pool_only-20vu-warmup.txt new file mode 100644 index 0000000..ddbd310 --- /dev/null +++ b/benchmarks/raw/pool_only-20vu-warmup.txt @@ -0,0 +1,142 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 20 max VUs, 1m0s max duration (incl. graceful stop): + * default: 20 looping VUs for 30s (gracefulStop: 30s) + + +running (0m01.0s), 20/20 VUs, 1 complete and 0 interrupted iterations +default [ 1% ] 20 VUs 00.2s/30s + +running (0m02.0s), 20/20 VUs, 118 complete and 0 interrupted iterations +default [ 4% ] 20 VUs 01.2s/30s + +running (0m03.0s), 20/20 VUs, 294 complete and 0 interrupted iterations +default [ 7% ] 20 VUs 02.2s/30s + +running (0m04.0s), 20/20 VUs, 459 complete and 0 interrupted iterations +default [ 11% ] 20 VUs 03.2s/30s + +running (0m05.0s), 20/20 VUs, 597 complete and 0 interrupted iterations +default [ 14% ] 20 VUs 04.2s/30s + +running (0m06.0s), 20/20 VUs, 756 complete and 0 interrupted iterations +default [ 17% ] 20 VUs 05.2s/30s + +running (0m07.0s), 20/20 VUs, 936 complete and 0 interrupted iterations +default [ 21% ] 20 VUs 06.2s/30s + +running (0m08.0s), 20/20 VUs, 1121 complete and 0 interrupted iterations +default [ 24% ] 20 VUs 07.2s/30s + +running (0m09.0s), 20/20 VUs, 1328 complete and 0 interrupted iterations +default [ 27% ] 20 VUs 08.2s/30s + +running (0m10.0s), 20/20 VUs, 1543 complete and 0 interrupted iterations +default [ 31% ] 20 VUs 09.2s/30s + +running (0m11.0s), 20/20 VUs, 1745 complete and 0 interrupted iterations +default [ 34% ] 20 VUs 10.2s/30s + +running (0m12.0s), 20/20 VUs, 1888 complete and 0 interrupted iterations +default [ 37% ] 20 VUs 11.2s/30s + +running (0m13.0s), 20/20 VUs, 2086 complete and 0 interrupted iterations +default [ 41% ] 20 VUs 12.2s/30s + +running (0m14.0s), 20/20 VUs, 2290 complete and 0 interrupted iterations +default [ 44% ] 20 VUs 13.2s/30s + +running (0m15.0s), 20/20 VUs, 2507 complete and 0 interrupted iterations +default [ 47% ] 20 VUs 14.2s/30s + +running (0m16.0s), 20/20 VUs, 2719 complete and 0 interrupted iterations +default [ 51% ] 20 VUs 15.2s/30s + +running (0m17.0s), 20/20 VUs, 2933 complete and 0 interrupted iterations +default [ 54% ] 20 VUs 16.2s/30s + +running (0m18.0s), 20/20 VUs, 3148 complete and 0 interrupted iterations +default [ 57% ] 20 VUs 17.2s/30s + +running (0m19.0s), 20/20 VUs, 3376 complete and 0 interrupted iterations +default [ 61% ] 20 VUs 18.2s/30s + +running (0m20.0s), 20/20 VUs, 3617 complete and 0 interrupted iterations +default [ 64% ] 20 VUs 19.2s/30s + +running (0m21.0s), 20/20 VUs, 3822 complete and 0 interrupted iterations +default [ 67% ] 20 VUs 20.2s/30s + +running (0m22.0s), 20/20 VUs, 4033 complete and 0 interrupted iterations +default [ 71% ] 20 VUs 21.2s/30s + +running (0m23.0s), 20/20 VUs, 4259 complete and 0 interrupted iterations +default [ 74% ] 20 VUs 22.2s/30s + +running (0m24.0s), 20/20 VUs, 4481 complete and 0 interrupted iterations +default [ 77% ] 20 VUs 23.2s/30s + +running (0m25.0s), 20/20 VUs, 4715 complete and 0 interrupted iterations +default [ 81% ] 20 VUs 24.2s/30s + +running (0m26.0s), 20/20 VUs, 4936 complete and 0 interrupted iterations +default [ 84% ] 20 VUs 25.2s/30s + +running (0m27.0s), 20/20 VUs, 5145 complete and 0 interrupted iterations +default [ 87% ] 20 VUs 26.2s/30s + +running (0m28.0s), 20/20 VUs, 5345 complete and 0 interrupted iterations +default [ 91% ] 20 VUs 27.2s/30s + +running (0m29.0s), 20/20 VUs, 5553 complete and 0 interrupted iterations +default [ 94% ] 20 VUs 28.2s/30s + +running (0m30.0s), 20/20 VUs, 5752 complete and 0 interrupted iterations +default [ 97% ] 20 VUs 29.2s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 5946 192.43845/s + checks_succeeded...: 100.00% 5946 out of 5946 + checks_failed......: 0.00% 0 out of 5946 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=49.28ms min=13.35ms med=43.58ms max=787.48ms p(90)=74.04ms p(95)=88.35ms + { expected_response:true }...: avg=49.28ms min=13.35ms med=43.58ms max=787.48ms p(90)=74.04ms p(95)=88.35ms + http_req_failed................: 0.00% 0 out of 5947 + http_reqs......................: 5947 192.470814/s + + EXECUTION + iteration_duration.............: avg=100.99ms min=64.73ms med=95.48ms max=532.01ms p(90)=126.11ms p(95)=140.11ms + iterations.....................: 5946 192.43845/s + vus............................: 20 min=20 max=20 + vus_max........................: 20 min=20 max=20 + + NETWORK + data_received..................: 1.9 MB 61 kB/s + data_sent......................: 2.7 MB 88 kB/s + + + + +running (0m30.9s), 00/20 VUs, 5946 complete and 0 interrupted iterations +default โœ“ [ 100% ] 20 VUs 30s diff --git a/benchmarks/raw/pool_only-50vu-run1.json b/benchmarks/raw/pool_only-50vu-run1.json new file mode 100644 index 0000000..a832a94 --- /dev/null +++ b/benchmarks/raw/pool_only-50vu-run1.json @@ -0,0 +1,130 @@ +{ + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 7026, + "fails": 0, + "name": "status is 200" + } + }, + "name": "" + }, + "metrics": { + "http_req_duration{expected_response:true}": { + "min": 50.0218, + "med": 158.163, + "max": 1322.4248, + "p(90)": 199.97224, + "p(95)": 219.0233, + "avg": 161.55386907642028 + }, + "http_req_failed": { + "passes": 0, + "fails": 7027, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "http_req_sending": { + "p(90)": 0.3070400000000003, + "p(95)": 0.5455399999999999, + "avg": 0.07160525117404301, + "min": 0, + "med": 0, + "max": 19.6834 + }, + "data_received": { + "count": 2190350, + "rate": 69405.68152719407 + }, + "http_req_connecting": { + "max": 28.3196, + "p(90)": 2.3841200000000016, + "p(95)": 2.7812099999999997, + "avg": 1.7910327308951228, + "min": 0, + "med": 1.6493 + }, + "http_reqs": { + "count": 7027, + "rate": 222.664744945599 + }, + "http_req_blocked": { + "avg": 1.8605931407428553, + "min": 0, + "med": 1.6858, + "max": 35.5744, + "p(90)": 2.4804, + "p(95)": 2.83235 + }, + "iterations": { + "count": 7026, + "rate": 222.63305791771432 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_receiving": { + "avg": 0.12018502917318898, + "min": 0, + "med": 0, + "max": 6.1906, + "p(90)": 0.54374, + "p(95)": 0.57967 + }, + "http_req_duration": { + "max": 1322.4248, + "p(90)": 199.97224, + "p(95)": 219.0233, + "avg": 161.55386907642028, + "min": 50.0218, + "med": 158.163 + }, + "http_req_waiting": { + "avg": 161.36207879607272, + "min": 50.0218, + "med": 158.0084, + "max": 1316.2342, + "p(90)": 199.69568, + "p(95)": 218.78425 + }, + "data_sent": { + "count": 3193533, + "rate": 101193.56922162425 + }, + "checks": { + "passes": 7026, + "fails": 0, + "value": 1 + }, + "iteration_duration": { + "avg": 213.90843674921757, + "min": 102.641, + "med": 210.62725, + "max": 371.5813, + "p(90)": 252.54295, + "p(95)": 272.10035 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "vus_max": { + "min": 50, + "max": 50, + "value": 50 + } + } +} diff --git a/benchmarks/raw/pool_only-50vu-run1.txt b/benchmarks/raw/pool_only-50vu-run1.txt new file mode 100644 index 0000000..8b57254 --- /dev/null +++ b/benchmarks/raw/pool_only-50vu-run1.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 87 complete and 0 interrupted iterations +default [ 2% ] 50 VUs 00.6s/30s + +running (0m03.0s), 50/50 VUs, 296 complete and 0 interrupted iterations +default [ 5% ] 50 VUs 01.6s/30s + +running (0m04.0s), 50/50 VUs, 509 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.6s/30s + +running (0m05.0s), 50/50 VUs, 700 complete and 0 interrupted iterations +default [ 12% ] 50 VUs 03.6s/30s + +running (0m06.0s), 50/50 VUs, 935 complete and 0 interrupted iterations +default [ 15% ] 50 VUs 04.6s/30s + +running (0m07.0s), 50/50 VUs, 1166 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.6s/30s + +running (0m08.0s), 50/50 VUs, 1413 complete and 0 interrupted iterations +default [ 22% ] 50 VUs 06.6s/30s + +running (0m09.0s), 50/50 VUs, 1650 complete and 0 interrupted iterations +default [ 25% ] 50 VUs 07.6s/30s + +running (0m10.0s), 50/50 VUs, 1875 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.6s/30s + +running (0m11.0s), 50/50 VUs, 2118 complete and 0 interrupted iterations +default [ 32% ] 50 VUs 09.6s/30s + +running (0m12.0s), 50/50 VUs, 2320 complete and 0 interrupted iterations +default [ 35% ] 50 VUs 10.6s/30s + +running (0m13.0s), 50/50 VUs, 2539 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.6s/30s + +running (0m14.0s), 50/50 VUs, 2759 complete and 0 interrupted iterations +default [ 42% ] 50 VUs 12.6s/30s + +running (0m15.0s), 50/50 VUs, 2996 complete and 0 interrupted iterations +default [ 45% ] 50 VUs 13.6s/30s + +running (0m16.0s), 50/50 VUs, 3228 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.6s/30s + +running (0m17.0s), 50/50 VUs, 3483 complete and 0 interrupted iterations +default [ 52% ] 50 VUs 15.6s/30s + +running (0m18.0s), 50/50 VUs, 3719 complete and 0 interrupted iterations +default [ 55% ] 50 VUs 16.6s/30s + +running (0m19.0s), 50/50 VUs, 3972 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.6s/30s + +running (0m20.0s), 50/50 VUs, 4208 complete and 0 interrupted iterations +default [ 62% ] 50 VUs 18.6s/30s + +running (0m21.0s), 50/50 VUs, 4425 complete and 0 interrupted iterations +default [ 65% ] 50 VUs 19.6s/30s + +running (0m22.0s), 50/50 VUs, 4632 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.6s/30s + +running (0m23.0s), 50/50 VUs, 4854 complete and 0 interrupted iterations +default [ 72% ] 50 VUs 21.6s/30s + +running (0m24.0s), 50/50 VUs, 5074 complete and 0 interrupted iterations +default [ 75% ] 50 VUs 22.6s/30s + +running (0m25.0s), 50/50 VUs, 5326 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.6s/30s + +running (0m26.0s), 50/50 VUs, 5601 complete and 0 interrupted iterations +default [ 82% ] 50 VUs 24.6s/30s + +running (0m27.0s), 50/50 VUs, 5863 complete and 0 interrupted iterations +default [ 85% ] 50 VUs 25.6s/30s + +running (0m28.0s), 50/50 VUs, 6127 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.6s/30s + +running (0m29.0s), 50/50 VUs, 6377 complete and 0 interrupted iterations +default [ 92% ] 50 VUs 27.6s/30s + +running (0m30.0s), 50/50 VUs, 6595 complete and 0 interrupted iterations +default [ 95% ] 50 VUs 28.6s/30s + +running (0m31.0s), 50/50 VUs, 6865 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.6s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 7026 222.633058/s + checks_succeeded...: 100.00% 7026 out of 7026 + checks_failed......: 0.00% 0 out of 7026 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=161.55ms min=50.02ms med=158.16ms max=1.32s p(90)=199.97ms p(95)=219.02ms + { expected_response:true }...: avg=161.55ms min=50.02ms med=158.16ms max=1.32s p(90)=199.97ms p(95)=219.02ms + http_req_failed................: 0.00% 0 out of 7027 + http_reqs......................: 7027 222.664745/s + + EXECUTION + iteration_duration.............: avg=213.9ms min=102.64ms med=210.62ms max=371.58ms p(90)=252.54ms p(95)=272.1ms + iterations.....................: 7026 222.633058/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.2 MB 69 kB/s + data_sent......................: 3.2 MB 101 kB/s + + + + +running (0m31.6s), 00/50 VUs, 7026 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_only-50vu-run2.json b/benchmarks/raw/pool_only-50vu-run2.json new file mode 100644 index 0000000..a069da2 --- /dev/null +++ b/benchmarks/raw/pool_only-50vu-run2.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "iteration_duration": { + "avg": 224.0049624535312, + "min": 96.2844, + "med": 218.8158, + "max": 422.199, + "p(90)": 264.70688, + "p(95)": 284.85622 + }, + "http_req_waiting": { + "avg": 171.58532908117732, + "min": 39.6633, + "med": 166.39235000000002, + "max": 1177.7889, + "p(90)": 211.71015, + "p(95)": 231.754975 + }, + "http_req_duration": { + "med": 166.59685, + "max": 1179.3733, + "p(90)": 211.9488, + "p(95)": 232.034325, + "avg": 171.7793628754085, + "min": 41.31 + }, + "data_received": { + "count": 2104866, + "rate": 66856.45367681971 + }, + "vus_max": { + "min": 50, + "max": 50, + "value": 50 + }, + "http_req_connecting": { + "min": 0, + "med": 1.58725, + "max": 25.8928, + "p(90)": 2.4563, + "p(95)": 2.7974249999999996, + "avg": 1.6524775795420754 + }, + "checks": { + "passes": 6725, + "fails": 0, + "value": 1 + }, + "http_req_blocked": { + "avg": 1.7268473238180173, + "min": 0, + "med": 1.6123500000000002, + "max": 35.1833, + "p(90)": 2.57415, + "p(95)": 2.884925 + }, + "iterations": { + "count": 6725, + "rate": 213.60488077464913 + }, + "http_req_duration{expected_response:true}": { + "med": 166.59685, + "max": 1179.3733, + "p(90)": 211.9488, + "p(95)": 232.034325, + "avg": 171.7793628754085, + "min": 41.31 + }, + "http_req_receiving": { + "p(95)": 0.599575, + "avg": 0.13337781742491822, + "min": 0, + "med": 0, + "max": 8.7956, + "p(90)": 0.5462 + }, + "data_sent": { + "count": 3056277, + "rate": 97075.93817089997 + }, + "http_req_failed": { + "passes": 0, + "fails": 6726, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_reqs": { + "count": 6726, + "rate": 213.63664358219927 + }, + "http_req_sending": { + "min": 0, + "med": 0, + "max": 11.0465, + "p(90)": 0, + "p(95)": 0.545175, + "avg": 0.060655976806422915 + }, + "http_req_tls_handshaking": { + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0 + } + }, + "root_group": { + "checks": { + "status is 200": { + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6725, + "fails": 0, + "name": "status is 200" + } + }, + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {} + } +} diff --git a/benchmarks/raw/pool_only-50vu-run2.txt b/benchmarks/raw/pool_only-50vu-run2.txt new file mode 100644 index 0000000..6df3d3b --- /dev/null +++ b/benchmarks/raw/pool_only-50vu-run2.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 135 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m03.0s), 50/50 VUs, 338 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.8s/30s + +running (0m04.0s), 50/50 VUs, 531 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m05.0s), 50/50 VUs, 774 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.8s/30s + +running (0m06.0s), 50/50 VUs, 1000 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m07.0s), 50/50 VUs, 1234 complete and 0 interrupted iterations +default [ 19% ] 50 VUs 05.8s/30s + +running (0m08.0s), 50/50 VUs, 1469 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m09.0s), 50/50 VUs, 1710 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.8s/30s + +running (0m10.0s), 50/50 VUs, 1944 complete and 0 interrupted iterations +default [ 29% ] 50 VUs 08.8s/30s + +running (0m11.0s), 50/50 VUs, 2154 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m12.0s), 50/50 VUs, 2379 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.8s/30s + +running (0m13.0s), 50/50 VUs, 2626 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.8s/30s + +running (0m14.0s), 50/50 VUs, 2874 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m15.0s), 50/50 VUs, 3123 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.8s/30s + +running (0m16.0s), 50/50 VUs, 3361 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m17.0s), 50/50 VUs, 3573 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.8s/30s + +running (0m18.0s), 50/50 VUs, 3816 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.8s/30s + +running (0m19.0s), 50/50 VUs, 4016 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m20.0s), 50/50 VUs, 4237 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.8s/30s + +running (0m21.0s), 50/50 VUs, 4483 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.8s/30s + +running (0m22.0s), 50/50 VUs, 4721 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m23.0s), 50/50 VUs, 4952 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m24.0s), 50/50 VUs, 5220 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m25.0s), 50/50 VUs, 5447 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.8s/30s + +running (0m26.0s), 50/50 VUs, 5667 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m27.0s), 50/50 VUs, 5856 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.8s/30s + +running (0m28.0s), 50/50 VUs, 6038 complete and 0 interrupted iterations +default [ 89% ] 50 VUs 26.8s/30s + +running (0m29.0s), 50/50 VUs, 6221 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.8s/30s + +running (0m30.0s), 50/50 VUs, 6447 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m31.0s), 50/50 VUs, 6641 complete and 0 interrupted iterations +default [ 99% ] 50 VUs 29.8s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6725 213.604881/s + checks_succeeded...: 100.00% 6725 out of 6725 + checks_failed......: 0.00% 0 out of 6725 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=171.77ms min=41.31ms med=166.59ms max=1.17s p(90)=211.94ms p(95)=232.03ms + { expected_response:true }...: avg=171.77ms min=41.31ms med=166.59ms max=1.17s p(90)=211.94ms p(95)=232.03ms + http_req_failed................: 0.00% 0 out of 6726 + http_reqs......................: 6726 213.636644/s + + EXECUTION + iteration_duration.............: avg=224ms min=96.28ms med=218.81ms max=422.19ms p(90)=264.7ms p(95)=284.85ms + iterations.....................: 6725 213.604881/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.1 MB 67 kB/s + data_sent......................: 3.1 MB 97 kB/s + + + + +running (0m31.5s), 00/50 VUs, 6725 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_only-50vu-run3.json b/benchmarks/raw/pool_only-50vu-run3.json new file mode 100644 index 0000000..d31a97b --- /dev/null +++ b/benchmarks/raw/pool_only-50vu-run3.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "http_req_receiving": { + "p(90)": 0.5416, + "p(95)": 0.5746349999999995, + "avg": 0.12206725705329156, + "min": 0, + "med": 0, + "max": 6.489 + }, + "http_req_tls_handshaking": { + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0, + "max": 0 + }, + "http_req_waiting": { + "p(90)": 211.44343000000006, + "p(95)": 257.64049499999965, + "avg": 183.5962292789966, + "min": 33.8878, + "med": 164.64185, + "max": 1634.5792 + }, + "data_received": { + "count": 2006602, + "rate": 62862.31240023132 + }, + "http_req_duration{expected_response:true}": { + "avg": 183.7702762852663, + "min": 35.4954, + "med": 164.83345, + "max": 1638.3299, + "p(90)": 211.55853, + "p(95)": 257.8115899999998 + }, + "iterations": { + "count": 6379, + "rate": 199.8396746345691 + }, + "data_sent": { + "count": 2898501, + "rate": 90803.49533907714 + }, + "http_req_failed": { + "passes": 0, + "fails": 6380, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "vus_max": { + "value": 50, + "min": 50, + "max": 50 + }, + "http_req_duration": { + "max": 1638.3299, + "p(90)": 211.55853, + "p(95)": 257.8115899999998, + "avg": 183.7702762852663, + "min": 35.4954, + "med": 164.83345 + }, + "http_reqs": { + "count": 6380, + "rate": 199.8710023778885 + }, + "iteration_duration": { + "med": 217.117, + "max": 960.4512, + "p(90)": 264.63788, + "p(95)": 310.4059099999996, + "avg": 235.8223200658406, + "min": 89.4372 + }, + "http_req_blocked": { + "avg": 1.5941510501567395, + "min": 0, + "med": 1.6035, + "max": 43.7971, + "p(90)": 2.20691, + "p(95)": 2.5094499999999993 + }, + "http_req_connecting": { + "p(95)": 2.3990549999999993, + "avg": 1.5210071003134782, + "min": 0, + "med": 1.5797, + "max": 27.9264, + "p(90)": 2.1644 + }, + "checks": { + "passes": 6379, + "fails": 0, + "value": 1 + }, + "http_req_sending": { + "max": 8.4962, + "p(90)": 0, + "p(95)": 0.5398, + "avg": 0.05197974921630099, + "min": 0, + "med": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "fails": 0, + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6379 + } + } + } +} diff --git a/benchmarks/raw/pool_only-50vu-run3.txt b/benchmarks/raw/pool_only-50vu-run3.txt new file mode 100644 index 0000000..65d9772 --- /dev/null +++ b/benchmarks/raw/pool_only-50vu-run3.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 34 complete and 0 interrupted iterations +default [ 1% ] 50 VUs 00.3s/30s + +running (0m03.0s), 50/50 VUs, 255 complete and 0 interrupted iterations +default [ 4% ] 50 VUs 01.3s/30s + +running (0m04.0s), 50/50 VUs, 457 complete and 0 interrupted iterations +default [ 8% ] 50 VUs 02.3s/30s + +running (0m05.0s), 50/50 VUs, 688 complete and 0 interrupted iterations +default [ 11% ] 50 VUs 03.3s/30s + +running (0m06.0s), 50/50 VUs, 935 complete and 0 interrupted iterations +default [ 14% ] 50 VUs 04.3s/30s + +running (0m07.0s), 50/50 VUs, 1162 complete and 0 interrupted iterations +default [ 18% ] 50 VUs 05.3s/30s + +running (0m08.0s), 50/50 VUs, 1390 complete and 0 interrupted iterations +default [ 21% ] 50 VUs 06.3s/30s + +running (0m09.0s), 50/50 VUs, 1616 complete and 0 interrupted iterations +default [ 24% ] 50 VUs 07.3s/30s + +running (0m10.0s), 50/50 VUs, 1838 complete and 0 interrupted iterations +default [ 28% ] 50 VUs 08.3s/30s + +running (0m11.0s), 50/50 VUs, 2073 complete and 0 interrupted iterations +default [ 31% ] 50 VUs 09.3s/30s + +running (0m12.0s), 50/50 VUs, 2290 complete and 0 interrupted iterations +default [ 34% ] 50 VUs 10.3s/30s + +running (0m13.0s), 50/50 VUs, 2519 complete and 0 interrupted iterations +default [ 38% ] 50 VUs 11.3s/30s + +running (0m14.0s), 50/50 VUs, 2760 complete and 0 interrupted iterations +default [ 41% ] 50 VUs 12.3s/30s + +running (0m15.0s), 50/50 VUs, 3014 complete and 0 interrupted iterations +default [ 44% ] 50 VUs 13.3s/30s + +running (0m16.0s), 50/50 VUs, 3291 complete and 0 interrupted iterations +default [ 48% ] 50 VUs 14.3s/30s + +running (0m17.0s), 50/50 VUs, 3444 complete and 0 interrupted iterations +default [ 51% ] 50 VUs 15.3s/30s + +running (0m18.0s), 50/50 VUs, 3502 complete and 0 interrupted iterations +default [ 54% ] 50 VUs 16.3s/30s + +running (0m19.0s), 50/50 VUs, 3589 complete and 0 interrupted iterations +default [ 58% ] 50 VUs 17.3s/30s + +running (0m20.0s), 50/50 VUs, 3673 complete and 0 interrupted iterations +default [ 61% ] 50 VUs 18.3s/30s + +running (0m21.0s), 50/50 VUs, 3928 complete and 0 interrupted iterations +default [ 64% ] 50 VUs 19.3s/30s + +running (0m22.0s), 50/50 VUs, 4158 complete and 0 interrupted iterations +default [ 68% ] 50 VUs 20.3s/30s + +running (0m23.0s), 50/50 VUs, 4368 complete and 0 interrupted iterations +default [ 71% ] 50 VUs 21.3s/30s + +running (0m24.0s), 50/50 VUs, 4578 complete and 0 interrupted iterations +default [ 74% ] 50 VUs 22.3s/30s + +running (0m25.0s), 50/50 VUs, 4797 complete and 0 interrupted iterations +default [ 78% ] 50 VUs 23.3s/30s + +running (0m26.0s), 50/50 VUs, 4995 complete and 0 interrupted iterations +default [ 81% ] 50 VUs 24.3s/30s + +running (0m27.0s), 50/50 VUs, 5215 complete and 0 interrupted iterations +default [ 84% ] 50 VUs 25.3s/30s + +running (0m28.0s), 50/50 VUs, 5449 complete and 0 interrupted iterations +default [ 88% ] 50 VUs 26.3s/30s + +running (0m29.0s), 50/50 VUs, 5691 complete and 0 interrupted iterations +default [ 91% ] 50 VUs 27.3s/30s + +running (0m30.0s), 50/50 VUs, 5923 complete and 0 interrupted iterations +default [ 94% ] 50 VUs 28.3s/30s + +running (0m31.0s), 50/50 VUs, 6164 complete and 0 interrupted iterations +default [ 98% ] 50 VUs 29.3s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6379 199.839675/s + checks_succeeded...: 100.00% 6379 out of 6379 + checks_failed......: 0.00% 0 out of 6379 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=183.77ms min=35.49ms med=164.83ms max=1.63s p(90)=211.55ms p(95)=257.81ms + { expected_response:true }...: avg=183.77ms min=35.49ms med=164.83ms max=1.63s p(90)=211.55ms p(95)=257.81ms + http_req_failed................: 0.00% 0 out of 6380 + http_reqs......................: 6380 199.871002/s + + EXECUTION + iteration_duration.............: avg=235.82ms min=89.43ms med=217.11ms max=960.45ms p(90)=264.63ms p(95)=310.4ms + iterations.....................: 6379 199.839675/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.0 MB 63 kB/s + data_sent......................: 2.9 MB 91 kB/s + + + + +running (0m31.9s), 00/50 VUs, 6379 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/pool_only-50vu-warmup.json b/benchmarks/raw/pool_only-50vu-warmup.json new file mode 100644 index 0000000..37794f1 --- /dev/null +++ b/benchmarks/raw/pool_only-50vu-warmup.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_duration{expected_response:true}": { + "p(90)": 210.57288, + "p(95)": 228.32133999999996, + "avg": 173.32934982003613, + "min": 36.7096, + "med": 169.74735, + "max": 1088.8581 + }, + "http_req_connecting": { + "p(90)": 2.27792, + "p(95)": 2.602924999999999, + "avg": 1.6990910467906437, + "min": 0, + "med": 1.64085, + "max": 15.3467 + }, + "http_reqs": { + "count": 6668, + "rate": 212.7645263257301 + }, + "http_req_waiting": { + "p(95)": 228.04610999999997, + "avg": 173.11904403119377, + "min": 29.4743, + "med": 169.5627, + "max": 1087.7707, + "p(90)": 210.07986 + }, + "vus_max": { + "max": 50, + "value": 50, + "min": 50 + }, + "http_req_blocked": { + "max": 34.3919, + "p(90)": 2.37241, + "p(95)": 2.6757899999999997, + "avg": 1.7713907018596307, + "min": 0, + "med": 1.67305 + }, + "http_req_failed": { + "passes": 0, + "fails": 6668, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "checks": { + "passes": 6667, + "fails": 0, + "value": 1 + }, + "iterations": { + "rate": 212.7326180284407, + "count": 6667 + }, + "vus": { + "value": 50, + "min": 0, + "max": 50 + }, + "data_received": { + "count": 2088394, + "rate": 66637.09660940264 + }, + "http_req_duration": { + "avg": 173.32934982003613, + "min": 36.7096, + "med": 169.74735, + "max": 1088.8581, + "p(90)": 210.57288, + "p(95)": 228.32133999999996 + }, + "http_req_receiving": { + "max": 3.6359, + "p(90)": 0.5467299999999999, + "p(95)": 0.60093, + "avg": 0.14029958008398336, + "min": 0, + "med": 0 + }, + "iteration_duration": { + "max": 391.548, + "p(90)": 263.40768, + "p(95)": 281.51198999999997, + "avg": 225.58071562921836, + "min": 89.3333, + "med": 222.0562 + }, + "data_sent": { + "count": 3029829, + "rate": 96676.68446805046 + }, + "http_req_tls_handshaking": { + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0, + "min": 0, + "med": 0 + }, + "http_req_sending": { + "max": 8.1196, + "p(90)": 0.4098500000000001, + "p(95)": 0.545465, + "avg": 0.07000620875824824, + "min": 0, + "med": 0 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 6667, + "fails": 0, + "name": "status is 200", + "path": "::status is 200" + } + } + } +} diff --git a/benchmarks/raw/pool_only-50vu-warmup.txt b/benchmarks/raw/pool_only-50vu-warmup.txt new file mode 100644 index 0000000..f5fbfb4 --- /dev/null +++ b/benchmarks/raw/pool_only-50vu-warmup.txt @@ -0,0 +1,145 @@ + + /\ Grafana /โ€พโ€พ/ + /\ / \ |\ __ / / + / \/ \ | |/ / / โ€พโ€พ\ + / \ | ( | (โ€พ) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: benchmarks/gateway-load.js + output: - + + scenarios: (100.00%) 1 scenario, 50 max VUs, 1m0s max duration (incl. graceful stop): + * default: 50 looping VUs for 30s (gracefulStop: 30s) + + +Run [ 100% ] setup() +default [ 0% ] + +running (0m02.0s), 50/50 VUs, 149 complete and 0 interrupted iterations +default [ 3% ] 50 VUs 00.8s/30s + +running (0m03.0s), 50/50 VUs, 367 complete and 0 interrupted iterations +default [ 6% ] 50 VUs 01.8s/30s + +running (0m04.0s), 50/50 VUs, 582 complete and 0 interrupted iterations +default [ 9% ] 50 VUs 02.8s/30s + +running (0m05.0s), 50/50 VUs, 802 complete and 0 interrupted iterations +default [ 13% ] 50 VUs 03.9s/30s + +running (0m06.0s), 50/50 VUs, 1002 complete and 0 interrupted iterations +default [ 16% ] 50 VUs 04.8s/30s + +running (0m07.0s), 50/50 VUs, 1186 complete and 0 interrupted iterations +default [ 20% ] 50 VUs 05.9s/30s + +running (0m08.0s), 50/50 VUs, 1383 complete and 0 interrupted iterations +default [ 23% ] 50 VUs 06.8s/30s + +running (0m09.0s), 50/50 VUs, 1567 complete and 0 interrupted iterations +default [ 26% ] 50 VUs 07.9s/30s + +running (0m10.0s), 50/50 VUs, 1782 complete and 0 interrupted iterations +default [ 30% ] 50 VUs 08.9s/30s + +running (0m11.0s), 50/50 VUs, 2010 complete and 0 interrupted iterations +default [ 33% ] 50 VUs 09.8s/30s + +running (0m12.0s), 50/50 VUs, 2235 complete and 0 interrupted iterations +default [ 36% ] 50 VUs 10.8s/30s + +running (0m13.0s), 50/50 VUs, 2455 complete and 0 interrupted iterations +default [ 39% ] 50 VUs 11.8s/30s + +running (0m14.0s), 50/50 VUs, 2681 complete and 0 interrupted iterations +default [ 43% ] 50 VUs 12.8s/30s + +running (0m15.0s), 50/50 VUs, 2896 complete and 0 interrupted iterations +default [ 46% ] 50 VUs 13.8s/30s + +running (0m16.0s), 50/50 VUs, 3111 complete and 0 interrupted iterations +default [ 49% ] 50 VUs 14.8s/30s + +running (0m17.0s), 50/50 VUs, 3327 complete and 0 interrupted iterations +default [ 53% ] 50 VUs 15.8s/30s + +running (0m18.0s), 50/50 VUs, 3561 complete and 0 interrupted iterations +default [ 56% ] 50 VUs 16.9s/30s + +running (0m19.0s), 50/50 VUs, 3753 complete and 0 interrupted iterations +default [ 59% ] 50 VUs 17.8s/30s + +running (0m20.0s), 50/50 VUs, 3999 complete and 0 interrupted iterations +default [ 63% ] 50 VUs 18.8s/30s + +running (0m21.0s), 50/50 VUs, 4234 complete and 0 interrupted iterations +default [ 66% ] 50 VUs 19.9s/30s + +running (0m22.0s), 50/50 VUs, 4435 complete and 0 interrupted iterations +default [ 69% ] 50 VUs 20.8s/30s + +running (0m23.0s), 50/50 VUs, 4660 complete and 0 interrupted iterations +default [ 73% ] 50 VUs 21.8s/30s + +running (0m24.0s), 50/50 VUs, 4891 complete and 0 interrupted iterations +default [ 76% ] 50 VUs 22.8s/30s + +running (0m25.0s), 50/50 VUs, 5143 complete and 0 interrupted iterations +default [ 79% ] 50 VUs 23.8s/30s + +running (0m26.0s), 50/50 VUs, 5390 complete and 0 interrupted iterations +default [ 83% ] 50 VUs 24.8s/30s + +running (0m27.0s), 50/50 VUs, 5621 complete and 0 interrupted iterations +default [ 86% ] 50 VUs 25.9s/30s + +running (0m28.0s), 50/50 VUs, 5858 complete and 0 interrupted iterations +default [ 90% ] 50 VUs 26.9s/30s + +running (0m29.0s), 50/50 VUs, 6113 complete and 0 interrupted iterations +default [ 93% ] 50 VUs 27.9s/30s + +running (0m30.0s), 50/50 VUs, 6354 complete and 0 interrupted iterations +default [ 96% ] 50 VUs 28.8s/30s + +running (0m31.0s), 50/50 VUs, 6581 complete and 0 interrupted iterations +default [ 100% ] 50 VUs 29.9s/30s + + + โ–ˆ THRESHOLDS + + http_req_failed + โœ“ 'rate<0.01' rate=0.00% + + + โ–ˆ TOTAL RESULTS + + checks_total.......: 6667 212.732618/s + checks_succeeded...: 100.00% 6667 out of 6667 + checks_failed......: 0.00% 0 out of 6667 + + โœ“ status is 200 + + HTTP + http_req_duration..............: avg=173.32ms min=36.7ms med=169.74ms max=1.08s p(90)=210.57ms p(95)=228.32ms + { expected_response:true }...: avg=173.32ms min=36.7ms med=169.74ms max=1.08s p(90)=210.57ms p(95)=228.32ms + http_req_failed................: 0.00% 0 out of 6668 + http_reqs......................: 6668 212.764526/s + + EXECUTION + iteration_duration.............: avg=225.58ms min=89.33ms med=222.05ms max=391.54ms p(90)=263.4ms p(95)=281.51ms + iterations.....................: 6667 212.732618/s + vus............................: 50 min=0 max=50 + vus_max........................: 50 min=50 max=50 + + NETWORK + data_received..................: 2.1 MB 67 kB/s + data_sent......................: 3.0 MB 97 kB/s + + + + +running (0m31.3s), 00/50 VUs, 6667 complete and 0 interrupted iterations +default โœ“ [ 100% ] 50 VUs 30s diff --git a/benchmarks/raw/postfix-100vu-run1.txt b/benchmarks/raw/postfix-100vu-run1.txt new file mode 100644 index 0000000..94330a9 Binary files /dev/null and b/benchmarks/raw/postfix-100vu-run1.txt differ diff --git a/benchmarks/raw/postfix-100vu-run2.txt b/benchmarks/raw/postfix-100vu-run2.txt new file mode 100644 index 0000000..a69b6cb Binary files /dev/null and b/benchmarks/raw/postfix-100vu-run2.txt differ diff --git a/benchmarks/raw/postfix-100vu-run3.txt b/benchmarks/raw/postfix-100vu-run3.txt new file mode 100644 index 0000000..9e30473 Binary files /dev/null and b/benchmarks/raw/postfix-100vu-run3.txt differ diff --git a/benchmarks/raw/postfix-20vu-run1.txt b/benchmarks/raw/postfix-20vu-run1.txt new file mode 100644 index 0000000..0723f28 Binary files /dev/null and b/benchmarks/raw/postfix-20vu-run1.txt differ diff --git a/benchmarks/raw/postfix-20vu-run2.txt b/benchmarks/raw/postfix-20vu-run2.txt new file mode 100644 index 0000000..2dedd79 Binary files /dev/null and b/benchmarks/raw/postfix-20vu-run2.txt differ diff --git a/benchmarks/raw/postfix-20vu-run3.txt b/benchmarks/raw/postfix-20vu-run3.txt new file mode 100644 index 0000000..f112487 Binary files /dev/null and b/benchmarks/raw/postfix-20vu-run3.txt differ diff --git a/benchmarks/raw/postfix-50vu-run1.txt b/benchmarks/raw/postfix-50vu-run1.txt new file mode 100644 index 0000000..b69a7ca Binary files /dev/null and b/benchmarks/raw/postfix-50vu-run1.txt differ diff --git a/benchmarks/raw/postfix-50vu-run2.txt b/benchmarks/raw/postfix-50vu-run2.txt new file mode 100644 index 0000000..f9a641f Binary files /dev/null and b/benchmarks/raw/postfix-50vu-run2.txt differ diff --git a/benchmarks/raw/postfix-50vu-run3.txt b/benchmarks/raw/postfix-50vu-run3.txt new file mode 100644 index 0000000..9341d5e Binary files /dev/null and b/benchmarks/raw/postfix-50vu-run3.txt differ diff --git a/benchmarks/raw/summary-baseline.json b/benchmarks/raw/summary-baseline.json new file mode 100644 index 0000000..fdf5166 --- /dev/null +++ b/benchmarks/raw/summary-baseline.json @@ -0,0 +1,224 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "acceptedRate": 135.1658226393644, + "completedRate": 66.28846444881573, + "completedCount": 2074, + "p50": 61.6157, + "p95": 176.21513999999988, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "acceptedRate": 152.86998154621253, + "completedRate": 64.01891073765094, + "completedCount": 1998, + "p50": 58.0091, + "p95": 180.8073, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "acceptedRate": 170.4049116645989, + "completedRate": 82.8203838399504, + "completedCount": 2625, + "p50": 53.9315, + "p95": 101.777, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 152.81357195005862, + "min": 135.1658226393644, + "max": 170.4049116645989 + }, + "completedRate": { + "mean": 71.04258634213903, + "min": 64.01891073765094, + "max": 82.8203838399504 + }, + "p50": { + "mean": 57.8521, + "min": 53.9315, + "max": 61.6157 + }, + "p95": { + "mean": 152.9331466666666, + "min": 101.777, + "max": 180.8073 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 171.70311900955835, + "completedRate": 68.8381918538974, + "completedCount": 2358, + "p50": 205.68505, + "p95": 305.27509000000003, + "errorRate": 0, + "backlog": 291, + "drainSec": 2.56 + }, + { + "run": 2, + "acceptedRate": 115.1462377708344, + "completedRate": 43.19404103151214, + "completedCount": 1528, + "p50": 246.7215, + "p95": 693.7413449999997, + "errorRate": 0, + "backlog": 250, + "drainSec": 1.21 + }, + { + "run": 3, + "acceptedRate": 176.64012114556974, + "completedRate": 74.23652024036141, + "completedCount": 2564, + "p50": 204.91175, + "p95": 277.74109, + "errorRate": 0, + "backlog": 113, + "drainSec": 2.19 + } + ], + "summary": { + "acceptedRate": { + "mean": 154.49649264198752, + "min": 115.1462377708344, + "max": 176.64012114556974 + }, + "completedRate": { + "mean": 62.08958437525698, + "min": 43.19404103151214, + "max": 74.23652024036141 + }, + "p50": { + "mean": 219.1061, + "min": 204.91175, + "max": 246.7215 + }, + "p95": { + "mean": 425.58584166666657, + "min": 277.74109, + "max": 693.7413449999997 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 218, + "min": 113, + "max": 291 + }, + "drainSec": { + "mean": 1.9866666666666666, + "min": 1.21, + "max": 2.56 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 129.70470139725072, + "completedRate": 54.35779640140812, + "completedCount": 1799, + "p50": 476.6457, + "p95": 2566.23022, + "errorRate": 0, + "backlog": 360, + "drainSec": 1.2 + }, + { + "run": 2, + "acceptedRate": 103.39132888095733, + "completedRate": 47.14600854500231, + "completedCount": 1837, + "p50": 508.28650000000005, + "p95": 917.9716, + "errorRate": 0, + "backlog": 519, + "drainSec": 2.52 + }, + { + "run": 3, + "acceptedRate": 182.07180115273331, + "completedRate": 82.65759653980544, + "completedCount": 2644, + "p50": 452.8023, + "p95": 585.3403549999999, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 138.38927714364712, + "min": 103.39132888095733, + "max": 182.07180115273331 + }, + "completedRate": { + "mean": 61.38713382873863, + "min": 47.14600854500231, + "max": 82.65759653980544 + }, + "p50": { + "mean": 479.24483333333336, + "min": 452.8023, + "max": 508.28650000000005 + }, + "p95": { + "mean": 1356.5140583333332, + "min": 585.3403549999999, + "max": 2566.23022 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 293, + "min": 0, + "max": 519 + }, + "drainSec": { + "mean": 1.24, + "min": 0, + "max": 2.52 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-downstream-fix_b_downstream_after.json b/benchmarks/raw/summary-downstream-fix_b_downstream_after.json new file mode 100644 index 0000000..9ab53b8 --- /dev/null +++ b/benchmarks/raw/summary-downstream-fix_b_downstream_after.json @@ -0,0 +1,282 @@ +{ + "label": "fix_b_downstream_after", + "emailConsumerMode": "eachBatch", + "analyticConsumerMode": "eachBatch", + "effectiveConfigs": { + "streammart-gateway": "[EFFECTIVE CONFIG] api-gateway: PORT=8080, PAYMENT_SERVICE_URL=http://payment-service:8000, PROXY_KEEP_ALIVE=true, NODE_ENV=development", + "streammart-payment": "[EFFECTIVE CONFIG] payment-service: PORT=8000, DB_POOL_MAX=30, RELAY_BATCH_SEND=true, RELAY_BUSY_PAUSE_MS=25, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-order": "[EFFECTIVE CONFIG] order-service: PORT=8001, DB_POOL_MAX=30, CONSUMER_MODE=eachBatch, PARTITIONS_CONSUMED_CONCURRENTLY=1, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-email": "[EFFECTIVE CONFIG] email-service: PORT=8002, DB_POOL_MAX=30, CONSUMER_MODE=eachBatch, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-analytic": "[EFFECTIVE CONFIG] analytic-service: PORT=8003, DB_POOL_MAX=30, CONSUMER_MODE=eachBatch, KAFKA_BROKERS=kafka:9092" + }, + "tiers": { + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 268.3, + "acceptedPayments": 8442, + "p50": 118.75, + "p95": 224.79, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 0, + "analyticLag": 0, + "orderOutboxPending": 0, + "emailOutboxPending": 0 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 0, + "analyticCatchupSec": 0, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 8442, + "emailsDone": 8442, + "analyticsDone": 25326, + "targetOrders": 8442, + "targetEmails": 8442, + "targetAnalytics": 25326 + } + }, + { + "run": 2, + "acceptedRate": 273.29, + "acceptedPayments": 8497, + "p50": 101.33, + "p95": 211.74, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 0, + "analyticLag": 0, + "orderOutboxPending": 0, + "emailOutboxPending": 0 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 0, + "analyticCatchupSec": 0, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 8497, + "emailsDone": 8497, + "analyticsDone": 25491, + "targetOrders": 8497, + "targetEmails": 8497, + "targetAnalytics": 25491 + } + }, + { + "run": 3, + "acceptedRate": 252, + "acceptedPayments": 7827, + "p50": 121.76, + "p95": 270.54, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 0, + "analyticLag": 0, + "orderOutboxPending": 0, + "emailOutboxPending": 0 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 0, + "analyticCatchupSec": 0, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 7827, + "emailsDone": 7827, + "analyticsDone": 23481, + "targetOrders": 7827, + "targetEmails": 7827, + "targetAnalytics": 23481 + } + } + ], + "summary": { + "acceptedRate": { + "mean": 264.53, + "min": 252, + "max": 273.29 + }, + "orderLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "orderCatchupSec": { + "mean": 0, + "min": 0, + "max": 0 + }, + "emailLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "emailCatchupSec": { + "mean": 0, + "min": 0, + "max": 0 + }, + "analyticLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "analyticCatchupSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 358.29, + "acceptedPayments": 11285, + "p50": 202.48, + "p95": 359.47, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 0, + "analyticLag": 0, + "orderOutboxPending": 0, + "emailOutboxPending": 0 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 0, + "analyticCatchupSec": 0, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 11285, + "emailsDone": 11285, + "analyticsDone": 33855, + "targetOrders": 11285, + "targetEmails": 11285, + "targetAnalytics": 33855 + } + }, + { + "run": 2, + "acceptedRate": 341.14, + "acceptedPayments": 10551, + "p50": 194.67, + "p95": 453.35, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 0, + "analyticLag": 0, + "orderOutboxPending": 0, + "emailOutboxPending": 0 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 0, + "analyticCatchupSec": 0, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 10551, + "emailsDone": 10551, + "analyticsDone": 31653, + "targetOrders": 10551, + "targetEmails": 10551, + "targetAnalytics": 31653 + } + }, + { + "run": 3, + "acceptedRate": 259.16, + "acceptedPayments": 8224, + "p50": 268.09, + "p95": 629.08, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 0, + "analyticLag": 0, + "orderOutboxPending": 0, + "emailOutboxPending": 0 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 0, + "analyticCatchupSec": 0, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 8224, + "emailsDone": 8224, + "analyticsDone": 24672, + "targetOrders": 8224, + "targetEmails": 8224, + "targetAnalytics": 24672 + } + } + ], + "summary": { + "acceptedRate": { + "mean": 319.53, + "min": 259.16, + "max": 358.29 + }, + "orderLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "orderCatchupSec": { + "mean": 0, + "min": 0, + "max": 0 + }, + "emailLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "emailCatchupSec": { + "mean": 0, + "min": 0, + "max": 0 + }, + "analyticLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "analyticCatchupSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-downstream-fix_b_downstream_before.json b/benchmarks/raw/summary-downstream-fix_b_downstream_before.json new file mode 100644 index 0000000..5157d0b --- /dev/null +++ b/benchmarks/raw/summary-downstream-fix_b_downstream_before.json @@ -0,0 +1,282 @@ +{ + "label": "fix_b_downstream_before", + "emailConsumerMode": "eachMessage", + "analyticConsumerMode": "eachMessage", + "effectiveConfigs": { + "streammart-gateway": "[EFFECTIVE CONFIG] api-gateway: PORT=8080, PAYMENT_SERVICE_URL=http://payment-service:8000, PROXY_KEEP_ALIVE=true, NODE_ENV=development", + "streammart-payment": "[EFFECTIVE CONFIG] payment-service: PORT=8000, DB_POOL_MAX=30, RELAY_BATCH_SEND=true, RELAY_BUSY_PAUSE_MS=25, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-order": "[EFFECTIVE CONFIG] order-service: PORT=8001, DB_POOL_MAX=30, CONSUMER_MODE=eachBatch, PARTITIONS_CONSUMED_CONCURRENTLY=1, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-email": "[EFFECTIVE CONFIG] email-service: PORT=8002, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-analytic": "(not found)" + }, + "tiers": { + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 278.47, + "acceptedPayments": 8651, + "p50": 115.67, + "p95": 204.53, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 5359, + "analyticLag": 20905, + "orderOutboxPending": 0, + "emailOutboxPending": 72 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 48.72, + "analyticCatchupSec": 97.07, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 8651, + "emailsDone": 8651, + "analyticsDone": 25953, + "targetOrders": 8651, + "targetEmails": 8651, + "targetAnalytics": 25953 + } + }, + { + "run": 2, + "acceptedRate": 320.24, + "acceptedPayments": 10062, + "p50": 92.67, + "p95": 166.43, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 6515, + "analyticLag": 24969, + "orderOutboxPending": 0, + "emailOutboxPending": 23 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 49.89, + "analyticCatchupSec": 135.1, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 10062, + "emailsDone": 10062, + "analyticsDone": 30186, + "targetOrders": 10062, + "targetEmails": 10062, + "targetAnalytics": 30186 + } + }, + { + "run": 3, + "acceptedRate": 314.72, + "acceptedPayments": 9858, + "p50": 95.89, + "p95": 162.69, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 6853, + "analyticLag": 25109, + "orderOutboxPending": 0, + "emailOutboxPending": 11 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 47.42, + "analyticCatchupSec": 104.85, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 9858, + "emailsDone": 9858, + "analyticsDone": 29574, + "targetOrders": 9858, + "targetEmails": 9858, + "targetAnalytics": 29574 + } + } + ], + "summary": { + "acceptedRate": { + "mean": 304.48, + "min": 278.47, + "max": 320.24 + }, + "orderLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "orderCatchupSec": { + "mean": 0, + "min": 0, + "max": 0 + }, + "emailLagAt30s": { + "mean": 6242.33, + "min": 5359, + "max": 6853 + }, + "emailCatchupSec": { + "mean": 48.68, + "min": 47.42, + "max": 49.89 + }, + "analyticLagAt30s": { + "mean": 23661, + "min": 20905, + "max": 25109 + }, + "analyticCatchupSec": { + "mean": 112.34, + "min": 97.07, + "max": 135.1 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 240.28, + "acceptedPayments": 7948, + "p50": 268.71, + "p95": 617.4, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 4592, + "analyticLag": 18619, + "orderOutboxPending": 0, + "emailOutboxPending": 1 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 42.09, + "analyticCatchupSec": 88.83, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 7948, + "emailsDone": 7948, + "analyticsDone": 23844, + "targetOrders": 7948, + "targetEmails": 7948, + "targetAnalytics": 23844 + } + }, + { + "run": 2, + "acceptedRate": 282.65, + "acceptedPayments": 8833, + "p50": 251.89, + "p95": 467.87, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 5188, + "analyticLag": 20862, + "orderOutboxPending": 15, + "emailOutboxPending": 12 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 53, + "analyticCatchupSec": 108.6, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 8833, + "emailsDone": 8833, + "analyticsDone": 26499, + "targetOrders": 8833, + "targetEmails": 8833, + "targetAnalytics": 26499 + } + }, + { + "run": 3, + "acceptedRate": 301.65, + "acceptedPayments": 9398, + "p50": 235.76, + "p95": 452.99, + "errorRate": 0, + "lagAt30s": { + "orderLag": 0, + "emailLag": 5371, + "analyticLag": 21958, + "orderOutboxPending": 0, + "emailOutboxPending": 51 + }, + "orderCatchupSec": 0, + "emailCatchupSec": 37.17, + "analyticCatchupSec": 94.01, + "timedOut": { + "order": false, + "email": false, + "analytic": false + }, + "finalCounts": { + "ordersDone": 9398, + "emailsDone": 9398, + "analyticsDone": 28194, + "targetOrders": 9398, + "targetEmails": 9398, + "targetAnalytics": 28194 + } + } + ], + "summary": { + "acceptedRate": { + "mean": 274.86, + "min": 240.28, + "max": 301.65 + }, + "orderLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "orderCatchupSec": { + "mean": 0, + "min": 0, + "max": 0 + }, + "emailLagAt30s": { + "mean": 5050.33, + "min": 4592, + "max": 5371 + }, + "emailCatchupSec": { + "mean": 44.09, + "min": 37.17, + "max": 53 + }, + "analyticLagAt30s": { + "mean": 20479.67, + "min": 18619, + "max": 21958 + }, + "analyticCatchupSec": { + "mean": 97.15, + "min": 88.83, + "max": 108.6 + } + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-experiment-baseline_consumer.json b/benchmarks/raw/summary-experiment-baseline_consumer.json new file mode 100644 index 0000000..36e8f3d --- /dev/null +++ b/benchmarks/raw/summary-experiment-baseline_consumer.json @@ -0,0 +1,238 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "acceptedRate": 232.05296845313399, + "completedRate": 93.16651979077662, + "acceptedCount": 7197, + "completedCount": 7197, + "consumerLagAt30s": 4369, + "timeToReachZero": 46.23, + "timedOut": false, + "p50": 29.63505, + "p95": 70.29240499999999, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 224.68866227664023, + "completedRate": 69.19821581791629, + "acceptedCount": 6989, + "completedCount": 6989, + "consumerLagAt30s": 4428, + "timeToReachZero": 69.89, + "timedOut": false, + "p50": 29.49595, + "p95": 68.41202499999997, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 140.42968346331838, + "completedRate": 51.748070697002234, + "acceptedCount": 4637, + "completedCount": 4637, + "consumerLagAt30s": 3156, + "timeToReachZero": 56.58, + "timedOut": false, + "p50": 65.3258, + "p95": 174.210865, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 199.05710473103088, + "min": 140.42968346331838, + "max": 232.05296845313399 + }, + "completedRate": { + "mean": 71.37093543523171, + "min": 51.748070697002234, + "max": 93.16651979077662 + }, + "consumerLagAt30s": { + "mean": 3984.3333333333335, + "min": 3156, + "max": 4428 + }, + "timeToReachZero": { + "mean": 57.56666666666666, + "min": 46.23, + "max": 69.89 + }, + "p50": { + "mean": 41.4856, + "min": 29.49595, + "max": 65.3258 + }, + "p95": { + "mean": 104.30509833333332, + "min": 68.41202499999997, + "max": 174.210865 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 182.26496739105642, + "completedRate": 56.759987481789565, + "acceptedCount": 5820, + "completedCount": 5820, + "consumerLagAt30s": 4365, + "timeToReachZero": 70.6, + "timedOut": false, + "p50": 152.6199, + "p95": 544.5873, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 250.18643578069188, + "completedRate": 54.490775298127524, + "acceptedCount": 7843, + "completedCount": 7843, + "consumerLagAt30s": 6258, + "timeToReachZero": 112.58, + "timedOut": false, + "p50": 126.35725, + "p95": 254.05977499999992, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 249.0495180837918, + "completedRate": 57.45289134335067, + "acceptedCount": 7853, + "completedCount": 7853, + "consumerLagAt30s": 6311, + "timeToReachZero": 105.15, + "timedOut": false, + "p50": 127.10745, + "p95": 252.58526499999994, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 227.1669737518467, + "min": 182.26496739105642, + "max": 250.18643578069188 + }, + "completedRate": { + "mean": 56.23455137442259, + "min": 54.490775298127524, + "max": 57.45289134335067 + }, + "consumerLagAt30s": { + "mean": 5644.666666666667, + "min": 4365, + "max": 6311 + }, + "timeToReachZero": { + "mean": 96.11000000000001, + "min": 70.6, + "max": 112.58 + }, + "p50": { + "mean": 135.36153333333334, + "min": 126.35725, + "max": 152.6199 + }, + "p95": { + "mean": 350.41078, + "min": 252.58526499999994, + "max": 544.5873 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 259.49080414227984, + "completedRate": 50.73389965636883, + "acceptedCount": 8196, + "completedCount": 8196, + "consumerLagAt30s": 6789, + "timeToReachZero": 129.96, + "timedOut": false, + "p50": 272.6607, + "p95": 568.1372199999998, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 282.48554574442505, + "completedRate": 45.65763416879652, + "acceptedCount": 8802, + "completedCount": 8802, + "consumerLagAt30s": 7205, + "timeToReachZero": 161.62, + "timedOut": false, + "p50": 251.3532, + "p95": 457.89995, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 314.8477241838466, + "completedRate": 48.87957541419862, + "acceptedCount": 9919, + "completedCount": 9919, + "consumerLagAt30s": 8265, + "timeToReachZero": 171.42, + "timedOut": false, + "p50": 211.3964, + "p95": 463.92300499999993, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 285.6080246901838, + "min": 259.49080414227984, + "max": 314.8477241838466 + }, + "completedRate": { + "mean": 48.42370307978799, + "min": 45.65763416879652, + "max": 50.73389965636883 + }, + "consumerLagAt30s": { + "mean": 7419.666666666667, + "min": 6789, + "max": 8265 + }, + "timeToReachZero": { + "mean": 154.33333333333334, + "min": 129.96, + "max": 171.42 + }, + "p50": { + "mean": 245.13676666666666, + "min": 211.3964, + "max": 272.6607 + }, + "p95": { + "mean": 496.65339166666655, + "min": 457.89995, + "max": 568.1372199999998 + } + } + }, + "_effectiveConfig": { + "numPartitions": 1, + "consumerMode": "eachMessage", + "partitionsConsumedConcurrently": 1, + "containerStartupLogs": { + "streammart-gateway": "[EFFECTIVE CONFIG] api-gateway: PORT=8080, PAYMENT_SERVICE_URL=http://payment-service:8000, PROXY_KEEP_ALIVE=true, NODE_ENV=development", + "streammart-payment": "[EFFECTIVE CONFIG] payment-service: PORT=8000, DB_POOL_MAX=30, RELAY_BATCH_SEND=true, RELAY_BUSY_PAUSE_MS=25, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-order": "[EFFECTIVE CONFIG] order-service: PORT=8001, DB_POOL_MAX=30, CONSUMER_MODE=eachMessage, PARTITIONS_CONSUMED_CONCURRENTLY=1, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-email": "[EFFECTIVE CONFIG] email-service: PORT=8002, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092" + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-experiment-fix_a.json b/benchmarks/raw/summary-experiment-fix_a.json new file mode 100644 index 0000000..004714c --- /dev/null +++ b/benchmarks/raw/summary-experiment-fix_a.json @@ -0,0 +1,238 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "acceptedRate": 209.8918409363973, + "completedRate": 163.0490620210293, + "acceptedCount": 6513, + "completedCount": 6513, + "consumerLagAt30s": 1585, + "timeToReachZero": 8.91, + "timedOut": false, + "p50": 38.5161, + "p95": 79.72677999999995, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 219.5686744748139, + "completedRate": 149.57686052284484, + "acceptedCount": 6867, + "completedCount": 6867, + "consumerLagAt30s": 2156, + "timeToReachZero": 14.63, + "timedOut": false, + "p50": 32.6616, + "p95": 76.4545, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 230.65579739792992, + "completedRate": 144.09545956254152, + "acceptedCount": 7155, + "completedCount": 7155, + "consumerLagAt30s": 2686, + "timeToReachZero": 18.63, + "timedOut": false, + "p50": 29.12825, + "p95": 69.08915, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 220.0387709363804, + "min": 209.8918409363973, + "max": 230.65579739792992 + }, + "completedRate": { + "mean": 152.24046070213856, + "min": 144.09545956254152, + "max": 163.0490620210293 + }, + "consumerLagAt30s": { + "mean": 2142.3333333333335, + "min": 1585, + "max": 2686 + }, + "timeToReachZero": { + "mean": 14.056666666666667, + "min": 8.91, + "max": 18.63 + }, + "p50": { + "mean": 33.435316666666665, + "min": 29.12825, + "max": 38.5161 + }, + "p95": { + "mean": 75.09014333333333, + "min": 69.08915, + "max": 79.72677999999995 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 251.92187707717372, + "completedRate": 95.72641734552417, + "acceptedCount": 7833, + "completedCount": 7833, + "consumerLagAt30s": 4900, + "timeToReachZero": 50.73, + "timedOut": false, + "p50": 133.23145, + "p95": 240.92052499999997, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 283.5945002858387, + "completedRate": 90.270178991741, + "acceptedCount": 8870, + "completedCount": 8870, + "consumerLagAt30s": 6149, + "timeToReachZero": 66.98, + "timedOut": false, + "p50": 96.0771, + "p95": 209.19445000000002, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 284.9358742020045, + "completedRate": 86.22099970926185, + "acceptedCount": 9075, + "completedCount": 9075, + "consumerLagAt30s": 6525, + "timeToReachZero": 73.4, + "timedOut": false, + "p50": 104.67945, + "p95": 205.876, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 273.4840838550056, + "min": 251.92187707717372, + "max": 284.9358742020045 + }, + "completedRate": { + "mean": 90.73919868217568, + "min": 86.22099970926185, + "max": 95.72641734552417 + }, + "consumerLagAt30s": { + "mean": 5858, + "min": 4900, + "max": 6525 + }, + "timeToReachZero": { + "mean": 63.70333333333334, + "min": 50.73, + "max": 73.4 + }, + "p50": { + "mean": 111.32933333333334, + "min": 96.0771, + "max": 133.23145 + }, + "p95": { + "mean": 218.6636583333333, + "min": 205.876, + "max": 240.92052499999997 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 320.30946053751046, + "completedRate": 72.4160516458141, + "acceptedCount": 10163, + "completedCount": 10163, + "consumerLagAt30s": 7804, + "timeToReachZero": 108.61, + "timedOut": false, + "p50": 215.20229999999998, + "p95": 429.09296500000005, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 361.2269581484897, + "completedRate": 71.32045397487694, + "acceptedCount": 11376, + "completedCount": 11376, + "consumerLagAt30s": 9077, + "timeToReachZero": 128.01, + "timedOut": false, + "p50": 196.7474, + "p95": 370.5308399999997, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 338.95957756016, + "completedRate": 119.91823779131775, + "acceptedCount": 10604, + "completedCount": 10604, + "consumerLagAt30s": 6854, + "timeToReachZero": 57.14, + "timedOut": false, + "p50": 204.9555, + "p95": 399.3746, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 340.1653320820534, + "min": 320.30946053751046, + "max": 361.2269581484897 + }, + "completedRate": { + "mean": 87.88491447066959, + "min": 71.32045397487694, + "max": 119.91823779131775 + }, + "consumerLagAt30s": { + "mean": 7911.666666666667, + "min": 6854, + "max": 9077 + }, + "timeToReachZero": { + "mean": 97.92, + "min": 57.14, + "max": 128.01 + }, + "p50": { + "mean": 205.6350666666667, + "min": 196.7474, + "max": 215.20229999999998 + }, + "p95": { + "mean": 399.66613499999994, + "min": 370.5308399999997, + "max": 429.09296500000005 + } + } + }, + "_effectiveConfig": { + "numPartitions": 6, + "consumerMode": "eachMessage", + "partitionsConsumedConcurrently": 6, + "containerStartupLogs": { + "streammart-gateway": "[EFFECTIVE CONFIG] api-gateway: PORT=8080, PAYMENT_SERVICE_URL=http://payment-service:8000, PROXY_KEEP_ALIVE=true, NODE_ENV=development", + "streammart-payment": "[EFFECTIVE CONFIG] payment-service: PORT=8000, DB_POOL_MAX=30, RELAY_BATCH_SEND=true, RELAY_BUSY_PAUSE_MS=25, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-order": "[EFFECTIVE CONFIG] order-service: PORT=8001, DB_POOL_MAX=30, CONSUMER_MODE=eachMessage, PARTITIONS_CONSUMED_CONCURRENTLY=6, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-email": "[EFFECTIVE CONFIG] email-service: PORT=8002, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092" + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-experiment-fix_b.json b/benchmarks/raw/summary-experiment-fix_b.json new file mode 100644 index 0000000..df71549 --- /dev/null +++ b/benchmarks/raw/summary-experiment-fix_b.json @@ -0,0 +1,238 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "acceptedRate": 252.55165683749925, + "completedRate": 250.58737073955803, + "acceptedCount": 7860, + "completedCount": 7860, + "consumerLagAt30s": 0, + "timeToReachZero": 0.24, + "timedOut": false, + "p50": 22.4962, + "p95": 56.4901, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 246.76327681344404, + "completedRate": 244.8388477382772, + "acceptedCount": 7662, + "completedCount": 7662, + "consumerLagAt30s": 0, + "timeToReachZero": 0.24, + "timedOut": false, + "p50": 22.5201, + "p95": 58.741479999999974, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 260.03340946212364, + "completedRate": 258.08294633855405, + "acceptedCount": 8046, + "completedCount": 8046, + "consumerLagAt30s": 0, + "timeToReachZero": 0.23, + "timedOut": false, + "p50": 20.2871, + "p95": 52.50977999999998, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 253.1161143710223, + "min": 246.76327681344404, + "max": 260.03340946212364 + }, + "completedRate": { + "mean": 251.1697216054631, + "min": 244.8388477382772, + "max": 258.08294633855405 + }, + "consumerLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "timeToReachZero": { + "mean": 0.23666666666666666, + "min": 0.23, + "max": 0.24 + }, + "p50": { + "mean": 21.767799999999998, + "min": 20.2871, + "max": 22.5201 + }, + "p95": { + "mean": 55.91378666666665, + "min": 52.50977999999998, + "max": 58.741479999999974 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 391.51036972954273, + "completedRate": 388.348142164459, + "acceptedCount": 12143, + "completedCount": 12143, + "consumerLagAt30s": 0, + "timeToReachZero": 0.25, + "timedOut": false, + "p50": 68.58695, + "p95": 127.70579000000002, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 335.84246571946017, + "completedRate": 333.0130865493323, + "acceptedCount": 10395, + "completedCount": 10395, + "consumerLagAt30s": 0, + "timeToReachZero": 0.26, + "timedOut": false, + "p50": 85.3989, + "p95": 169.13959999999997, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 389.0480025351839, + "completedRate": 385.4134318707646, + "acceptedCount": 12070, + "completedCount": 12070, + "consumerLagAt30s": 0, + "timeToReachZero": 0.29, + "timedOut": false, + "p50": 68.0193, + "p95": 125.588, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 372.1336126613956, + "min": 335.84246571946017, + "max": 391.51036972954273 + }, + "completedRate": { + "mean": 368.92488686151864, + "min": 333.0130865493323, + "max": 388.348142164459 + }, + "consumerLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "timeToReachZero": { + "mean": 0.26666666666666666, + "min": 0.25, + "max": 0.29 + }, + "p50": { + "mean": 74.00171666666667, + "min": 68.0193, + "max": 85.3989 + }, + "p95": { + "mean": 140.81113000000002, + "min": 125.588, + "max": 169.13959999999997 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 383.8176517298617, + "completedRate": 380.51444770391015, + "acceptedCount": 12053, + "completedCount": 12053, + "consumerLagAt30s": 0, + "timeToReachZero": 0.27, + "timedOut": false, + "p50": 176.6354, + "p95": 393.7101650000001, + "errorRate": 0 + }, + { + "run": 2, + "acceptedRate": 354.89211212770323, + "completedRate": 349.94608174036733, + "acceptedCount": 11119, + "completedCount": 11119, + "consumerLagAt30s": 0, + "timeToReachZero": 0.44, + "timedOut": false, + "p50": 188.8449, + "p95": 390.6495, + "errorRate": 0 + }, + { + "run": 3, + "acceptedRate": 399.7492493660774, + "completedRate": 396.7859540641746, + "acceptedCount": 12445, + "completedCount": 12445, + "consumerLagAt30s": 0, + "timeToReachZero": 0.23, + "timedOut": false, + "p50": 169.9332, + "p95": 340.01734999999996, + "errorRate": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 379.4863377412141, + "min": 354.89211212770323, + "max": 399.7492493660774 + }, + "completedRate": { + "mean": 375.74882783615067, + "min": 349.94608174036733, + "max": 396.7859540641746 + }, + "consumerLagAt30s": { + "mean": 0, + "min": 0, + "max": 0 + }, + "timeToReachZero": { + "mean": 0.3133333333333333, + "min": 0.23, + "max": 0.44 + }, + "p50": { + "mean": 178.47116666666668, + "min": 169.9332, + "max": 188.8449 + }, + "p95": { + "mean": 374.79233833333336, + "min": 340.01734999999996, + "max": 393.7101650000001 + } + } + }, + "_effectiveConfig": { + "numPartitions": 1, + "consumerMode": "eachBatch", + "partitionsConsumedConcurrently": 1, + "containerStartupLogs": { + "streammart-gateway": "[EFFECTIVE CONFIG] api-gateway: PORT=8080, PAYMENT_SERVICE_URL=http://payment-service:8000, PROXY_KEEP_ALIVE=true, NODE_ENV=development", + "streammart-payment": "[EFFECTIVE CONFIG] payment-service: PORT=8000, DB_POOL_MAX=30, RELAY_BATCH_SEND=true, RELAY_BUSY_PAUSE_MS=25, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-order": "[EFFECTIVE CONFIG] order-service: PORT=8001, DB_POOL_MAX=30, CONSUMER_MODE=eachBatch, PARTITIONS_CONSUMED_CONCURRENTLY=1, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092", + "streammart-email": "[EFFECTIVE CONFIG] email-service: PORT=8002, OUTBOX_RETENTION_HOURS=1, KAFKA_BROKERS=kafka:9092" + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-keepalive_only.json b/benchmarks/raw/summary-keepalive_only.json new file mode 100644 index 0000000..991f6f4 --- /dev/null +++ b/benchmarks/raw/summary-keepalive_only.json @@ -0,0 +1,224 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "acceptedRate": 200.27610478169558, + "completedRate": 84.89651081604192, + "completedCount": 2643, + "p50": 30.0754, + "p95": 76.66354999999974, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "acceptedRate": 236.74087033999658, + "completedRate": 114.04800921707707, + "completedCount": 3562, + "p50": 28.71765, + "p95": 53.70851999999999, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "acceptedRate": 238.85439915196093, + "completedRate": 111.86326416723985, + "completedCount": 3505, + "p50": 28.4212, + "p95": 51.67138999999999, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 225.29045809121772, + "min": 200.27610478169558, + "max": 238.85439915196093 + }, + "completedRate": { + "mean": 103.60259473345293, + "min": 84.89651081604192, + "max": 114.04800921707707 + }, + "p50": { + "mean": 29.071416666666664, + "min": 28.4212, + "max": 30.0754 + }, + "p95": { + "mean": 60.681153333333235, + "min": 51.67138999999999, + "max": 76.66354999999974 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 315.230813609332, + "completedRate": 101.58719805090459, + "completedCount": 3678, + "p50": 95.04055, + "p95": 153.26894499999995, + "errorRate": 0, + "backlog": 2471, + "drainSec": 4.73 + }, + { + "run": 2, + "acceptedRate": 325.9481722088506, + "completedRate": 111.92281151730499, + "completedCount": 4070, + "p50": 93.5978, + "p95": 135.61110000000002, + "errorRate": 0, + "backlog": 2870, + "drainSec": 5.16 + }, + { + "run": 3, + "acceptedRate": 309.3263345520791, + "completedRate": 100.12359811534081, + "completedCount": 3553, + "p50": 95.71494999999999, + "p95": 161.6418, + "errorRate": 0, + "backlog": 2339, + "drainSec": 4.16 + } + ], + "summary": { + "acceptedRate": { + "mean": 316.8351067900872, + "min": 309.3263345520791, + "max": 325.9481722088506 + }, + "completedRate": { + "mean": 104.5445358945168, + "min": 100.12359811534081, + "max": 111.92281151730499 + }, + "p50": { + "mean": 94.78443333333333, + "min": 93.5978, + "max": 95.71494999999999 + }, + "p95": { + "mean": 150.17394833333333, + "min": 135.61110000000002, + "max": 161.6418 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 2560, + "min": 2339, + "max": 2870 + }, + "drainSec": { + "mean": 4.683333333333334, + "min": 4.16, + "max": 5.16 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 320.60011508536195, + "completedRate": 102.80093777082556, + "completedCount": 3889, + "p50": 234.1476, + "p95": 340.62426, + "errorRate": 0, + "backlog": 3682, + "drainSec": 6.38 + }, + { + "run": 2, + "acceptedRate": 328.8835332680041, + "completedRate": 102.95319164947833, + "completedCount": 3963, + "p50": 230.69465, + "p95": 311.092575, + "errorRate": 0, + "backlog": 3603, + "drainSec": 6.64 + }, + { + "run": 3, + "acceptedRate": 332.05892273395415, + "completedRate": 113.45128472707314, + "completedCount": 4226, + "p50": 226.9746, + "p95": 318.08133999999995, + "errorRate": 0, + "backlog": 3407, + "drainSec": 5.74 + } + ], + "summary": { + "acceptedRate": { + "mean": 327.1808570291068, + "min": 320.60011508536195, + "max": 332.05892273395415 + }, + "completedRate": { + "mean": 106.40180471579235, + "min": 102.80093777082556, + "max": 113.45128472707314 + }, + "p50": { + "mean": 230.6056166666667, + "min": 226.9746, + "max": 234.1476 + }, + "p95": { + "mean": 323.2660583333333, + "min": 311.092575, + "max": 340.62426 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 3564, + "min": 3407, + "max": 3682 + }, + "drainSec": { + "mean": 6.253333333333333, + "min": 5.74, + "max": 6.64 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-pool_keepalive.json b/benchmarks/raw/summary-pool_keepalive.json new file mode 100644 index 0000000..2ca6663 --- /dev/null +++ b/benchmarks/raw/summary-pool_keepalive.json @@ -0,0 +1,224 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "acceptedRate": 226.94151181897817, + "completedRate": 104.33389889834791, + "completedCount": 3243, + "p50": 32.17655, + "p95": 61.46484499999999, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "acceptedRate": 232.60835444883892, + "completedRate": 104.09001785960727, + "completedCount": 3281, + "p50": 29.90765, + "p95": 57.594914999999986, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "acceptedRate": 234.55650938915485, + "completedRate": 107.23681461626252, + "completedCount": 3348, + "p50": 30.1699, + "p95": 57.61242999999999, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 231.36879188565732, + "min": 226.94151181897817, + "max": 234.55650938915485 + }, + "completedRate": { + "mean": 105.22024379140589, + "min": 104.09001785960727, + "max": 107.23681461626252 + }, + "p50": { + "mean": 30.751366666666666, + "min": 29.90765, + "max": 32.17655 + }, + "p95": { + "mean": 58.89072999999999, + "min": 57.594914999999986, + "max": 61.46484499999999 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 275.7617635697437, + "completedRate": 97.14914125652597, + "completedCount": 3475, + "p50": 89.6461, + "p95": 147.85165999999998, + "errorRate": 0, + "backlog": 2733, + "drainSec": 4.5 + }, + { + "run": 2, + "acceptedRate": 337.3541511173784, + "completedRate": 106.45923150717105, + "completedCount": 3885, + "p50": 88.9003, + "p95": 131.46713, + "errorRate": 0, + "backlog": 3103, + "drainSec": 5.06 + }, + { + "run": 3, + "acceptedRate": 318.3537186352134, + "completedRate": 111.20416597158452, + "completedCount": 4127, + "p50": 97.7437, + "p95": 141.3061, + "errorRate": 0, + "backlog": 3330, + "drainSec": 5.76 + } + ], + "summary": { + "acceptedRate": { + "mean": 310.48987777411185, + "min": 275.7617635697437, + "max": 337.3541511173784 + }, + "completedRate": { + "mean": 104.9375129117605, + "min": 97.14914125652597, + "max": 111.20416597158452 + }, + "p50": { + "mean": 92.0967, + "min": 88.9003, + "max": 97.7437 + }, + "p95": { + "mean": 140.20829666666666, + "min": 131.46713, + "max": 147.85165999999998 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 3055.3333333333335, + "min": 2733, + "max": 3330 + }, + "drainSec": { + "mean": 5.1066666666666665, + "min": 4.5, + "max": 5.76 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 314.50566048846855, + "completedRate": 101.10811753472315, + "completedCount": 3833, + "p50": 212.65570000000002, + "p95": 441.407915, + "errorRate": 0, + "backlog": 2417, + "drainSec": 6.61 + }, + { + "run": 2, + "acceptedRate": 339.8026472682555, + "completedRate": 114.52450066469864, + "completedCount": 4390, + "p50": 218.26505, + "p95": 360.79171499999995, + "errorRate": 0, + "backlog": 3807, + "drainSec": 6.82 + }, + { + "run": 3, + "acceptedRate": 334.2479667348476, + "completedRate": 103.51069398339989, + "completedCount": 3938, + "p50": 232.18645, + "p95": 365.97811499999966, + "errorRate": 0, + "backlog": 3925, + "drainSec": 6.84 + } + ], + "summary": { + "acceptedRate": { + "mean": 329.5187581638572, + "min": 314.50566048846855, + "max": 339.8026472682555 + }, + "completedRate": { + "mean": 106.38110406094056, + "min": 101.10811753472315, + "max": 114.52450066469864 + }, + "p50": { + "mean": 221.03573333333335, + "min": 212.65570000000002, + "max": 232.18645 + }, + "p95": { + "mean": 389.3925816666665, + "min": 360.79171499999995, + "max": 441.407915 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 3383, + "min": 2417, + "max": 3925 + }, + "drainSec": { + "mean": 6.756666666666667, + "min": 6.61, + "max": 6.84 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-pool_keepalive_batched.json b/benchmarks/raw/summary-pool_keepalive_batched.json new file mode 100644 index 0000000..6637432 --- /dev/null +++ b/benchmarks/raw/summary-pool_keepalive_batched.json @@ -0,0 +1,224 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "acceptedRate": 230.0868153058014, + "completedRate": 102.54182126401584, + "completedCount": 3203, + "p50": 31.8207, + "p95": 58.41894, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "acceptedRate": 237.4368279200822, + "completedRate": 117.30433431352193, + "completedCount": 3650, + "p50": 30.03815, + "p95": 53.14210499999999, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "acceptedRate": 217.51219341540877, + "completedRate": 100.00044515913368, + "completedCount": 3118, + "p50": 33.6357, + "p95": 66.14442499999998, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 228.34527888043078, + "min": 217.51219341540877, + "max": 237.4368279200822 + }, + "completedRate": { + "mean": 106.61553357889049, + "min": 100.00044515913368, + "max": 117.30433431352193 + }, + "p50": { + "mean": 31.83151666666667, + "min": 30.03815, + "max": 33.6357 + }, + "p95": { + "mean": 59.235156666666654, + "min": 53.14210499999999, + "max": 66.14442499999998 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 339.3650448092409, + "completedRate": 102.87481434593435, + "completedCount": 3868, + "p50": 87.75405, + "p95": 131.968665, + "errorRate": 0, + "backlog": 3731, + "drainSec": 6.27 + }, + { + "run": 2, + "acceptedRate": 337.1999985421481, + "completedRate": 113.69648198980654, + "completedCount": 4382, + "p50": 88.8672, + "p95": 130.05116999999998, + "errorRate": 0, + "backlog": 4174, + "drainSec": 7.18 + }, + { + "run": 3, + "acceptedRate": 336.7711098517112, + "completedRate": 103.3371946887107, + "completedCount": 4023, + "p50": 89.9344, + "p95": 131.6109, + "errorRate": 0, + "backlog": 4070, + "drainSec": 7.69 + } + ], + "summary": { + "acceptedRate": { + "mean": 337.7787177343667, + "min": 336.7711098517112, + "max": 339.3650448092409 + }, + "completedRate": { + "mean": 106.63616367481718, + "min": 102.87481434593435, + "max": 113.69648198980654 + }, + "p50": { + "mean": 88.85188333333333, + "min": 87.75405, + "max": 89.9344 + }, + "p95": { + "mean": 131.210245, + "min": 130.05116999999998, + "max": 131.968665 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 3991.6666666666665, + "min": 3731, + "max": 4174 + }, + "drainSec": { + "mean": 7.046666666666667, + "min": 6.27, + "max": 7.69 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 320.8791001809029, + "completedRate": 101.42970734089435, + "completedCount": 3839, + "p50": 214.7429, + "p95": 429.95682, + "errorRate": 0, + "backlog": 3552, + "drainSec": 6.27 + }, + { + "run": 2, + "acceptedRate": 340.19683488033604, + "completedRate": 114.21165891619691, + "completedCount": 4471, + "p50": 229.8143, + "p95": 328.633795, + "errorRate": 0, + "backlog": 4431, + "drainSec": 7.9 + }, + { + "run": 3, + "acceptedRate": 336.9934142959749, + "completedRate": 103.4759280166306, + "completedCount": 3986, + "p50": 200.83525, + "p95": 385.241655, + "errorRate": 0, + "backlog": 4009, + "drainSec": 6.74 + } + ], + "summary": { + "acceptedRate": { + "mean": 332.6897831190713, + "min": 320.8791001809029, + "max": 340.19683488033604 + }, + "completedRate": { + "mean": 106.37243142457396, + "min": 101.42970734089435, + "max": 114.21165891619691 + }, + "p50": { + "mean": 215.13081666666665, + "min": 200.83525, + "max": 229.8143 + }, + "p95": { + "mean": 381.2774233333334, + "min": 328.633795, + "max": 429.95682 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 3997.3333333333335, + "min": 3552, + "max": 4431 + }, + "drainSec": { + "mean": 6.97, + "min": 6.27, + "max": 7.9 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-pool_keepalive_optimized.json b/benchmarks/raw/summary-pool_keepalive_optimized.json new file mode 100644 index 0000000..60e90b2 --- /dev/null +++ b/benchmarks/raw/summary-pool_keepalive_optimized.json @@ -0,0 +1,191 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "rps": 90.65548410669136, + "p50": 112.3223, + "p95": 401.1550599999999, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "rps": 103.99125393272719, + "p50": 86.5009, + "p95": 400.31000999999986, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "rps": 111.61596620261929, + "p50": 95.9608, + "p95": 292.0354, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "rps": { + "mean": 102.08756808067928, + "min": 90.65548410669136, + "max": 111.61596620261929 + }, + "p50": { + "mean": 98.26133333333333, + "min": 86.5009, + "max": 112.3223 + }, + "p95": { + "mean": 364.50015666666656, + "min": 292.0354, + "max": 401.1550599999999 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "rps": 113.19520016668044, + "p50": 265.00525, + "p95": 1279.787, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "rps": 188.2921190928996, + "p50": 187.74625, + "p95": 410.2304, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "rps": 193.66440368754846, + "p50": 194.48585, + "p95": 347.22975499999995, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "rps": { + "mean": 165.0505743157095, + "min": 113.19520016668044, + "max": 193.66440368754846 + }, + "p50": { + "mean": 215.74578333333332, + "min": 187.74625, + "max": 265.00525 + }, + "p95": { + "mean": 679.082385, + "min": 347.22975499999995, + "max": 1279.787 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "rps": 247.01566255339293, + "p50": 274.7672, + "p95": 729.1731399999999, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "rps": 234.28208670970574, + "p50": 330.8776, + "p95": 686.0040199999997, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "rps": 172.21709134889758, + "p50": 363.4109, + "p95": 870.1356, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "rps": { + "mean": 217.83828020399878, + "min": 172.21709134889758, + "max": 247.01566255339293 + }, + "p50": { + "mean": 323.0185666666667, + "min": 274.7672, + "max": 363.4109 + }, + "p95": { + "mean": 761.7709199999999, + "min": 686.0040199999997, + "max": 870.1356 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/summary-pool_only.json b/benchmarks/raw/summary-pool_only.json new file mode 100644 index 0000000..f645744 --- /dev/null +++ b/benchmarks/raw/summary-pool_only.json @@ -0,0 +1,224 @@ +{ + "20": { + "runs": [ + { + "run": 1, + "acceptedRate": 192.30542766342475, + "completedRate": 95.06588129505074, + "completedCount": 2974, + "p50": 44.8053, + "p95": 81.064725, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "acceptedRate": 191.95778750822018, + "completedRate": 86.3326116591592, + "completedCount": 2676, + "p50": 44.11735, + "p95": 90.51522500000002, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "acceptedRate": 175.1122517401051, + "completedRate": 87.04892166515725, + "completedCount": 2746, + "p50": 47.16715, + "p95": 89.99211999999997, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 186.45848897058332, + "min": 175.1122517401051, + "max": 192.30542766342475 + }, + "completedRate": { + "mean": 89.48247153978906, + "min": 86.3326116591592, + "max": 95.06588129505074 + }, + "p50": { + "mean": 45.36326666666667, + "min": 44.11735, + "max": 47.16715 + }, + "p95": { + "mean": 87.19068999999998, + "min": 81.064725, + "max": 90.51522500000002 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "50": { + "runs": [ + { + "run": 1, + "acceptedRate": 222.664744945599, + "completedRate": 87.9315023799683, + "completedCount": 2775, + "p50": 158.163, + "p95": 219.0233, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "acceptedRate": 213.63664358219927, + "completedRate": 96.43188372220591, + "completedCount": 3036, + "p50": 166.59685, + "p95": 232.034325, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "acceptedRate": 199.8710023778885, + "completedRate": 82.39196493007002, + "completedCount": 2630, + "p50": 164.83345, + "p95": 257.8115899999998, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 212.05746363522894, + "min": 199.8710023778885, + "max": 222.664744945599 + }, + "completedRate": { + "mean": 88.9184503440814, + "min": 82.39196493007002, + "max": 96.43188372220591 + }, + "p50": { + "mean": 163.19776666666667, + "min": 158.163, + "max": 166.59685 + }, + "p95": { + "mean": 236.28973833333328, + "min": 219.0233, + "max": 257.8115899999998 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + }, + "100": { + "runs": [ + { + "run": 1, + "acceptedRate": 216.15154787567175, + "completedRate": 84.03967137764924, + "completedCount": 2666, + "p50": 387.905, + "p95": 524.96764, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 2, + "acceptedRate": 205.4113343792951, + "completedRate": 94.27483884847722, + "completedCount": 3008, + "p50": 403.71205, + "p95": 501.82628, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + }, + { + "run": 3, + "acceptedRate": 222.25687501837496, + "completedRate": 89.0659434202412, + "completedCount": 2838, + "p50": 360.84175, + "p95": 453.053135, + "errorRate": 0, + "backlog": 0, + "drainSec": 0 + } + ], + "summary": { + "acceptedRate": { + "mean": 214.6065857577806, + "min": 205.4113343792951, + "max": 222.25687501837496 + }, + "completedRate": { + "mean": 89.12681788212255, + "min": 84.03967137764924, + "max": 94.27483884847722 + }, + "p50": { + "mean": 384.1529333333333, + "min": 360.84175, + "max": 403.71205 + }, + "p95": { + "mean": 493.2823516666667, + "min": 453.053135, + "max": 524.96764 + }, + "errorRate": { + "mean": 0, + "min": 0, + "max": 0 + }, + "backlog": { + "mean": 0, + "min": 0, + "max": 0 + }, + "drainSec": { + "mean": 0, + "min": 0, + "max": 0 + } + } + } +} \ No newline at end of file diff --git a/benchmarks/raw/test-summary.json b/benchmarks/raw/test-summary.json new file mode 100644 index 0000000..2f0c131 --- /dev/null +++ b/benchmarks/raw/test-summary.json @@ -0,0 +1,130 @@ +{ + "metrics": { + "http_req_duration": { + "max": 42.1611, + "p(90)": 28.016460000000002, + "p(95)": 31.016549999999985, + "avg": 22.343934545454548, + "min": 7.2288, + "med": 20.3629 + }, + "http_req_waiting": { + "avg": 22.014258181818175, + "min": 7.2288, + "med": 20.2978, + "max": 41.3901, + "p(90)": 27.50326, + "p(95)": 30.859499999999986 + }, + "iterations": { + "count": 54, + "rate": 25.87450806091549 + }, + "http_req_duration{expected_response:true}": { + "p(90)": 28.016460000000002, + "p(95)": 31.016549999999985, + "avg": 22.343934545454548, + "min": 7.2288, + "med": 20.3629, + "max": 42.1611 + }, + "vus_max": { + "value": 2, + "min": 2, + "max": 2 + }, + "checks": { + "passes": 54, + "fails": 0, + "value": 1 + }, + "http_reqs": { + "count": 55, + "rate": 26.35366561759911 + }, + "http_req_tls_handshaking": { + "min": 0, + "med": 0, + "max": 0, + "p(90)": 0, + "p(95)": 0, + "avg": 0 + }, + "iteration_duration": { + "avg": 74.88087592592593, + "min": 68.0631, + "med": 73.13825, + "max": 96.4521, + "p(90)": 80.75616000000001, + "p(95)": 84.78477499999997 + }, + "http_req_blocked": { + "min": 0.9902, + "med": 1.624, + "max": 51.1716, + "p(90)": 2.1170600000000004, + "p(95)": 2.22186, + "avg": 2.502041818181817 + }, + "http_req_failed": { + "passes": 0, + "fails": 55, + "thresholds": { + "rate<0.01": false + }, + "value": 0 + }, + "data_sent": { + "count": 25223, + "rate": 12085.791052230952 + }, + "http_req_sending": { + "avg": 0.03669090909090909, + "min": 0, + "med": 0, + "max": 0.8792, + "p(90)": 0, + "p(95)": 0.16418999999999845 + }, + "vus": { + "value": 2, + "min": 2, + "max": 2 + }, + "http_req_receiving": { + "min": 0, + "med": 0, + "max": 1.6913, + "p(90)": 0.7070400000000001, + "p(95)": 1.09071, + "avg": 0.2929854545454545 + }, + "http_req_connecting": { + "max": 2.4041, + "p(90)": 1.90686, + "p(95)": 2.2188, + "avg": 1.531398181818182, + "min": 0.9902, + "med": 1.5541 + }, + "data_received": { + "count": 15812, + "rate": 7576.439286281402 + } + }, + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": {}, + "checks": { + "status is 200": { + "name": "status is 200", + "path": "::status is 200", + "id": "6210a8cd14cd70477eba5c5e4cb3fb5f", + "passes": 54, + "fails": 0 + } + } + } +} diff --git a/benchmarks/run-baseline.ps1 b/benchmarks/run-baseline.ps1 new file mode 100644 index 0000000..9adbd91 --- /dev/null +++ b/benchmarks/run-baseline.ps1 @@ -0,0 +1,4 @@ +. ./benchmarks/run-matrix.ps1 +$res = Benchmark-Config "baseline" 10 "false" +$res | ConvertTo-Json -Depth 5 | Out-File -Encoding utf8 "benchmarks/raw/results-baseline.json" +Write-Host "`n>>> Baseline Finished! Saved to benchmarks/raw/results-baseline.json" diff --git a/benchmarks/run-benchmarks.js b/benchmarks/run-benchmarks.js new file mode 100644 index 0000000..8db84b3 --- /dev/null +++ b/benchmarks/run-benchmarks.js @@ -0,0 +1,292 @@ +import { execSync, spawn } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { performance } from 'node:perf_hooks'; + +const k6Binary = 'C:\\Program Files\\k6\\k6.exe'; +const rawDir = path.resolve('benchmarks/raw'); +if (!fs.existsSync(rawDir)) fs.mkdirSync(rawDir, { recursive: true }); + +const targetConfig = process.argv[2] || 'all'; + +const CONFIGS = { + baseline: { poolMax: 10, keepAlive: false, batchSend: false }, + pool_only: { poolMax: 30, keepAlive: false, batchSend: false }, + keepalive_only: { poolMax: 10, keepAlive: true, batchSend: false }, + pool_keepalive: { poolMax: 30, keepAlive: true, batchSend: false }, + pool_keepalive_batched: { poolMax: 30, keepAlive: true, batchSend: true }, +}; + +function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + try { + const out = execSync( + `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`, + { encoding: 'utf8' } + ).trim(); + return out; + } catch (err) { + console.error(`DB Query Error [${sqlQuery}]:`, err.message); + return '0'; + } +} + +function resetPostgres() { + console.log('>>> [Clean Reset] Resetting Postgres (truncating all tables and ensuring outbox index)...'); + execSync( + 'docker exec streammart-postgres psql -U postgres -d streammart -c "TRUNCATE payments, orders, processed_events, outbox_events CASCADE;"', + { stdio: 'inherit' } + ); + execSync( + 'docker exec streammart-postgres psql -U postgres -d streammart -c "CREATE INDEX IF NOT EXISTS idx_outbox_events_unpublished ON outbox_events (created_at ASC) WHERE published = false AND topic = \'payment-successful\';"', + { stdio: 'inherit' } + ); +} + +function resetKafkaTopics() { + console.log('>>> [Clean Reset] Recreating Kafka application topics...'); + const topics = ['payment-successful', 'order-successful', 'email-successful', 'payment-successful.DLQ']; + for (const topic of topics) { + try { + execSync( + `docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic ${topic}`, + { stdio: 'pipe' } + ); + } catch (_) {} + try { + execSync( + `docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --if-not-exists --topic ${topic} --partitions 1 --replication-factor 1`, + { stdio: 'pipe' } + ); + } catch (_) {} + } +} + +async function setConfiguration(configName, { poolMax, keepAlive, batchSend }) { + console.log(`\n========================================================================`); + console.log(`>>> [CONFIG] Deploying: ${configName}`); + console.log(` DB_POOL_MAX=${poolMax}, PROXY_KEEP_ALIVE=${keepAlive}, RELAY_BATCH_SEND=${batchSend}`); + console.log(`========================================================================`); + + // 1. Clean reset of Postgres and Kafka topics + resetPostgres(); + resetKafkaTopics(); + + // 2. Restart downstream consumers so their consumer groups reconnect cleanly + console.log('>>> Restarting downstream consumers (order-service, email-service, analytic-service)...'); + execSync('docker compose restart order-service email-service analytic-service', { stdio: 'inherit' }); + + // 3. Deploy gateway and payment service with target config + console.log('>>> Deploying api-gateway and payment-service with target config...'); + execSync('docker compose up -d --build api-gateway payment-service', { + stdio: 'inherit', + env: { + ...process.env, + DB_POOL_MAX: String(poolMax), + PROXY_KEEP_ALIVE: String(keepAlive), + RELAY_BATCH_SEND: String(batchSend), + PAYMENT_SERVICE_URL: 'http://payment-service:8000', + RELAY_BUSY_PAUSE_MS: '25', + OUTBOX_RETENTION_HOURS: '1', + }, + }); + + // 4. Wait for all containers to be healthy + console.log('>>> Waiting for all containers to become healthy...'); + const services = [ + 'streammart-gateway', + 'streammart-payment', + 'streammart-order', + 'streammart-email', + 'streammart-analytic', + ]; + + for (let i = 0; i < 40; i++) { + await sleep(2000); + try { + let allHealthy = true; + for (const svc of services) { + const status = execSync(`docker inspect ${svc} --format "{{.State.Health.Status}}"`, { encoding: 'utf8' }).trim(); + if (status !== 'healthy') { + allHealthy = false; + break; + } + } + if (allHealthy) { + console.log('>>> All services healthy and ready!'); + await sleep(2000); + return; + } + } catch (_) {} + } + throw new Error('Timed out waiting for services to become healthy'); +} + +async function drainOutbox() { + function getBacklog() { + try { + const out = queryDb("SELECT count(*) FROM outbox_events WHERE published = false AND topic = 'payment-successful';"); + return parseInt(out || '0', 10); + } catch (_) { + return 0; + } + } + + const backlog = getBacklog(); + if (backlog === 0) { + return { backlog: 0, drainSec: 0 }; + } + + console.log(` [Drain] Backlog: ${backlog} unpublished events. Waiting for relay to drain...`); + const start = performance.now(); + let remaining = backlog; + const timeout = performance.now() + 90000; + + while (remaining > 0 && performance.now() < timeout) { + await sleep(250); + remaining = getBacklog(); + } + + const drainSec = Number(((performance.now() - start) / 1000).toFixed(2)); + console.log(` [Drain] Done in ${drainSec}s (${(backlog / (drainSec || 0.001)).toFixed(1)} events/s).`); + return { backlog, drainSec }; +} + +function runK6(vus, duration, summaryFile, rawFile) { + return new Promise((resolve, reject) => { + const args = [ + 'run', + '--vus', String(vus), + '--duration', duration, + '--summary-export', summaryFile, + 'benchmarks/gateway-load.js', + ]; + + const outStream = fs.createWriteStream(rawFile); + const child = spawn(k6Binary, args, { stdio: ['inherit', 'pipe', 'pipe'] }); + + child.stdout.pipe(outStream); + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stderr); + + child.on('close', (code) => { + outStream.end(); + if (code !== 0) return reject(new Error(`k6 exited with code ${code}`)); + + const summary = JSON.parse(fs.readFileSync(summaryFile, 'utf8')); + const reqCount = summary.metrics.http_reqs?.count || 0; + const rps = summary.metrics.http_reqs?.rate || 0; + const p50 = summary.metrics.http_req_duration?.med || 0; + const p95 = summary.metrics.http_req_duration?.['p(95)'] || 0; + const failedRate = (summary.metrics.http_req_failed?.value || 0) * 100; + + resolve({ reqCount, rps, p50, p95, errorRate: failedRate }); + }); + }); +} + +function calcStats(numbers) { + const min = Math.min(...numbers); + const max = Math.max(...numbers); + const mean = numbers.reduce((a, b) => a + b, 0) / numbers.length; + return { mean, min, max }; +} + +async function runBenchmarkConfig(configName, configSettings) { + await setConfiguration(configName, configSettings); + + const configResults = {}; + + for (const vus of [20, 50, 100]) { + console.log(`\n------------------------------------------------------------------------`); + console.log(`๐Ÿšฆ Tier: ${configName} @ ${vus} VUs (1 Warm-up + 3 Measured Runs)`); + console.log(`------------------------------------------------------------------------`); + + // 1. Warm-up (discarded) + console.log(`>>> [Warm-up] ${vus} VUs for 30s (discarded)...`); + const warmupSummary = path.join(rawDir, `${configName}-${vus}vu-warmup.json`); + const warmupRaw = path.join(rawDir, `${configName}-${vus}vu-warmup.txt`); + await runK6(vus, '30s', warmupSummary, warmupRaw); + await drainOutbox(); + await sleep(2000); + + // 2. Three measured runs + const measuredRuns = []; + for (let r = 1; r <= 3; r++) { + console.log(`\n>>> [Measured Run ${r}/3] ${configName} @ ${vus} VUs for 30s...`); + const summaryFile = path.join(rawDir, `${configName}-${vus}vu-run${r}.json`); + const rawFile = path.join(rawDir, `${configName}-${vus}vu-run${r}.txt`); + + const ordersBefore = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + const k6Metrics = await runK6(vus, '30s', summaryFile, rawFile); + const drain = await drainOutbox(); + const ordersAfter = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + + const runDuration = k6Metrics.reqCount / (k6Metrics.rps || 1); + const totalTime = runDuration + drain.drainSec; + const completedCount = ordersAfter - ordersBefore; + const completedRate = completedCount / totalTime; + + console.log(` [Run ${r} Summary] Accepted: ${k6Metrics.rps.toFixed(2)} req/s | Completed (Counted Orders): ${completedRate.toFixed(2)} checkouts/s (${completedCount} orders in ${totalTime.toFixed(1)}s)`); + + measuredRuns.push({ + run: r, + acceptedRate: k6Metrics.rps, + completedRate: completedRate, + completedCount: completedCount, + p50: k6Metrics.p50, + p95: k6Metrics.p95, + errorRate: k6Metrics.errorRate, + backlog: drain.backlog, + drainSec: drain.drainSec, + }); + + await sleep(2000); + } + + const acceptedStats = calcStats(measuredRuns.map((r) => r.acceptedRate)); + const completedStats = calcStats(measuredRuns.map((r) => r.completedRate)); + const p50Stats = calcStats(measuredRuns.map((r) => r.p50)); + const p95Stats = calcStats(measuredRuns.map((r) => r.p95)); + const errStats = calcStats(measuredRuns.map((r) => r.errorRate)); + const backlogStats = calcStats(measuredRuns.map((r) => r.backlog)); + const drainStats = calcStats(measuredRuns.map((r) => r.drainSec)); + + configResults[vus] = { + runs: measuredRuns, + summary: { + acceptedRate: acceptedStats, + completedRate: completedStats, + p50: p50Stats, + p95: p95Stats, + errorRate: errStats, + backlog: backlogStats, + drainSec: drainStats, + }, + }; + } + + const outJson = path.join(rawDir, `summary-${configName}.json`); + fs.writeFileSync(outJson, JSON.stringify(configResults, null, 2), 'utf8'); + console.log(`\nโœ… Finished ${configName}. Summary saved to ${outJson}`); + return configResults; +} + +async function main() { + const configsToRun = targetConfig === 'all' + ? Object.keys(CONFIGS) + : [targetConfig]; + + for (const name of configsToRun) { + if (!CONFIGS[name]) throw new Error(`Unknown config: ${name}`); + await runBenchmarkConfig(name, CONFIGS[name]); + } +} + +main().catch((err) => { + console.error('\nโŒ Benchmark runner error:', err); + process.exit(1); +}); diff --git a/benchmarks/run-consumer-experiment.js b/benchmarks/run-consumer-experiment.js new file mode 100644 index 0000000..2309ce0 --- /dev/null +++ b/benchmarks/run-consumer-experiment.js @@ -0,0 +1,376 @@ +import { execSync, spawn } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { performance } from 'node:perf_hooks'; + +const k6Binary = 'C:\\Program Files\\k6\\k6.exe'; +const rawDir = path.resolve('benchmarks/raw'); +if (!fs.existsSync(rawDir)) fs.mkdirSync(rawDir, { recursive: true }); + +// Supported experiments: +// 'baseline': 1 partition, eachMessage, sequential +// 'fix_a': 6 partitions, partitionsConsumedConcurrently=6, eachMessage +// 'fix_b': 1 partition, eachBatch, batch transaction +const targetExperiment = process.argv[2] || 'fix_a'; + +function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + try { + const out = execSync( + `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`, + { encoding: 'utf8' } + ).trim(); + return out; + } catch (err) { + console.error(`DB Query Error [${sqlQuery}]:`, err.message); + return '0'; + } +} + +function resetPostgres() { + console.log('>>> [Clean Reset] Resetting Postgres (truncating all tables and ensuring outbox partial indexes)...'); + execSync( + 'docker exec streammart-postgres psql -U postgres -d streammart -c "TRUNCATE payments, orders, processed_events, outbox_events CASCADE;"', + { stdio: 'inherit' } + ); + execSync( + `docker exec streammart-postgres psql -U postgres -d streammart -c " + CREATE INDEX IF NOT EXISTS idx_outbox_events_payment_unpublished ON outbox_events (created_at ASC) WHERE published = false AND topic = 'payment-successful'; + CREATE INDEX IF NOT EXISTS idx_outbox_events_order_unpublished ON outbox_events (created_at ASC) WHERE published = false AND topic = 'order-successful'; + CREATE INDEX IF NOT EXISTS idx_outbox_events_email_unpublished ON outbox_events (created_at ASC) WHERE published = false AND topic = 'email-successful'; + "`, + { stdio: 'inherit' } + ); +} + +async function resetKafkaTopics(numPartitions = 1) { + console.log(`>>> [Clean Reset] Stopping app containers before Kafka topic reset...`); + try { + execSync('docker compose stop api-gateway payment-service order-service email-service analytic-service', { stdio: 'inherit' }); + } catch (_) { } + + console.log(`>>> [Clean Reset] Deleting and recreating Kafka application topics with ${numPartitions} partition(s)...`); + const topics = ['payment-successful', 'order-successful', 'email-successful', 'payment-successful.DLQ']; + for (const topic of topics) { + try { + execSync( + `docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic ${topic}`, + { stdio: 'pipe' } + ); + } catch (_) { } + } + + // Wait for Kafka async topic deletion to complete + await sleep(4000); + + for (const topic of topics) { + execSync( + `docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --if-not-exists --topic ${topic} --partitions ${numPartitions} --replication-factor 1`, + { stdio: 'inherit' } + ); + } + + // Verify partition count on payment-successful + const desc = execSync( + 'docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic payment-successful', + { encoding: 'utf8' } + ); + console.log(`>>> [Kafka Verification] payment-successful:\n${desc.trim()}`); + if (!desc.includes(`PartitionCount: ${numPartitions}`)) { + throw new Error(`Expected PartitionCount: ${numPartitions} for payment-successful, got:\n${desc}`); + } +} + +async function deployExperiment(experimentName) { + console.log(`\n========================================================================`); + console.log(`>>> [EXPERIMENT] Deploying: ${experimentName}`); + console.log(`========================================================================`); + + let numPartitions = 1; + let consumerMode = 'eachMessage'; + let concurrency = '1'; + + if (experimentName === 'fix_a') { + numPartitions = 6; + consumerMode = 'eachMessage'; + concurrency = '6'; + } else if (experimentName === 'fix_b') { + numPartitions = 1; + consumerMode = 'eachBatch'; + concurrency = '1'; + } else if (experimentName === 'baseline_consumer') { + numPartitions = 1; + consumerMode = 'eachMessage'; + concurrency = '1'; + } + + // 1. Reset Kafka topics (stops app containers first) and Postgres + await resetKafkaTopics(numPartitions); + resetPostgres(); + + // 2. Deploy services with target configuration (force-recreate to guarantee env vars apply) + console.log(`>>> Deploying containers: consumerMode=${consumerMode}, partitionsConsumedConcurrently=${concurrency}, partitions=${numPartitions}...`); + execSync('docker compose up -d --build --force-recreate api-gateway payment-service order-service email-service analytic-service', { + stdio: 'inherit', + env: { + ...process.env, + DB_POOL_MAX: '30', + PROXY_KEEP_ALIVE: 'true', + RELAY_BATCH_SEND: 'true', + RELAY_BUSY_PAUSE_MS: '25', + OUTBOX_RETENTION_HOURS: '1', + PAYMENT_SERVICE_URL: 'http://payment-service:8000', + CONSUMER_MODE: consumerMode, + PARTITIONS_CONSUMED_CONCURRENTLY: concurrency, + }, + }); + + // 3. Wait for all services to become healthy + console.log('>>> Waiting for all containers to report healthy...'); + const services = [ + 'streammart-gateway', + 'streammart-payment', + 'streammart-order', + 'streammart-email', + 'streammart-analytic', + ]; + + for (let i = 0; i < 40; i++) { + await sleep(2000); + try { + let allHealthy = true; + for (const svc of services) { + const status = execSync(`docker inspect ${svc} --format "{{.State.Health.Status}}"`, { encoding: 'utf8' }).trim(); + if (status !== 'healthy') { + allHealthy = false; + break; + } + } + if (allHealthy) { + console.log('>>> All services healthy and ready!'); + await sleep(3000); + // Extract and print [EFFECTIVE CONFIG] startup log lines from inside each container + const effectiveConfigs = {}; + console.log('>>> [Effective Config Verification from Container Startup Logs]'); + for (const svc of ['streammart-gateway', 'streammart-payment', 'streammart-order', 'streammart-email']) { + const logs = execSync(`docker logs ${svc} 2>&1`, { encoding: 'utf8' }); + const configLine = logs + .split(/\r?\n/) + .find((line) => line.includes('[EFFECTIVE CONFIG]')) || '(not found)'; + effectiveConfigs[svc] = configLine.trim(); + console.log(` ${svc}: ${effectiveConfigs[svc]}`); + } + const orderLogs = execSync('docker logs streammart-order 2>&1', { encoding: 'utf8' }); + const expectedMarker = `mode=${consumerMode}, partitionsConsumedConcurrently=${concurrency}`; + if (!orderLogs.includes(expectedMarker)) { + throw new Error(`Order service did not start with expected config "${expectedMarker}". Logs:\n${orderLogs.slice(-800)}`); + } + console.log(`>>> [Order Verification] Confirmed: ${expectedMarker}`); + return { + numPartitions, + consumerMode, + partitionsConsumedConcurrently: Number(concurrency), + containerStartupLogs: effectiveConfigs, + }; + } + } catch (e) { + if (e.message && e.message.includes('Order service did not start')) throw e; + } + } + throw new Error('Timed out waiting for services to become healthy'); +} + +function runK6(vus, duration, summaryFile, rawFile) { + return new Promise((resolve, reject) => { + const args = [ + 'run', + '--vus', String(vus), + '--duration', duration, + '--summary-export', summaryFile, + 'benchmarks/gateway-load.js', + ]; + + const outStream = fs.createWriteStream(rawFile); + const child = spawn(k6Binary, args, { stdio: ['inherit', 'pipe', 'pipe'] }); + + child.stdout.pipe(outStream); + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stderr); + + child.on('close', (code) => { + outStream.end(); + if (code !== 0) return reject(new Error(`k6 exited with code ${code}`)); + + const summary = JSON.parse(fs.readFileSync(summaryFile, 'utf8')); + if (summary.setup_data) { + delete summary.setup_data; + fs.writeFileSync(summaryFile, JSON.stringify(summary, null, 2) + '\n', 'utf8'); + } + const reqCount = summary.metrics.http_reqs?.count || 0; + const rps = summary.metrics.http_reqs?.rate || 0; + const p50 = summary.metrics.http_req_duration?.med || 0; + const p95 = summary.metrics.http_req_duration?.['p(95)'] || 0; + const failedRate = (summary.metrics.http_req_failed?.value || 0) * 100; + + resolve({ reqCount, rps, p50, p95, errorRate: failedRate }); + }); + }); +} + +async function waitForConsumerCatchup(targetOrders, ordersBefore, maxWaitMs = 120000) { + const start = performance.now(); + let currentOrders = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + let ordersProcessed = currentOrders - ordersBefore; + + console.log(` [Catch-up] Target: ${targetOrders} orders. Currently: ${ordersProcessed}. Waiting for consumer lag -> 0...`); + + const timeout = performance.now() + maxWaitMs; + while (ordersProcessed < targetOrders && performance.now() < timeout) { + await sleep(250); + currentOrders = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + ordersProcessed = currentOrders - ordersBefore; + process.stdout.write(` [Catch-up] Lag: ${targetOrders - ordersProcessed} remaining (${ordersProcessed}/${targetOrders})\r`); + } + + const drainSec = Number(((performance.now() - start) / 1000).toFixed(2)); + console.log(`\n [Catch-up] Completed ${ordersProcessed}/${targetOrders} in ${drainSec}s (${(ordersProcessed / (drainSec || 0.001)).toFixed(1)} orders/s).`); + + return { ordersProcessed, drainSec, timedOut: ordersProcessed < targetOrders }; +} + +function calcStats(numbers) { + const min = Math.min(...numbers); + const max = Math.max(...numbers); + const mean = numbers.reduce((a, b) => a + b, 0) / numbers.length; + return { mean, min, max }; +} + +async function runExperiment(experimentName) { + const effectiveConfig = await deployExperiment(experimentName); + + const experimentResults = { + _effectiveConfig: effectiveConfig, + }; + + for (const vus of [20, 50, 100]) { + console.log(`\n------------------------------------------------------------------------`); + console.log(`๐Ÿšฆ Tier: ${experimentName} @ ${vus} VUs (1 Warm-up + 3 Measured Runs)`); + console.log(`------------------------------------------------------------------------`); + + // 1. Warm-up (discarded) + console.log(`>>> [Warm-up] ${vus} VUs for 30s (discarded)...`); + const warmupSummary = path.join(rawDir, `${experimentName}-${vus}vu-warmup.json`); + const warmupRaw = path.join(rawDir, `${experimentName}-${vus}vu-warmup.txt`); + const warmupOrdersBefore = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + const warmupPaymentsBefore = parseInt(queryDb('SELECT COUNT(*) FROM payments;') || '0', 10); + const warmupMetrics = await runK6(vus, '30s', warmupSummary, warmupRaw); + const warmupPaymentsAt30s = parseInt(queryDb('SELECT COUNT(*) FROM payments;') || '0', 10); + const warmupAcceptedPayments = warmupPaymentsAt30s - warmupPaymentsBefore; + await waitForConsumerCatchup(warmupAcceptedPayments, warmupOrdersBefore, 180000); + await sleep(2000); + + // 2. Three measured runs + const measuredRuns = []; + for (let r = 1; r <= 3; r++) { + console.log(`\n>>> [Measured Run ${r}/3] ${experimentName} @ ${vus} VUs for 30s...`); + const summaryFile = path.join(rawDir, `${experimentName}-${vus}vu-run${r}.json`); + const rawFile = path.join(rawDir, `${experimentName}-${vus}vu-run${r}.txt`); + + // Ensure zero leftover lag before starting run + const ordersBefore = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + const paymentsBefore = parseInt(queryDb('SELECT COUNT(*) FROM payments;') || '0', 10); + if (paymentsBefore !== ordersBefore) { + console.warn(` โš ๏ธ Warning: Prior run had leftover difference! Payments=${paymentsBefore}, Orders=${ordersBefore}. Draining completely...`); + await waitForConsumerCatchup(paymentsBefore - ordersBefore, ordersBefore, 180000); + } + + const runOrdersBefore = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + const runPaymentsBefore = parseInt(queryDb('SELECT COUNT(*) FROM payments;') || '0', 10); + if (runPaymentsBefore !== runOrdersBefore) { + throw new Error(`Cannot start Measured Run ${r}: leftover lag still exists (Payments=${runPaymentsBefore}, Orders=${runOrdersBefore})`); + } + + // Run 30s k6 load + const k6Metrics = await runK6(vus, '30s', summaryFile, rawFile); + + // Snapshot immediately at end of 30s window to measure consumer lag + const paymentsAt30s = parseInt(queryDb('SELECT COUNT(*) FROM payments;') || '0', 10); + const acceptedPayments = paymentsAt30s - runPaymentsBefore; + const ordersAt30s = parseInt(queryDb('SELECT COUNT(*) FROM orders;') || '0', 10); + const ordersDuring30s = ordersAt30s - runOrdersBefore; + const consumerLagAt30s = Math.max(0, acceptedPayments - ordersDuring30s); + + console.log(`\n [30s Window Snapshot] Accepted Payments: ${acceptedPayments} | Orders Created During 30s: ${ordersDuring30s} | End-of-Run Consumer Lag: ${consumerLagAt30s}`); + + // Wait until orders count == accepted payments (Kafka consumer lag = 0) + const catchup = await waitForConsumerCatchup(acceptedPayments, runOrdersBefore, 300000); + + const totalCompletedOrders = catchup.ordersProcessed; + const runDurationSec = k6Metrics.reqCount / (k6Metrics.rps || 1); + const totalTimeSec = runDurationSec + catchup.drainSec; + const completedThroughput = totalCompletedOrders / totalTimeSec; + + console.log(` [Run ${r} Result] Accepted: ${k6Metrics.rps.toFixed(2)} req/s | Completed: ${completedThroughput.toFixed(2)} checkouts/s (Lag reached 0 in ${catchup.drainSec}s, timedOut=${catchup.timedOut})`); + + measuredRuns.push({ + run: r, + acceptedRate: k6Metrics.rps, + completedRate: completedThroughput, + acceptedCount: acceptedPayments, + completedCount: totalCompletedOrders, + consumerLagAt30s: consumerLagAt30s, + timeToReachZero: catchup.drainSec, + timedOut: catchup.timedOut, + p50: k6Metrics.p50, + p95: k6Metrics.p95, + errorRate: k6Metrics.errorRate, + }); + + await sleep(2000); + } + + const acceptedStats = calcStats(measuredRuns.map((r) => r.acceptedRate)); + const completedStats = calcStats(measuredRuns.map((r) => r.completedRate)); + const lagStats = calcStats(measuredRuns.map((r) => r.consumerLagAt30s)); + const drainStats = calcStats(measuredRuns.map((r) => r.timeToReachZero)); + const p50Stats = calcStats(measuredRuns.map((r) => r.p50)); + const p95Stats = calcStats(measuredRuns.map((r) => r.p95)); + + experimentResults[vus] = { + runs: measuredRuns, + summary: { + acceptedRate: acceptedStats, + completedRate: completedStats, + consumerLagAt30s: lagStats, + timeToReachZero: drainStats, + p50: p50Stats, + p95: p95Stats, + }, + }; + } + + const outJson = path.join(rawDir, `summary-experiment-${experimentName}.json`); + fs.writeFileSync(outJson, JSON.stringify(experimentResults, null, 2), 'utf8'); + console.log(`\nโœ… Finished experiment ${experimentName}. Summary saved to ${outJson}`); + return experimentResults; +} + +async function main() { + const exps = targetExperiment === 'all' + ? ['baseline_consumer', 'fix_a', 'fix_b'] + : targetExperiment === 'fixes' + ? ['fix_a', 'fix_b'] + : [targetExperiment]; + + for (const exp of exps) { + await runExperiment(exp); + } +} + +main().catch((err) => { + console.error('\nโŒ Experiment runner error:', err); + process.exit(1); +}); diff --git a/benchmarks/run-keepalive-dns-experiment.mjs b/benchmarks/run-keepalive-dns-experiment.mjs new file mode 100644 index 0000000..424beea --- /dev/null +++ b/benchmarks/run-keepalive-dns-experiment.mjs @@ -0,0 +1,196 @@ +import { execSync, spawn } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { performance } from 'node:perf_hooks'; + +const k6Binary = 'C:\\Program Files\\k6\\k6.exe'; +const resultsFile = path.resolve('benchmarks/raw/experiment-keepalive-dns.json'); + +function sleep(ms) { + return new Promise((r) => setTimeout(r, ms)); +} + +function getTcpStats() { + try { + const gwRaw = execSync('docker exec streammart-gateway grep Tcp: /proc/net/snmp', { encoding: 'utf8' }); + const pmRaw = execSync('docker exec streammart-payment grep Tcp: /proc/net/snmp', { encoding: 'utf8' }); + + const parseSnmp = (raw) => { + const lines = raw.trim().split('\n'); + const headers = lines[0].split(/\s+/); + const values = lines[1].split(/\s+/); + const activeIdx = headers.indexOf('ActiveOpens'); + const passiveIdx = headers.indexOf('PassiveOpens'); + return { + activeOpens: parseInt(values[activeIdx], 10), + passiveOpens: parseInt(values[passiveIdx], 10), + }; + }; + + return { + gateway: parseSnmp(gwRaw), + payment: parseSnmp(pmRaw), + }; + } catch (err) { + console.error('Error fetching TCP stats:', err.message); + return null; + } +} + +function getPaymentIp() { + const ip = execSync( + 'docker inspect streammart-payment --format "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}"', + { encoding: 'utf8' } + ).trim(); + return ip; +} + +async function configureGateway({ keepAlive, targetUrl }) { + console.log(`\n========================================================================`); + console.log(`>>> Deploying Gateway: PROXY_KEEP_ALIVE=${keepAlive}, PAYMENT_SERVICE_URL=${targetUrl}`); + console.log(`========================================================================`); + + execSync('docker compose up -d --build api-gateway', { + stdio: 'inherit', + env: { + ...process.env, + PROXY_KEEP_ALIVE: String(keepAlive), + PAYMENT_SERVICE_URL: targetUrl, + }, + }); + + // Wait for health + for (let i = 0; i < 30; i++) { + await sleep(1000); + try { + const inspect = JSON.parse(execSync('docker inspect streammart-gateway', { encoding: 'utf8' })); + if (inspect[0]?.State?.Health?.Status === 'healthy') { + console.log('>>> API Gateway healthy!'); + await sleep(1000); + return; + } + } catch (_) {} + } + throw new Error('API Gateway failed to become healthy'); +} + +function runK6(vus, duration, summaryFile, rawFile) { + return new Promise((resolve, reject) => { + const args = [ + 'run', + '--vus', String(vus), + '--duration', duration, + '--summary-export', summaryFile, + 'benchmarks/gateway-load.js', + ]; + + const outStream = fs.createWriteStream(rawFile); + const child = spawn(k6Binary, args, { stdio: ['inherit', 'pipe', 'pipe'] }); + + child.stdout.pipe(outStream); + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stderr); + + child.on('close', (code) => { + outStream.end(); + if (code !== 0) return reject(new Error(`k6 exited with code ${code}`)); + + const summary = JSON.parse(fs.readFileSync(summaryFile, 'utf8')); + const count = summary.metrics.http_reqs?.count || 0; + const rate = summary.metrics.http_reqs?.rate || 0; + const p50 = summary.metrics.http_req_duration?.med || 0; + const p95 = summary.metrics.http_req_duration?.['p(95)'] || 0; + const failedRate = (summary.metrics.http_req_failed?.value || 0) * 100; + + resolve({ count, rate, p50, p95, errorRate: failedRate }); + }); + }); +} + +async function runScenario(scenarioName, config, vus = 20, duration = '30s') { + await configureGateway(config); + + const summaryFile = path.resolve(`benchmarks/raw/exp-${scenarioName}-summary.json`); + const rawFile = path.resolve(`benchmarks/raw/exp-${scenarioName}-raw.txt`); + + // Warmup run + console.log(`>>> [Warmup] 10s run...`); + await runK6(vus, '10s', path.resolve(`benchmarks/raw/exp-${scenarioName}-warmup.json`), path.resolve(`benchmarks/raw/exp-${scenarioName}-warmup.txt`)); + await sleep(2000); + + // Measure TCP stats BEFORE + const statsBefore = getTcpStats(); + const startTime = performance.now(); + + console.log(`\n>>> [Measured Run] ${scenarioName} @ ${vus} VUs for ${duration}...`); + const k6Res = await runK6(vus, duration, summaryFile, rawFile); + const elapsedSec = (performance.now() - startTime) / 1000; + + // Measure TCP stats AFTER + const statsAfter = getTcpStats(); + + const deltaActive = statsAfter.gateway.activeOpens - statsBefore.gateway.activeOpens; + const deltaPassive = statsAfter.payment.passiveOpens - statsBefore.payment.passiveOpens; + const newConnectionsSec = deltaActive / elapsedSec; + + const result = { + scenario: scenarioName, + config, + vus, + durationSec: Number(elapsedSec.toFixed(2)), + acceptedReqs: k6Res.count, + acceptedRate: Number(k6Res.rate.toFixed(2)), + p50: Number(k6Res.p50.toFixed(2)), + p95: Number(k6Res.p95.toFixed(2)), + gatewayActiveOpens: deltaActive, + paymentPassiveOpens: deltaPassive, + newConnectionsPerSec: Number(newConnectionsSec.toFixed(2)), + }; + + console.log('\n--- Scenario Results ---'); + console.log(`Scenario: ${scenarioName}`); + console.log(`Accepted Throughput: ${result.acceptedRate} req/s`); + console.log(`p50 Latency: ${result.p50} ms | p95: ${result.p95} ms`); + console.log(`Gateway New Outbound Connections: ${deltaActive} (${result.newConnectionsPerSec} conn/s)`); + console.log(`Payment New Inbound Connections: ${deltaPassive}`); + + return result; +} + +async function main() { + const paymentIp = getPaymentIp(); + console.log(`Detected Payment Service Container IP: ${paymentIp}`); + + const scenarios = [ + { + name: 'keepalive_off_hostname', + config: { keepAlive: false, targetUrl: 'http://payment-service:8000' }, + }, + { + name: 'keepalive_off_container_ip', + config: { keepAlive: false, targetUrl: `http://${paymentIp}:8000` }, + }, + { + name: 'keepalive_on_hostname', + config: { keepAlive: true, targetUrl: 'http://payment-service:8000' }, + }, + ]; + + const allResults = []; + for (const s of scenarios) { + const res = await runScenario(s.name, s.config, 20, '30s'); + allResults.push(res); + await sleep(2000); + } + + fs.writeFileSync(resultsFile, JSON.stringify(allResults, null, 2), 'utf8'); + console.log(`\n========================================================================`); + console.log(`โœ… All experiment scenarios finished. Results saved to ${resultsFile}`); + console.log(`========================================================================`); + console.table(allResults); +} + +main().catch((err) => { + console.error('Experiment failed:', err); + process.exit(1); +}); diff --git a/benchmarks/run-matrix.ps1 b/benchmarks/run-matrix.ps1 new file mode 100644 index 0000000..c21fa1d --- /dev/null +++ b/benchmarks/run-matrix.ps1 @@ -0,0 +1,138 @@ +# Automated benchmark runner for StreamMart Phase 1 matrix +# Configurations: +# 1: baseline (pool=10, keep-alive=false) +# 2: pool_only (pool=30, keep-alive=false) +# 3: keepalive_only (pool=10, keep-alive=true) +# 4: pool_keepalive (pool=30, keep-alive=true) + +param( + [string]$TargetConfig = "all" # "baseline", "pool_only", "keepalive_only", "pool_keepalive", or "all" +) + +$k6Path = "C:\Program Files\k6\k6.exe" +$rawDir = "benchmarks/raw" +if (-not (Test-Path $rawDir)) { New-Item -ItemType Directory -Force -Path $rawDir } + +function Set-Configuration($poolMax, $keepAlive) { + Write-Host "`n>>> [CONFIG] Applying: DB_POOL_MAX=$poolMax, PROXY_KEEP_ALIVE=$keepAlive..." -ForegroundColor Cyan + $env:DB_POOL_MAX = "$poolMax" + $env:PROXY_KEEP_ALIVE = "$keepAlive" + + # Recreate containers with target environment + docker compose up -d --build api-gateway payment-service + + # Wait until both containers are healthy + Write-Host ">>> Waiting for api-gateway and payment-service healthchecks..." + for ($i = 0; $i -lt 30; $i++) { + $gwHealth = docker inspect streammart-gateway --format '{{.State.Health.Status}}' 2>$null + $pmHealth = docker inspect streammart-payment --format '{{.State.Health.Status}}' 2>$null + if ($gwHealth -eq "healthy" -and $pmHealth -eq "healthy") { + Write-Host ">>> Containers healthy!" -ForegroundColor Green + break + } + Start-Sleep -Seconds 2 + } +} + +function Drain-Outbox() { + # Check backlog count + $count = (docker exec streammart-postgres psql -U postgres -d streammart -t -c "SELECT count(*) FROM outbox_events WHERE published = false AND topic = 'payment-successful';" 2>$null).Trim() + $backlog = [int]($count -replace '\D','') + + if ($backlog -eq 0) { + return @{ Backlog = 0; DrainSeconds = 0.0 } + } + + Write-Host ">>> Outbox backlog: $backlog events. Waiting for relay to drain..." -ForegroundColor Yellow + $sw = [System.Diagnostics.Stopwatch]::StartNew() + $remaining = $backlog + while ($remaining -gt 0) { + Start-Sleep -Milliseconds 250 + $c = (docker exec streammart-postgres psql -U postgres -d streammart -t -c "SELECT count(*) FROM outbox_events WHERE published = false AND topic = 'payment-successful';" 2>$null).Trim() + $remaining = [int]($c -replace '\D','') + if ($sw.Elapsed.TotalSeconds -gt 60) { + Write-Host ">>> Warning: Drain timed out after 60s" -ForegroundColor Red + break + } + } + $sw.Stop() + $drainSec = [math]::Round($sw.Elapsed.TotalSeconds, 2) + Write-Host ">>> Drained $backlog events in $drainSec seconds." -ForegroundColor Green + return @{ Backlog = $backlog; DrainSeconds = $drainSec } +} + +function Run-K6($vus, $duration, $outputFile) { + & $k6Path run --vus $vus --duration $duration benchmarks/gateway-load.js | Tee-Object -FilePath $outputFile + $content = Get-Content $outputFile -Raw + + # Extract metrics via regex + $rps = 0.0 + if ($content -match 'http_reqs\.*:\s+([0-9.]+)\s+([0-9.]+)/s') { + $rps = [double]$matches[2] + } + + $p50 = 0.0 + $p95 = 0.0 + if ($content -match 'http_req_duration\.*:\s+avg=[0-9.]+(?:ms|s)\s+min=[0-9.]+(?:ms|s)\s+med=([0-9.]+)(ms|s)\s+max=[0-9.]+(?:ms|s)\s+p\(90\)=[0-9.]+(?:ms|s)\s+p\(95\)=([0-9.]+)(ms|s)') { + $p50 = [double]$matches[1] * (if ($matches[2] -eq 's') { 1000 } else { 1 }) + $p95 = [double]$matches[3] * (if ($matches[4] -eq 's') { 1000 } else { 1 }) + } + + $errorRate = 0.0 + if ($content -match 'http_req_failed\.*:\s+([0-9.]+)%') { + $errorRate = [double]$matches[1] + } + + return @{ + Rps = $rps + p50 = $p50 + p95 = $p95 + ErrorRate = $errorRate + } +} + +function Benchmark-Config($configName, $poolMax, $keepAlive) { + Set-Configuration $poolMax $keepAlive + + $results = @{} + + foreach ($vus in @(20, 50, 100)) { + Write-Host "`n=======================================================" -ForegroundColor Magenta + Write-Host " Benchmark: $configName | VUs: $vus" -ForegroundColor Magenta + Write-Host "=======================================================" -ForegroundColor Magenta + + # 1. Warm-up run (discarded) + Write-Host "--- Discarded Warm-up Run (15s) ---" -ForegroundColor Gray + $warmupFile = "$rawDir/${configName}-${vus}vu-warmup.txt" + $null = Run-K6 $vus "15s" $warmupFile + $null = Drain-Outbox + Start-Sleep -Seconds 2 + + # 2. Three measured runs + $runs = @() + for ($r = 1; $r -le 3; $r++) { + Write-Host "`n--- Measured Run $r / 3 ($vus VUs, 30s) ---" -ForegroundColor Cyan + $outFile = "$rawDir/${configName}-${vus}vu-run${r}.txt" + $k6Res = Run-K6 $vus "30s" $outFile + $drainRes = Drain-Outbox + + $runData = [PSCustomObject]@{ + Run = $r + Rps = $k6Res.Rps + p50 = $k6Res.p50 + p95 = $k6Res.p95 + ErrorRate = $k6Res.ErrorRate + Backlog = $drainRes.Backlog + DrainSec = $drainRes.DrainSeconds + } + $runs += $runData + Start-Sleep -Seconds 2 + } + $results[$vus] = $runs + } + + return $results +} + +# Export functions for modular invocation +Write-Host "Loaded run-matrix.ps1 helper." diff --git a/client/src/app/page.jsx b/client/src/app/page.jsx index c535ff5..6d36c4b 100644 --- a/client/src/app/page.jsx +++ b/client/src/app/page.jsx @@ -7,14 +7,22 @@ export default function CheckoutPage() { const handleCheckout = async () => { setStatus("processing"); + const gatewayUrl = process.env.NEXT_PUBLIC_GATEWAY_URL || "http://localhost:8085"; try { - const response = await fetch("http://localhost:8080/api/payment", { + // 1. Fetch a valid signed JWT from the API Gateway + const tokenRes = await fetch(`${gatewayUrl}/api/auth/token`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ userId: "user_web_123" }), + }); + const { token } = await tokenRes.json(); + + // 2. Dispatch checkout through API Gateway enforcing JWT authentication + const response = await fetch(`${gatewayUrl}/api/payment`, { method: "POST", headers: { "Content-Type": "application/json", - // The API Gateway requires a standard Bearer token (JWT) - // In a real app we fetch this from NextAuth Auth - "Authorization": "Bearer mock.jwt.token", + "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ cart: [{ id: 1, name: "Kafka Hoodie", price: 50 }], diff --git a/client/src/components/Pay.jsx b/client/src/components/Pay.jsx index 35c10bf..88f5823 100644 --- a/client/src/components/Pay.jsx +++ b/client/src/components/Pay.jsx @@ -11,9 +11,17 @@ const Pay = ({ cart }) => { const { isPending, isError, mutate, data } = useMutation({ mutationFn: async (cart) => { const startTime = Date.now(); - const response = await axios.post("http://localhost:8000/payment-service", { - cart, - }); + const gatewayUrl = process.env.NEXT_PUBLIC_GATEWAY_URL || "http://localhost:8085"; + // Fetch a valid signed JWT from the API Gateway + const tokenRes = await axios.post(`${gatewayUrl}/api/auth/token`, { userId: "user_client_ui" }); + const token = tokenRes.data.token; + + // Route strictly through API Gateway + const response = await axios.post( + `${gatewayUrl}/api/payment`, + { cart }, + { headers: { Authorization: `Bearer ${token}` } } + ); const endTime = Date.now(); const duration = (endTime - startTime) / 1000; return { ...response, duration }; diff --git a/docker-compose.yml b/docker-compose.yml index 9088c7c..294c87e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,54 +1,224 @@ -version: '3.8' - services: - payment-service: + # ------------------------------------------------------------- + # Persistence: PostgreSQL 16 (Local Database) + # Internal only: NO published host ports + # ------------------------------------------------------------- + postgres: + image: postgres:16-alpine + container_name: streammart-postgres + restart: unless-stopped + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: streammart + volumes: + - postgres_data:/var/lib/postgresql/data + - ./init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres -d streammart"] + interval: 3s + timeout: 3s + retries: 5 + start_period: 5s + + # ------------------------------------------------------------- + # Message Broker: Apache Kafka (Official apache/kafka in KRaft Mode) + # Internal only: NO published host ports + # ------------------------------------------------------------- + kafka: + image: apache/kafka:3.7.0 + container_name: streammart-kafka + restart: unless-stopped + environment: + - KAFKA_NODE_ID=1 + - KAFKA_PROCESS_ROLES=broker,controller + - KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 + - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 + - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER + - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT + - KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka:9093 + - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 + - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 + - KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1 + - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 + - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true + - CLUSTER_ID=MkU3OEVBNTcwNTJENDM2Qk + healthcheck: + test: ["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092 > /dev/null 2>&1 || exit 1"] + interval: 5s + timeout: 5s + retries: 10 + start_period: 10s + + # ------------------------------------------------------------- + # Kafka Topic Initializer: Pre-creates all application & DLQ topics + # ------------------------------------------------------------- + kafka-init: + image: apache/kafka:3.7.0 + container_name: streammart-kafka-init + depends_on: + kafka: + condition: service_healthy + entrypoint: ["/bin/sh", "-c"] + command: > + "/opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:9092 --create --if-not-exists --topic payment-successful --partitions 1 --replication-factor 1 && + /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:9092 --create --if-not-exists --topic order-successful --partitions 1 --replication-factor 1 && + /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:9092 --create --if-not-exists --topic email-successful --partitions 1 --replication-factor 1 && + /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:9092 --create --if-not-exists --topic payment-successful.DLQ --partitions 1 --replication-factor 1 && + echo 'Kafka topics initialized.'" + + # ------------------------------------------------------------- + # API Gateway: Reverse Proxy & JWT Auth Enforcement + # THE ONLY SERVICE PUBLISHING A HOST PORT + # ------------------------------------------------------------- + api-gateway: build: - context: ./payment-service - restart: always + context: ./api-gateway + container_name: streammart-gateway + restart: unless-stopped ports: - - "8000:8000" + - "${PORT:-8085}:8080" environment: - - DATABASE_URL=${DATABASE_URL} - - KAFKA_BROKERS=kafka:9092 + - PORT=8080 + - JWT_SECRET=${JWT_SECRET} + - PAYMENT_SERVICE_URL=${PAYMENT_SERVICE_URL:-http://payment-service:8000} + - PROXY_KEEP_ALIVE=${PROXY_KEEP_ALIVE:-true} + - DEMO_AUTH=true - NODE_ENV=development + depends_on: + payment-service: + condition: service_healthy + healthcheck: + test: ["CMD", "node", "-e", "require('http').get('http://localhost:8080/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"] + interval: 3s + timeout: 3s + retries: 5 + start_period: 3s + # ------------------------------------------------------------- + # Payment Service: Transactional Outbox Pattern + # Internal only: NO published host ports + # ------------------------------------------------------------- + payment-service: + build: + context: ./payment-service + container_name: streammart-payment + restart: unless-stopped + environment: + - PORT=8000 + - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/streammart + - DB_POOL_MAX=${DB_POOL_MAX:-30} + - RELAY_BATCH_SEND=${RELAY_BATCH_SEND:-true} + - RELAY_BUSY_PAUSE_MS=${RELAY_BUSY_PAUSE_MS:-25} + - OUTBOX_RETENTION_HOURS=${OUTBOX_RETENTION_HOURS:-1} + - KAFKA_BROKERS=kafka:9092 + - NODE_ENV=production + depends_on: + postgres: + condition: service_healthy + kafka: + condition: service_healthy + kafka-init: + condition: service_completed_successfully + healthcheck: + test: ["CMD", "node", "-e", "require('http').get('http://localhost:8000/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"] + interval: 3s + timeout: 3s + retries: 5 + start_period: 3s + # ------------------------------------------------------------- + # Order Service: Idempotent Event Consumer & Order Generator + # Internal only: NO published host ports + # ------------------------------------------------------------- order-service: build: context: ./order-service - restart: always + container_name: streammart-order + restart: unless-stopped environment: - - DATABASE_URL=${DATABASE_URL} - - KAFKA_BROKERS=${KAFKA_BROKERS:-kafka:9092} - - KAFKA_SASL_USERNAME=${KAFKA_SASL_USERNAME} - - KAFKA_SASL_PASSWORD=${KAFKA_SASL_PASSWORD} - - NODE_EXTRA_CA_CERTS=/app/ca.pem - volumes: - - ./ca.pem:/app/ca.pem - + - PORT=8001 + - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/streammart + - DB_POOL_MAX=${DB_POOL_MAX:-30} + - CONSUMER_MODE=${CONSUMER_MODE:-eachBatch} + - PARTITIONS_CONSUMED_CONCURRENTLY=${PARTITIONS_CONSUMED_CONCURRENTLY:-1} + - OUTBOX_RETENTION_HOURS=${OUTBOX_RETENTION_HOURS:-1} + - KAFKA_BROKERS=kafka:9092 + - NODE_ENV=production + depends_on: + postgres: + condition: service_healthy + kafka: + condition: service_healthy + kafka-init: + condition: service_completed_successfully + healthcheck: + test: ["CMD", "node", "-e", "require('http').get('http://localhost:8001/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"] + interval: 3s + timeout: 3s + retries: 5 + start_period: 3s + # ------------------------------------------------------------- + # Email Service: Asynchronous Notification Dispatcher + # Internal only: NO published host ports + # ------------------------------------------------------------- email-service: build: context: ./email-service - restart: always + container_name: streammart-email + restart: unless-stopped environment: - - KAFKA_BROKERS=${KAFKA_BROKERS:-kafka:9092} - - KAFKA_SASL_USERNAME=${KAFKA_SASL_USERNAME} - - KAFKA_SASL_PASSWORD=${KAFKA_SASL_PASSWORD} - + - PORT=8002 + - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/streammart + - DB_POOL_MAX=${DB_POOL_MAX:-30} + - EMAIL_CONSUMER_MODE=${EMAIL_CONSUMER_MODE:-eachBatch} + - OUTBOX_RETENTION_HOURS=${OUTBOX_RETENTION_HOURS:-1} + - KAFKA_BROKERS=kafka:9092 + - NODE_ENV=production + depends_on: + postgres: + condition: service_healthy + kafka: + condition: service_healthy + kafka-init: + condition: service_completed_successfully + healthcheck: + test: ["CMD", "node", "-e", "require('http').get('http://localhost:8002/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"] + interval: 3s + timeout: 3s + retries: 5 + start_period: 3s + # ------------------------------------------------------------- + # Analytic Service: Metrics Aggregator + # Internal only: NO published host ports + # ------------------------------------------------------------- analytic-service: build: context: ./analytic-service - restart: always + container_name: streammart-analytic + restart: unless-stopped environment: - - KAFKA_BROKERS=${KAFKA_BROKERS:-kafka:9092} - - KAFKA_SASL_USERNAME=${KAFKA_SASL_USERNAME} - - KAFKA_SASL_PASSWORD=${KAFKA_SASL_PASSWORD} - + - PORT=8003 + - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/streammart + - DB_POOL_MAX=${DB_POOL_MAX:-30} + - ANALYTIC_CONSUMER_MODE=${ANALYTIC_CONSUMER_MODE:-eachBatch} + - KAFKA_BROKERS=kafka:9092 + - NODE_ENV=production + depends_on: + postgres: + condition: service_healthy + kafka: + condition: service_healthy + kafka-init: + condition: service_completed_successfully + healthcheck: + test: ["CMD", "node", "-e", "require('http').get('http://localhost:8003/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"] + interval: 3s + timeout: 3s + retries: 5 + start_period: 3s - client: - build: - context: ./client - ports: - - "3000:3000" +volumes: + postgres_data: diff --git a/email-service/consumer-processor.js b/email-service/consumer-processor.js new file mode 100644 index 0000000..824be0e --- /dev/null +++ b/email-service/consumer-processor.js @@ -0,0 +1,288 @@ +import crypto from "node:crypto"; +import { and, eq, inArray } from "drizzle-orm"; + +export function isDuplicateConstraintError(err) { + const code = err?.code || err?.cause?.code; + const msg = err?.message || ""; + const causeMsg = err?.cause?.message || ""; + return ( + code === "23505" || + msg.includes("duplicate key") || + msg.includes("processed_events_pkey") || + msg.includes("unique constraint") || + causeMsg.includes("duplicate key") || + causeMsg.includes("processed_events_pkey") || + causeMsg.includes("unique constraint") + ); +} + +export async function processSingleEmailMessage({ + message, + db, + tables, + maxRetries = 3, + retryBaseDelayMs = 100, + dispatchEmail = ({ userId, orderId }) => { + const dummyEmailId = `email_${Date.now()}_${crypto.randomUUID().slice(0, 8)}`; + return dummyEmailId; + }, +}) { + const { processedEvents, outboxEvents } = tables; + const raw = message.value ? message.value.toString() : ""; + let data; + try { + data = JSON.parse(raw); + } catch (parseErr) { + console.error(`Email Service [JSON Error] offset=${message.offset}:`, parseErr.message); + return { status: "skipped_invalid_json" }; + } + + const { userId, orderId, correlationId } = data; + const eventId = data.eventId == null ? null : String(data.eventId); + + // 1. Idempotency check + if (db && eventId) { + try { + const existing = await db + .select({ eventId: processedEvents.eventId }) + .from(processedEvents) + .where( + and( + eq(processedEvents.eventId, eventId), + eq(processedEvents.serviceName, "email-service") + ) + ) + .limit(1); + + if (existing && existing.length > 0) { + return { status: "skipped_duplicate" }; + } + } catch (e) { + console.error("Email Service: Error querying processed_events:", e.message); + } + } + + // 2. External side-effect BEFORE DB commit (at-least-once email trade-off) + const dummyEmailId = dispatchEmail({ userId, orderId, eventId }); + + // 3. Atomically record processed_events + email-successful outbox row + if (db) { + const newEmailEventId = crypto.randomUUID(); + const rootCorrelationId = String(correlationId || eventId || newEmailEventId); + const directCausationId = String(eventId || rootCorrelationId); + + let attempt = 0; + while (attempt < maxRetries) { + attempt++; + try { + await db.transaction(async (tx) => { + if (eventId) { + await tx.insert(processedEvents).values({ + eventId, + serviceName: "email-service", + }); + } + + await tx.insert(outboxEvents).values({ + id: newEmailEventId, + topic: "email-successful", + payload: { + eventId: newEmailEventId, + correlationId: rootCorrelationId, + causationId: directCausationId, + orderId, + userId, + emailId: dummyEmailId, + }, + published: false, + }); + }); + return { status: "processed", emailId: dummyEmailId }; + } catch (dbErr) { + if (isDuplicateConstraintError(dbErr)) { + console.warn(`Email Service [Idempotency]: Concurrent duplicate for event ${eventId}; skipping cleanly.`); + return { status: "skipped_concurrent_duplicate" }; + } + console.error(`Email Service: DB write failed on attempt ${attempt}/${maxRetries}:`, dbErr.message); + if (attempt < maxRetries) { + await new Promise((r) => setTimeout(r, retryBaseDelayMs * Math.pow(2, attempt - 1))); + } else { + return { status: "failed", error: dbErr.message }; + } + } + } + } + + return { status: "processed", emailId: dummyEmailId }; +} + +export async function processEmailBatch({ + batch, + resolveOffset, + heartbeat, + commitOffsetsIfNecessary, + isRunning, + isStale, + db, + tables, + maxRetries = 3, + retryBaseDelayMs = 100, + dispatchEmail = ({ userId, orderId }) => `email_${Date.now()}_${crypto.randomUUID().slice(0, 8)}`, +}) { + if (!isRunning() || isStale()) { + return { mode: "skipped_not_running", processedCount: 0, skippedDuplicates: 0 }; + } + + const { processedEvents, outboxEvents } = tables; + const parsedItems = []; + + for (const message of batch.messages) { + const raw = message.value ? message.value.toString() : ""; + try { + const data = JSON.parse(raw); + parsedItems.push({ + message, + data, + eventId: data.eventId == null ? "" : String(data.eventId), + userId: data.userId, + orderId: data.orderId, + correlationId: data.correlationId, + }); + } catch (parseErr) { + console.error(`Email Service [JSON Error] offset=${message.offset}:`, parseErr.message); + } + } + + // 1. Bulk idempotency check + const eventIds = parsedItems.map((p) => p.eventId).filter(Boolean); + let existingSet = new Set(); + if (db && eventIds.length > 0) { + try { + const existing = await db + .select({ eventId: processedEvents.eventId }) + .from(processedEvents) + .where( + and( + inArray(processedEvents.eventId, eventIds), + eq(processedEvents.serviceName, "email-service") + ) + ); + existingSet = new Set(existing.map((e) => e.eventId)); + } catch (e) { + console.error("Email Service: Bulk idempotency check failed:", e.message); + } + } + + const seenInBatch = new Set(); + const newItems = []; + let skippedDuplicates = 0; + + for (const item of parsedItems) { + if (item.eventId && (existingSet.has(item.eventId) || seenInBatch.has(item.eventId))) { + skippedDuplicates++; + continue; + } + if (item.eventId) seenInBatch.add(item.eventId); + newItems.push(item); + } + + // 2. Dispatch external emails BEFORE recording processed_events (preserving e-commerce trade-off) + const dispatched = newItems.map((item) => ({ + ...item, + emailId: dispatchEmail({ userId: item.userId, orderId: item.orderId, eventId: item.eventId }), + })); + + // 3. Single atomic SQL transaction for the entire batch + let batchFailed = false; + let batchErr = null; + + if (dispatched.length > 0 && db) { + try { + await db.transaction(async (tx) => { + const processedValues = dispatched + .filter((item) => item.eventId) + .map((item) => ({ + eventId: item.eventId, + serviceName: "email-service", + })); + + if (processedValues.length > 0) { + await tx.insert(processedEvents).values(processedValues); + } + + await tx.insert(outboxEvents).values( + dispatched.map((item) => { + const newEmailEventId = crypto.randomUUID(); + const rootCorrelationId = String(item.correlationId || item.eventId || newEmailEventId); + const directCausationId = String(item.eventId || rootCorrelationId); + return { + id: newEmailEventId, + topic: "email-successful", + payload: { + eventId: newEmailEventId, + correlationId: rootCorrelationId, + causationId: directCausationId, + orderId: item.orderId, + userId: item.userId, + emailId: item.emailId, + }, + published: false, + }; + }) + ); + }); + } catch (err) { + batchFailed = true; + batchErr = err; + } + } + + // 4. Fallback: if batch tx failed, process one message at a time in strict offset order + if (batchFailed) { + console.warn( + `Email Service [eachBatch Fallback]: Batch transaction failed (${batchErr?.message}). Falling back to per-message processing for ${batch.messages.length} message(s)...` + ); + let fallbackProcessed = 0; + let fallbackSkipped = 0; + + for (const message of batch.messages) { + if (!isRunning() || isStale()) break; + const res = await processSingleEmailMessage({ + message, + db, + tables, + maxRetries, + retryBaseDelayMs, + dispatchEmail, + }); + if (res.status === "processed") fallbackProcessed++; + else fallbackSkipped++; + resolveOffset(message.offset); + await heartbeat(); + } + + if (commitOffsetsIfNecessary) { + await commitOffsetsIfNecessary(); + } + + return { + mode: "fallback_single", + processedCount: fallbackProcessed, + skippedDuplicates: fallbackSkipped, + }; + } + + for (const message of batch.messages) { + resolveOffset(message.offset); + } + if (commitOffsetsIfNecessary) { + await commitOffsetsIfNecessary(); + } + await heartbeat(); + + return { + mode: "batch", + processedCount: dispatched.length, + skippedDuplicates, + }; +} diff --git a/email-service/db/index.js b/email-service/db/index.js new file mode 100644 index 0000000..1d88781 --- /dev/null +++ b/email-service/db/index.js @@ -0,0 +1,8 @@ +import { drizzle } from 'drizzle-orm/postgres-js'; +import postgres from 'postgres'; +import * as schema from './schema.js'; + +const connectionString = process.env.DATABASE_URL; +const poolMax = parseInt(process.env.DB_POOL_MAX || '10', 10); +const client = connectionString ? postgres(connectionString, { max: poolMax, prepare: false }) : null; +export const db = client ? drizzle(client, { schema }) : null; diff --git a/email-service/db/schema.js b/email-service/db/schema.js new file mode 100644 index 0000000..de5e42a --- /dev/null +++ b/email-service/db/schema.js @@ -0,0 +1,17 @@ +import { pgTable, uuid, text, timestamp, jsonb, boolean, primaryKey } from 'drizzle-orm/pg-core'; + +export const outboxEvents = pgTable('outbox_events', { + id: uuid('id').defaultRandom().primaryKey(), + topic: text('topic').notNull(), + payload: jsonb('payload').notNull(), + published: boolean('published').default(false), + createdAt: timestamp('created_at').defaultNow().notNull(), +}); + +export const processedEvents = pgTable('processed_events', { + eventId: text('event_id').notNull(), + serviceName: text('service_name').notNull(), + processedAt: timestamp('processed_at').defaultNow().notNull(), +}, (table) => [ + primaryKey({ columns: [table.eventId, table.serviceName] }) +]); diff --git a/email-service/index.js b/email-service/index.js index 6e5e8a3..7c1d1dd 100644 --- a/email-service/index.js +++ b/email-service/index.js @@ -1,4 +1,40 @@ +import http from "node:http"; import { Kafka } from "kafkajs"; +import { db } from "./db/index.js"; +import { outboxEvents, processedEvents } from "./db/schema.js"; +import { startEmailOutboxWorker, stopEmailOutboxWorker } from "./worker.js"; +import { processEmailBatch, processSingleEmailMessage } from "./consumer-processor.js"; + +let isReady = false; +let isShuttingDown = false; +let inflightMessages = 0; + +// Health check server for container orchestration +const healthServer = http.createServer((req, res) => { + if (req.url === "/health") { + if (isReady && !isShuttingDown) { + res.writeHead(200, { "Content-Type": "text/plain" }); + res.end("Email Service OK"); + } else { + res.writeHead(503, { "Content-Type": "text/plain" }); + res.end(isShuttingDown ? "Email Service Shutting Down" : "Email Service Starting..."); + } + } else { + res.writeHead(404); + res.end(); + } +}); + +const HEALTH_PORT = process.env.PORT || 8002; +healthServer.listen(HEALTH_PORT, () => { + const effectivePoolMax = parseInt(process.env.DB_POOL_MAX || "10", 10); + const effectiveConsumerMode = process.env.EMAIL_CONSUMER_MODE || process.env.CONSUMER_MODE || "eachBatch"; + const effectiveRetentionHours = parseInt(process.env.OUTBOX_RETENTION_HOURS || "1", 10); + console.log(`๐Ÿš€ Email service health server listening on port ${HEALTH_PORT}`); + console.log( + `[EFFECTIVE CONFIG] email-service: PORT=${HEALTH_PORT}, DB_POOL_MAX=${effectivePoolMax}, CONSUMER_MODE=${effectiveConsumerMode}, OUTBOX_RETENTION_HOURS=${effectiveRetentionHours}, KAFKA_BROKERS=${process.env.KAFKA_BROKERS || "localhost:9092"}` + ); +}); const kafka = new Kafka({ clientId: "email-service", @@ -6,7 +42,7 @@ const kafka = new Kafka({ ...(process.env.KAFKA_SASL_USERNAME && { ssl: true, sasl: { - mechanism: 'plain', + mechanism: "plain", username: process.env.KAFKA_SASL_USERNAME, password: process.env.KAFKA_SASL_PASSWORD, }, @@ -17,34 +53,103 @@ const producer = kafka.producer(); const consumer = kafka.consumer({ groupId: "email-service" }); const run = async () => { - try { - await producer.connect(); - await consumer.connect(); - await consumer.subscribe({ - topic: "order-successful", - fromBeginning: true, - }); + let connected = false; + while (!connected && !isShuttingDown) { + try { + await producer.connect(); + await consumer.connect(); + await consumer.subscribe({ + topic: "order-successful", + fromBeginning: true, + }); + await startEmailOutboxWorker(); + connected = true; + isReady = true; + console.log("Email Service: Connected to Kafka and subscribed to order-successful"); + } catch (err) { + console.warn("Email Service: Retrying Kafka connection/subscription in 2s...", err.message); + await new Promise((r) => setTimeout(r, 2000)); + } + } + + if (isShuttingDown) return; + const consumerMode = process.env.EMAIL_CONSUMER_MODE || process.env.CONSUMER_MODE || "eachBatch"; + const tables = { processedEvents, outboxEvents }; + console.log(`Email Service: Running consumer with mode=${consumerMode}`); + + if (consumerMode === "eachBatch") { await consumer.run({ - eachMessage: async ({ topic, partition, message }) => { - const value = message.value.toString(); - const { userId, orderId } = JSON.parse(value); - - // TODO: Send email to the user - const dummyEmailId = "091584203985"; - console.log(`Email consumer: Email sent to user id ${userId}`); - - await producer.send({ - topic: "email-successful", - messages: [ - { value: JSON.stringify({ userId, emailId: dummyEmailId }) }, - ], - }); + eachBatch: async ({ batch, resolveOffset, heartbeat, commitOffsetsIfNecessary, isRunning, isStale }) => { + if (!isRunning() || isStale()) return; + inflightMessages += batch.messages.length; + try { + await processEmailBatch({ + batch, + resolveOffset, + heartbeat, + commitOffsetsIfNecessary, + isRunning, + isStale, + db, + tables, + }); + } finally { + inflightMessages = Math.max(0, inflightMessages - batch.messages.length); + } }, }); + } else { + await consumer.run({ + eachMessage: async ({ message }) => { + inflightMessages++; + try { + await processSingleEmailMessage({ + message, + db, + tables, + }); + } finally { + inflightMessages = Math.max(0, inflightMessages - 1); + } + }, + }); + } +}; + +run().catch((err) => { + console.error("Email Service Kafka error:", err); +}); + +// Graceful shutdown +const shutdown = async () => { + if (isShuttingDown) return; + isShuttingDown = true; + isReady = false; + console.log("Email Service: SIGTERM received. Initiating graceful shutdown..."); + + healthServer.close(); + + const maxWait = 5000; + const start = Date.now(); + while (inflightMessages > 0 && Date.now() - start < maxWait) { + await new Promise((r) => setTimeout(r, 200)); + } + + try { + await stopEmailOutboxWorker(); + console.log("Email Service: Outbox worker stopped."); + await consumer.disconnect(); + console.log("Email Service: Consumer disconnected."); + await producer.disconnect(); + console.log("Email Service: Producer disconnected."); } catch (err) { - console.log(err); + console.error("Email Service error during disconnect:", err.message); } + + console.log("Email Service: Graceful shutdown complete. Exiting cleanly."); + process.exit(0); }; -run(); +process.on("SIGTERM", shutdown); +process.on("SIGINT", shutdown); diff --git a/email-service/package-lock.json b/email-service/package-lock.json new file mode 100644 index 0000000..0accba0 --- /dev/null +++ b/email-service/package-lock.json @@ -0,0 +1,169 @@ +{ + "name": "email-service", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "email-service", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "drizzle-orm": "^0.45.4", + "kafkajs": "^2.2.4", + "postgres": "^4.1.1" + } + }, + "node_modules/drizzle-orm": { + "version": "0.45.4", + "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.45.4.tgz", + "integrity": "sha512-NiM1YZpJ2UxyeE67DpDDZ+Tsw4YLX3trSlkNT7Tm9eKoUNb1LvaAaQzXgYQsWs+AQ9TUmmwMmBOCXuqqxUWKKQ==", + "license": "Apache-2.0", + "peerDependencies": { + "@aws-sdk/client-rds-data": ">=3", + "@cloudflare/workers-types": ">=4", + "@electric-sql/pglite": ">=0.2.0", + "@libsql/client": ">=0.10.0", + "@libsql/client-wasm": ">=0.10.0", + "@neondatabase/serverless": ">=0.10.0", + "@netlify/db": ">=0.4.0", + "@op-engineering/op-sqlite": ">=2", + "@opentelemetry/api": "^1.4.1", + "@planetscale/database": ">=1.13", + "@prisma/client": "*", + "@tidbcloud/serverless": "*", + "@types/better-sqlite3": "*", + "@types/pg": "*", + "@types/sql.js": "*", + "@upstash/redis": ">=1.34.7", + "@vercel/postgres": ">=0.8.0", + "@xata.io/client": "*", + "better-sqlite3": ">=7", + "bun-types": "*", + "expo-sqlite": ">=14.0.0", + "gel": ">=2", + "knex": "*", + "kysely": "*", + "mysql2": ">=2", + "pg": ">=8", + "postgres": ">=3", + "sql.js": ">=1", + "sqlite3": ">=5" + }, + "peerDependenciesMeta": { + "@aws-sdk/client-rds-data": { + "optional": true + }, + "@cloudflare/workers-types": { + "optional": true + }, + "@electric-sql/pglite": { + "optional": true + }, + "@libsql/client": { + "optional": true + }, + "@libsql/client-wasm": { + "optional": true + }, + "@neondatabase/serverless": { + "optional": true + }, + "@netlify/db": { + "optional": true + }, + "@op-engineering/op-sqlite": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@prisma/client": { + "optional": true + }, + "@tidbcloud/serverless": { + "optional": true + }, + "@types/better-sqlite3": { + "optional": true + }, + "@types/pg": { + "optional": true + }, + "@types/sql.js": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/postgres": { + "optional": true + }, + "@xata.io/client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "bun-types": { + "optional": true + }, + "expo-sqlite": { + "optional": true + }, + "gel": { + "optional": true + }, + "knex": { + "optional": true + }, + "kysely": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "pg": { + "optional": true + }, + "postgres": { + "optional": true + }, + "prisma": { + "optional": true + }, + "sql.js": { + "optional": true + }, + "sqlite3": { + "optional": true + } + } + }, + "node_modules/kafkajs": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/kafkajs/-/kafkajs-2.2.4.tgz", + "integrity": "sha512-j/YeapB1vfPT2iOIUn/vxdyKEuhuY2PxMBvf5JWux6iSaukAccrMtXEY/Lb7OvavDhOWME589bpLrEdnVHjfjA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/postgres": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/postgres/-/postgres-4.1.1.tgz", + "integrity": "sha512-1kJDojqNZC+iTHHXh6eif0J98LUtyLAePe/qkW1GK35eh2JixlsAiIKq3FGI+xqI+SUGTNodzf7TScVeIIyUug==", + "license": "Unlicense", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/porsager" + } + } + } +} diff --git a/email-service/package.json b/email-service/package.json index e077380..0f227e8 100644 --- a/email-service/package.json +++ b/email-service/package.json @@ -4,13 +4,15 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "node --test tests/email.test.js" }, "keywords": [], "author": "", "license": "ISC", "type": "module", "dependencies": { - "kafkajs": "^2.2.4" + "drizzle-orm": "^0.45.4", + "kafkajs": "^2.2.4", + "postgres": "^4.1.1" } } diff --git a/email-service/tests/email.test.js b/email-service/tests/email.test.js new file mode 100644 index 0000000..f614894 --- /dev/null +++ b/email-service/tests/email.test.js @@ -0,0 +1,128 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { processEmailBatch } from "../consumer-processor.js"; + +test("Email Service Idempotency & Unique Constraint Suite", async (t) => { + await t.test("Unique constraint violation (code 23505) skips concurrent duplicates cleanly", async () => { + let duplicateSkipped = false; + + const handleEmailEvent = async (eventId) => { + try { + const dbErr = new Error('duplicate key value violates unique constraint "processed_events_pkey"'); + dbErr.code = "23505"; + throw dbErr; + } catch (dbErr) { + if ( + dbErr.code === "23505" || + dbErr.message?.includes("duplicate key") || + dbErr.message?.includes("processed_events_pkey") + ) { + duplicateSkipped = true; + return; + } + throw dbErr; + } + }; + + await handleEmailEvent("evt-1234"); + assert.equal(duplicateSkipped, true, "Must cleanly skip concurrent duplicate without throwing"); + }); + + await t.test("Email emitted event generates new eventId, preserves correlationId & causationId, partitioned by orderId", () => { + const incomingOrderEvent = { + eventId: "order-event-111", + correlationId: "payment-event-001", + causationId: "payment-event-001", + orderId: "order-999", + userId: "user-888", + }; + + const newEmailEventId = "email-event-222"; + const emailOutboxPayload = { + eventId: newEmailEventId, + correlationId: incomingOrderEvent.correlationId || incomingOrderEvent.eventId, + causationId: incomingOrderEvent.eventId, + orderId: incomingOrderEvent.orderId, + userId: incomingOrderEvent.userId, + emailId: "email-xyz", + }; + + // Partition key is strictly orderId + const partitionKey = String(emailOutboxPayload.orderId); + + assert.equal(emailOutboxPayload.eventId, "email-event-222", "Emits brand new eventId"); + assert.equal(emailOutboxPayload.correlationId, "payment-event-001", "Preserves original payment correlationId"); + assert.equal(emailOutboxPayload.causationId, "order-event-111", "CausationId points to immediate order event"); + assert.equal(partitionKey, "order-999", "Partition key strictly matches orderId"); + }); + + await t.test("eachBatch processes batch in single transaction and skips duplicates", async () => { + const processed = new Set(["already-done"]); + const insertedOutbox = []; + const dispatched = []; + const resolvedOffsets = []; + + const db = { + select() { + return { + from() { + return { + where() { + return Promise.resolve([{ eventId: "already-done" }]); + }, + }; + }, + }; + }, + async transaction(fn) { + const tx = { + insert(table) { + return { + values(rows) { + const arr = Array.isArray(rows) ? rows : [rows]; + if (table.__t === "processed") { + for (const r of arr) processed.add(r.eventId); + } else { + insertedOutbox.push(...arr); + } + return Promise.resolve(); + }, + }; + }, + }; + await fn(tx); + }, + }; + + const messages = [ + { offset: "0", value: Buffer.from(JSON.stringify({ eventId: "already-done", orderId: "o-0", userId: "u-0" })) }, + { offset: "1", value: Buffer.from(JSON.stringify({ eventId: "evt-1", orderId: "o-1", userId: "u-1" })) }, + { offset: "2", value: Buffer.from(JSON.stringify({ eventId: "evt-2", orderId: "o-2", userId: "u-2" })) }, + ]; + + const res = await processEmailBatch({ + batch: { topic: "order-successful", partition: 0, messages }, + resolveOffset: (o) => resolvedOffsets.push(o), + heartbeat: async () => {}, + commitOffsetsIfNecessary: async () => {}, + isRunning: () => true, + isStale: () => false, + db, + tables: { + processedEvents: { __t: "processed", eventId: "event_id", serviceName: "service_name" }, + outboxEvents: { __t: "outbox" }, + }, + dispatchEmail: (item) => { + dispatched.push(item.eventId); + return `mail_${item.eventId}`; + }, + }); + + assert.equal(res.mode, "batch"); + assert.equal(res.processedCount, 2); + assert.equal(res.skippedDuplicates, 1); + assert.deepEqual(dispatched, ["evt-1", "evt-2"]); + assert.equal(insertedOutbox.length, 2); + assert.deepEqual(resolvedOffsets, ["0", "1", "2"]); + }); +}); diff --git a/email-service/worker.js b/email-service/worker.js new file mode 100644 index 0000000..1ff1559 --- /dev/null +++ b/email-service/worker.js @@ -0,0 +1,182 @@ +import { db } from "./db/index.js"; +import { sql, inArray } from "drizzle-orm"; +import { outboxEvents } from "./db/schema.js"; +import { Kafka } from "kafkajs"; + +const kafka = new Kafka({ + clientId: "email-service-worker", + brokers: [process.env.KAFKA_BROKERS || "localhost:9092"], + ...(process.env.KAFKA_SASL_USERNAME && { + ssl: true, + sasl: { + mechanism: "plain", + username: process.env.KAFKA_SASL_USERNAME, + password: process.env.KAFKA_SASL_PASSWORD, + }, + }), +}); + +const producer = kafka.producer(); + +let isRunning = false; +let loopPromise = null; +let isConnected = false; + +/** + * Process a single batch of unpublished email outbox events using + * SELECT ... FOR UPDATE SKIP LOCKED to prevent duplicate publishes across workers. + * Deterministic partition key: orderId (no fallback chains). + */ +export const processEmailOutboxBatch = async () => { + if (!db || !isConnected) return 0; + + let processedCount = 0; + + try { + await db.transaction(async (tx) => { + const rows = await tx.execute( + sql`SELECT id, topic, payload, created_at FROM outbox_events WHERE published = false AND topic = 'email-successful' ORDER BY created_at ASC LIMIT 50 FOR UPDATE SKIP LOCKED` + ); + + const events = Array.from(rows || []); + if (events.length === 0) { + return; + } + + const publishedIds = []; + const messages = []; + + for (const event of events) { + const rawPayload = typeof event.payload === "string" ? JSON.parse(event.payload) : event.payload; + + const eventId = String(rawPayload.eventId || event.id); + const correlationId = String(rawPayload.correlationId || eventId); + const causationId = String(rawPayload.causationId || eventId); + const orderId = String(rawPayload.orderId); + + const enrichedPayload = { + ...rawPayload, + eventId, + correlationId, + causationId, + orderId, + }; + + // Deterministic partition key: orderId (strictly 1 key, no fallback chains) + const partitionKey = String(orderId); + + messages.push({ + key: partitionKey, + value: JSON.stringify(enrichedPayload), + headers: { + "event-id": eventId, + "correlation-id": correlationId, + "causation-id": causationId, + "order-id": orderId, + "event-type": String(event.topic), + }, + }); + + publishedIds.push(event.id); + processedCount++; + } + + if (messages.length > 0) { + await producer.send({ + topic: "email-successful", + messages, + }); + } + + if (publishedIds.length > 0) { + await tx + .update(outboxEvents) + .set({ published: true }) + .where(inArray(outboxEvents.id, publishedIds)); + console.log(`Email Outbox Worker: Batch-published ${publishedIds.length} email-successful events`); + } + }); + } catch (err) { + console.error("Email Outbox Worker: Batch processing failed (transaction rolled back):", err.message); + } + + return processedCount; +}; + +export async function pruneEmailOutboxEvents(retentionHours = 1) { + if (!db) return 0; + try { + const res = await db.execute( + sql`DELETE FROM outbox_events WHERE published = true AND topic = 'email-successful' AND created_at < NOW() - INTERVAL '1 hour' * ${retentionHours}` + ); + const count = Number(res?.count ?? res?.rowCount ?? 0); + if (count > 0) { + console.log(`Email Outbox Pruner: Deleted ${count} published email-successful events older than ${retentionHours} hour(s).`); + } + return count; + } catch (err) { + console.error("๐Ÿšจ [CRITICAL][Email Outbox Pruner] PRUNE FAILED! Published email-successful rows are NOT being cleaned up:", err.message, err.stack || ""); + return 0; + } +} + +let lastPruned = Date.now(); +const PRUNE_INTERVAL_MS = 5 * 60 * 1000; +const RETENTION_HOURS = parseInt(process.env.OUTBOX_RETENTION_HOURS || "1", 10); + +const runLoop = async () => { + while (isRunning) { + try { + const now = Date.now(); + if (now - lastPruned > PRUNE_INTERVAL_MS) { + lastPruned = now; + await pruneEmailOutboxEvents(RETENTION_HOURS); + } + + const processedCount = await processEmailOutboxBatch(); + if (!isRunning) break; + + if (processedCount === 0) { + await new Promise((resolve) => setTimeout(resolve, 500)); + } + } catch (err) { + console.error("Email Outbox Worker: Unexpected loop error:", err); + if (isRunning) { + await new Promise((resolve) => setTimeout(resolve, 2000)); + } + } + } +}; + +export const startEmailOutboxWorker = async () => { + if (!process.env.DATABASE_URL) return; + if (isRunning) return; + + try { + await producer.connect(); + isConnected = true; + isRunning = true; + console.log("Email Outbox Worker: Connected to Kafka. Starting relay loop."); + loopPromise = runLoop(); + } catch (err) { + console.error("Email Outbox Worker: Initial Kafka Connection Error", err.message); + } +}; + +export const stopEmailOutboxWorker = async () => { + console.log("Email Outbox Worker: Stopping worker loop..."); + isRunning = false; + if (loopPromise) { + await loopPromise; + loopPromise = null; + } + if (isConnected) { + try { + await producer.disconnect(); + isConnected = false; + console.log("Email Outbox Worker: Disconnected from Kafka"); + } catch (err) { + console.error("Email Outbox Worker: Error disconnecting from Kafka", err.message); + } + } +}; diff --git a/fix-env.js b/fix-env.js deleted file mode 100644 index 0db66d8..0000000 --- a/fix-env.js +++ /dev/null @@ -1,4 +0,0 @@ -const fs = require('fs'); -fs.writeFileSync('.env', `DATABASE_URL=postgresql://neondb_owner:npg_WZyLXSF6Orf8@ep-polished-art-axlsmvao.c-4.us-east-2.aws.neon.tech/neondb?sslmode=require`); -if (fs.existsSync('./payment-service/.env')) fs.unlinkSync('./payment-service/.env'); -if (fs.existsSync('./order-service/.env')) fs.unlinkSync('./order-service/.env'); diff --git a/init-db.sql b/init-db.sql new file mode 100644 index 0000000..48c11b3 --- /dev/null +++ b/init-db.sql @@ -0,0 +1,45 @@ +CREATE EXTENSION IF NOT EXISTS "pgcrypto"; + +CREATE TABLE IF NOT EXISTS "orders" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "user_id" text NOT NULL, + "items" jsonb NOT NULL, + "status" text NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL +); + +CREATE TABLE IF NOT EXISTS "outbox_events" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "topic" text NOT NULL, + "payload" jsonb NOT NULL, + "published" boolean DEFAULT false, + "created_at" timestamp DEFAULT now() NOT NULL +); + +CREATE TABLE IF NOT EXISTS "payments" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "user_id" text NOT NULL, + "amount" numeric NOT NULL, + "status" text NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL +); + +CREATE TABLE IF NOT EXISTS "processed_events" ( + "event_id" text NOT NULL, + "service_name" text NOT NULL, + "processed_at" timestamp DEFAULT now() NOT NULL, + PRIMARY KEY ("event_id", "service_name") +); + +-- High-efficiency partial indexes for transactional outbox relays per topic +CREATE INDEX IF NOT EXISTS idx_outbox_events_payment_unpublished + ON outbox_events (created_at ASC) + WHERE published = false AND topic = 'payment-successful'; + +CREATE INDEX IF NOT EXISTS idx_outbox_events_order_unpublished + ON outbox_events (created_at ASC) + WHERE published = false AND topic = 'order-successful'; + +CREATE INDEX IF NOT EXISTS idx_outbox_events_email_unpublished + ON outbox_events (created_at ASC) + WHERE published = false AND topic = 'email-successful'; diff --git a/k8s/infrastructure.yaml b/k8s/infrastructure.yaml deleted file mode 100644 index fc36b1c..0000000 --- a/k8s/infrastructure.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: zookeeper -spec: - replicas: 1 - selector: - matchLabels: - app: zookeeper - template: - metadata: - labels: - app: zookeeper - spec: - containers: - - name: zookeeper - image: confluentinc/cp-zookeeper:7.4.4 - env: - - name: ZOOKEEPER_CLIENT_PORT - value: "2181" - - name: ZOOKEEPER_TICK_TIME - value: "2000" - ports: - - containerPort: 2181 ---- -apiVersion: v1 -kind: Service -metadata: - name: zookeeper -spec: - ports: - - port: 2181 - selector: - app: zookeeper ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: kafka -spec: - replicas: 1 - selector: - matchLabels: - app: kafka - template: - metadata: - labels: - app: kafka - spec: - containers: - - name: kafka - image: confluentinc/cp-kafka:7.4.4 - env: - - name: KAFKA_BROKER_ID - value: "1" - - name: KAFKA_ZOOKEEPER_CONNECT - value: "zookeeper:2181" - - name: KAFKA_ADVERTISED_LISTENERS - value: "PLAINTEXT://kafka:9092" - - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR - value: "1" - ports: - - containerPort: 9092 ---- -apiVersion: v1 -kind: Service -metadata: - name: kafka -spec: - ports: - - port: 9092 - selector: - app: kafka diff --git a/k8s/microservices.yaml b/k8s/microservices.yaml deleted file mode 100644 index 2025819..0000000 --- a/k8s/microservices.yaml +++ /dev/null @@ -1,99 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: payment-service -spec: - replicas: 1 - selector: - matchLabels: - app: payment-service - template: - metadata: - labels: - app: payment-service - spec: - containers: - - name: payment-service - image: payment-service:latest - imagePullPolicy: Never - env: - - name: DATABASE_URL - value: "postgresql://neondb_owner:npg_WZyLXSF6Orf8@ep-polished-art-axlsmvao.c-4.us-east-2.aws.neon.tech/neondb?sslmode=require" - - name: KAFKA_BROKERS - value: "kafka:9092" - ports: - - containerPort: 8000 ---- -apiVersion: v1 -kind: Service -metadata: - name: payment-service -spec: - type: ClusterIP - ports: - - port: 8000 - targetPort: 8000 - selector: - app: payment-service ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: order-service -spec: - replicas: 1 - selector: - matchLabels: - app: order-service - template: - metadata: - labels: - app: order-service - spec: - containers: - - name: order-service - image: order-service:latest - imagePullPolicy: Never - env: - - name: DATABASE_URL - value: "postgresql://neondb_owner:npg_WZyLXSF6Orf8@ep-polished-art-axlsmvao.c-4.us-east-2.aws.neon.tech/neondb?sslmode=require" - - name: KAFKA_BROKERS - value: "kafka:9092" -# API Gateway -apiVersion: apps/v1 -kind: Deployment -metadata: - name: api-gateway -spec: - replicas: 1 - selector: - matchLabels: - app: api-gateway - template: - metadata: - labels: - app: api-gateway - spec: - containers: - - name: api-gateway - image: api-gateway:latest - imagePullPolicy: Never - env: - - name: PAYMENT_SERVICE_URL - value: "http://payment-service:8000" - - name: JWT_SECRET - value: "super-secret-development-key" - ports: - - containerPort: 8080 ---- -apiVersion: v1 -kind: Service -metadata: - name: api-gateway -spec: - type: LoadBalancer - ports: - - port: 8080 - targetPort: 8080 - selector: - app: api-gateway diff --git a/order-service/.dockerignore b/order-service/.dockerignore new file mode 100644 index 0000000..cab67ef --- /dev/null +++ b/order-service/.dockerignore @@ -0,0 +1,4 @@ +node_modules +npm-debug.log +.env +.git diff --git a/order-service/consumer-processor.js b/order-service/consumer-processor.js new file mode 100644 index 0000000..3f305e5 --- /dev/null +++ b/order-service/consumer-processor.js @@ -0,0 +1,504 @@ +import crypto from "node:crypto"; +import { performance } from "node:perf_hooks"; +import { and, eq, inArray } from "drizzle-orm"; + +export function isDuplicateConstraintError(err) { + const code = err?.code || err?.cause?.code; + const msg = err?.message || ""; + const causeMsg = err?.cause?.message || ""; + return ( + code === "23505" || + msg.includes("duplicate key") || + msg.includes("processed_events_pkey") || + msg.includes("unique constraint") || + causeMsg.includes("duplicate key") || + causeMsg.includes("processed_events_pkey") || + causeMsg.includes("unique constraint") + ); +} + +export async function sendToDlq({ + producer, + originalPayload, + rawValue, + eventId, + userId, + errorReason, + errorMessage, + partition, + offset, +}) { + await producer.send({ + topic: "payment-successful.DLQ", + messages: [ + { + key: String(eventId || userId || "unknown"), + value: JSON.stringify({ + originalPayload: originalPayload ?? null, + ...(rawValue !== undefined ? { rawValue } : {}), + error: errorMessage, + failedAt: new Date().toISOString(), + eventId: eventId || null, + ...(partition !== undefined ? { partition } : {}), + ...(offset !== undefined ? { offset } : {}), + }), + headers: { + "error-reason": String(errorReason), + "original-event-id": String(eventId || ""), + }, + }, + ], + }); +} + +export async function processSingleOrderMessage({ + message, + topic = "payment-successful", + partition = 0, + db, + producer, + tables, + hasDatabaseUrl = Boolean(process.env.DATABASE_URL), + maxRetries = 3, + retryBaseDelayMs = 100, + onCrashAfterDbCommit = () => { + console.warn("๐Ÿ’ฅ [TEST HOOK]: Simulating immediate order-service crash after DB commit (before relay publish)!"); + process.exit(99); + }, +}) { + const { orders, processedEvents, outboxEvents } = tables; + const t0 = performance.now(); + let tIdemp = 0; + let tTx = 0; + + const rawValue = message.value ? message.value.toString() : ""; + let data; + try { + data = JSON.parse(rawValue); + } catch (parseErr) { + console.error(`Order Service [POISON MESSAGE][JSON Error] offset=${message.offset}:`, parseErr.message); + await sendToDlq({ + producer, + originalPayload: null, + rawValue, + eventId: null, + userId: null, + errorReason: "JSON_PARSE_ERROR", + errorMessage: `Invalid JSON: ${parseErr.message}`, + partition, + offset: message.offset, + }); + return { + status: "sent_to_dlq", + reason: "JSON_PARSE_ERROR", + tTotal: performance.now() - t0, + tIdemp, + tTx, + }; + } + + const userId = data.userId == null ? null : String(data.userId); + const cart = data.cart === undefined ? [] : data.cart; + const eventId = data.eventId == null ? null : String(data.eventId); + const { correlationId, causationId } = data; + + // 1. Idempotency Check: if eventId has already been processed by order-service, skip side-effect + if (hasDatabaseUrl && db && eventId) { + const tIdemp0 = performance.now(); + try { + const existing = await db + .select() + .from(processedEvents) + .where( + and( + eq(processedEvents.eventId, eventId), + eq(processedEvents.serviceName, "order-service") + ) + ) + .limit(1); + + tIdemp = performance.now() - tIdemp0; + if (existing && existing.length > 0) { + console.warn(`Order Service [Idempotency]: Event ID ${eventId} already processed by order-service. Skipping duplicate order creation.`); + return { + status: "skipped_duplicate", + tTotal: performance.now() - t0, + tIdemp, + tTx, + }; + } + } catch (e) { + tIdemp = performance.now() - tIdemp0; + console.error("Order Service: Error querying processed_events:", e.message); + } + } + + // 2. Atomic Order Creation + Outbox Event + Idempotency Record in ONE SQL transaction + let orderId = null; + let isDuplicateViolation = false; + let lastErrorMessage = `Exhausted ${maxRetries} DB insert retries`; + let attempt = 0; + + if (hasDatabaseUrl && db) { + while (attempt < maxRetries) { + attempt++; + try { + const orderEventId = crypto.randomUUID(); + const rootCorrelationId = String(correlationId || eventId || orderEventId); + const directCausationId = String(eventId || rootCorrelationId); + + const tTx0 = performance.now(); + await db.transaction(async (tx) => { + const inserted = await tx + .insert(orders) + .values({ + userId, + items: cart, + status: "processing", + }) + .returning(); + + if (inserted && inserted.length > 0) { + orderId = inserted[0].id; + } + + if (eventId) { + await tx.insert(processedEvents).values({ + eventId, + serviceName: "order-service", + }); + } + + await tx.insert(outboxEvents).values({ + id: orderEventId, + topic: "order-successful", + payload: { + eventId: orderEventId, + correlationId: rootCorrelationId, + causationId: directCausationId, + orderId, + userId, + items: cart, + }, + published: false, + }); + }); + tTx = performance.now() - tTx0; + break; + } catch (dbErr) { + if (isDuplicateConstraintError(dbErr)) { + console.warn(`Order Service [Idempotency]: Unique constraint violation for event ID ${eventId}. Concurrent duplicate detected; skipping cleanly.`); + isDuplicateViolation = true; + break; + } + + lastErrorMessage = dbErr?.cause?.message || dbErr?.message || String(dbErr); + console.error(`Order Service: DB write failed on attempt ${attempt}/${maxRetries}:`, lastErrorMessage); + if (attempt < maxRetries) { + await new Promise((resolve) => setTimeout(resolve, retryBaseDelayMs * Math.pow(2, attempt - 1))); + } + } + } + } else { + orderId = `order_${Date.now()}`; + } + + if (isDuplicateViolation) { + return { + status: "skipped_concurrent_duplicate", + tTotal: performance.now() - t0, + tIdemp, + tTx, + }; + } + + if (!orderId) { + console.error(`Order Service [POISON MESSAGE]: Failed to create order after ${maxRetries} attempts. Routing to payment-successful.DLQ`); + await sendToDlq({ + producer, + originalPayload: data, + eventId, + userId, + errorReason: "DB_INSERTION_EXHAUSTED", + errorMessage: lastErrorMessage, + partition, + offset: message.offset, + }); + return { + status: "sent_to_dlq", + reason: "DB_INSERTION_EXHAUSTED", + tTotal: performance.now() - t0, + tIdemp, + tTx, + }; + } + + if (process.env.TEST_CRASH_AFTER_DB_COMMIT === "true" || data.testCrashAfterDbCommit === true) { + onCrashAfterDbCommit(); + } + + return { + status: "created", + orderId, + tTotal: performance.now() - t0, + tIdemp, + tTx, + }; +} + +export async function processOrderBatch({ + batch, + resolveOffset, + heartbeat, + commitOffsetsIfNecessary, + isRunning, + isStale, + db, + producer, + tables, + hasDatabaseUrl = Boolean(process.env.DATABASE_URL), + maxRetries = 3, + retryBaseDelayMs = 100, + onCrashAfterDbCommit = () => { + console.warn("๐Ÿ’ฅ [TEST HOOK]: Simulating immediate order-service crash after DB commit (before relay publish / offset commit)!"); + process.exit(99); + }, + onHoldBeforeOffsetCommit = async () => { + console.warn("โธ๏ธ [TEST HOOK]: DB batch committed; holding before offset commit (waiting for SIGKILL)..."); + await new Promise(() => {}); + }, +}) { + if (!isRunning() || isStale()) { + return { mode: "skipped_not_running", createdCount: 0, dlqCount: 0, skippedDuplicates: 0 }; + } + + const { orders, processedEvents, outboxEvents } = tables; + const t0 = performance.now(); + let tIdemp = 0; + let tTx = 0; + + const parsedItems = []; + const parseFailedItems = []; + + for (const message of batch.messages) { + const raw = message.value ? message.value.toString() : ""; + try { + const data = JSON.parse(raw); + parsedItems.push({ + message, + data, + eventId: data.eventId == null ? "" : String(data.eventId), + userId: data.userId == null ? null : String(data.userId), + cart: data.cart === undefined ? [] : data.cart, + correlationId: data.correlationId, + causationId: data.causationId, + }); + } catch (parseErr) { + parseFailedItems.push({ message, raw, parseErr }); + } + } + + // 1. Bulk idempotency check with IN query + const eventIds = parsedItems.map((p) => p.eventId).filter(Boolean); + let existingSet = new Set(); + if (hasDatabaseUrl && db && eventIds.length > 0) { + const tIdemp0 = performance.now(); + try { + const existing = await db + .select({ eventId: processedEvents.eventId }) + .from(processedEvents) + .where( + and( + inArray(processedEvents.eventId, eventIds), + eq(processedEvents.serviceName, "order-service") + ) + ); + existingSet = new Set(existing.map((e) => e.eventId)); + } catch (e) { + console.error("Order Service: Bulk idempotency check failed:", e.message); + } + tIdemp = performance.now() - tIdemp0; + } + + // Filter out already-processed and within-batch duplicate eventIds + const seenInBatch = new Set(); + const newItems = []; + let skippedDuplicates = 0; + for (const item of parsedItems) { + if (item.eventId && (existingSet.has(item.eventId) || seenInBatch.has(item.eventId))) { + skippedDuplicates++; + continue; + } + if (item.eventId) seenInBatch.add(item.eventId); + newItems.push(item); + } + + if (skippedDuplicates > 0) { + console.warn( + `Order Service [eachBatch Idempotency]: Skipped ${skippedDuplicates} already-processed duplicate message(s) in batch of ${batch.messages.length}.` + ); + } + + // 2. Single atomic SQL transaction for all new items in the batch + let batchFailed = false; + let batchError = null; + + if (newItems.length > 0 && hasDatabaseUrl && db) { + const tTx0 = performance.now(); + try { + await db.transaction(async (tx) => { + const insertedOrders = await tx + .insert(orders) + .values( + newItems.map((item) => ({ + userId: item.userId, + items: item.cart, + status: "processing", + })) + ) + .returning(); + + const processedValues = newItems + .filter((item) => item.eventId) + .map((item) => ({ + eventId: item.eventId, + serviceName: "order-service", + })); + + if (processedValues.length > 0) { + await tx.insert(processedEvents).values(processedValues); + } + + await tx.insert(outboxEvents).values( + newItems.map((item, idx) => { + const orderId = insertedOrders[idx]?.id; + const orderEventId = crypto.randomUUID(); + const rootCorrelationId = String(item.correlationId || item.eventId || orderEventId); + const directCausationId = String(item.eventId || rootCorrelationId); + return { + id: orderEventId, + topic: "order-successful", + payload: { + eventId: orderEventId, + correlationId: rootCorrelationId, + causationId: directCausationId, + orderId, + userId: item.userId, + items: item.cart, + }, + published: false, + }; + }) + ); + }); + tTx = performance.now() - tTx0; + } catch (err) { + tTx = performance.now() - tTx0; + batchFailed = true; + batchError = err; + } + } + + // 3. Fallback: if batch transaction failed, roll back happened cleanly -> process 1-by-1 in offset order + if (batchFailed) { + const reason = batchError?.cause?.message || batchError?.message || String(batchError); + console.warn( + `Order Service [eachBatch Fallback]: Batch transaction failed (${reason}). Falling back to per-message processing for ${batch.messages.length} message(s)...` + ); + + let fallbackCreated = 0; + let fallbackDlq = 0; + let fallbackSkipped = 0; + + for (const message of batch.messages) { + if (!isRunning() || isStale()) break; + + const res = await processSingleOrderMessage({ + message, + topic: batch.topic, + partition: batch.partition, + db, + producer, + tables, + hasDatabaseUrl, + maxRetries, + retryBaseDelayMs, + onCrashAfterDbCommit, + }); + + if (res.status === "created") fallbackCreated++; + else if (res.status === "sent_to_dlq") fallbackDlq++; + else fallbackSkipped++; + + resolveOffset(message.offset); + await heartbeat(); + } + + if (commitOffsetsIfNecessary) { + await commitOffsetsIfNecessary(); + } + + return { + mode: "fallback_single", + createdCount: fallbackCreated, + dlqCount: fallbackDlq, + skippedDuplicates: fallbackSkipped, + tTotal: performance.now() - t0, + tIdemp, + tTx, + processedCount: batch.messages.length, + }; + } + + // 4. Test hooks: fire AFTER DB batch commit and BEFORE offsets are resolved/committed + // Only trigger when newItems were actually committed in this batch (so redelivery skips cleanly) + if (newItems.length > 0) { + if ( + process.env.TEST_HOLD_BEFORE_OFFSET_COMMIT === "true" || + newItems.some((item) => item.data?.testHoldBeforeOffsetCommit === true) + ) { + await onHoldBeforeOffsetCommit(); + } else if ( + process.env.TEST_CRASH_AFTER_DB_COMMIT === "true" || + newItems.some((item) => item.data?.testCrashAfterDbCommit === true) + ) { + onCrashAfterDbCommit(); + } + } + + // 5. Route any JSON-parse-failed messages to DLQ before resolving batch offsets + for (const failed of parseFailedItems) { + console.error(`Order Service [POISON MESSAGE][JSON Error] offset=${failed.message.offset}:`, failed.parseErr.message); + await sendToDlq({ + producer, + originalPayload: null, + rawValue: failed.raw, + eventId: null, + userId: null, + errorReason: "JSON_PARSE_ERROR", + errorMessage: `Invalid JSON: ${failed.parseErr.message}`, + partition: batch.partition, + offset: failed.message.offset, + }); + } + + // 6. Resolve offsets in strict order and commit + for (const message of batch.messages) { + resolveOffset(message.offset); + } + if (commitOffsetsIfNecessary) { + await commitOffsetsIfNecessary(); + } + await heartbeat(); + + return { + mode: "batch", + createdCount: newItems.length, + dlqCount: parseFailedItems.length, + skippedDuplicates, + tTotal: performance.now() - t0, + tIdemp, + tTx, + processedCount: batch.messages.length, + }; +} diff --git a/order-service/db/index.js b/order-service/db/index.js index 513112c..dfc76e3 100644 --- a/order-service/db/index.js +++ b/order-service/db/index.js @@ -3,5 +3,6 @@ import postgres from 'postgres'; import * as schema from './schema.js'; const connectionString = process.env.DATABASE_URL; -const client = postgres(connectionString, { prepare: false }); +const poolMax = parseInt(process.env.DB_POOL_MAX || '10', 10); +const client = postgres(connectionString, { max: poolMax, prepare: false }); export const db = drizzle(client, { schema }); diff --git a/order-service/db/schema.js b/order-service/db/schema.js index e576fb6..e516379 100644 --- a/order-service/db/schema.js +++ b/order-service/db/schema.js @@ -1,4 +1,4 @@ -import { pgTable, uuid, text, numeric, boolean, timestamp, jsonb } from 'drizzle-orm/pg-core'; +import { pgTable, uuid, text, timestamp, jsonb, boolean, primaryKey } from 'drizzle-orm/pg-core'; export const orders = pgTable('orders', { id: uuid('id').defaultRandom().primaryKey(), @@ -7,3 +7,19 @@ export const orders = pgTable('orders', { status: text('status').notNull(), createdAt: timestamp('created_at').defaultNow().notNull(), }); + +export const outboxEvents = pgTable('outbox_events', { + id: uuid('id').defaultRandom().primaryKey(), + topic: text('topic').notNull(), + payload: jsonb('payload').notNull(), + published: boolean('published').default(false), + createdAt: timestamp('created_at').defaultNow().notNull(), +}); + +export const processedEvents = pgTable('processed_events', { + eventId: text('event_id').notNull(), + serviceName: text('service_name').notNull(), + processedAt: timestamp('processed_at').defaultNow().notNull(), +}, (table) => [ + primaryKey({ columns: [table.eventId, table.serviceName] }) +]); diff --git a/order-service/index.js b/order-service/index.js index 2eac7c3..b894fec 100644 --- a/order-service/index.js +++ b/order-service/index.js @@ -1,6 +1,85 @@ +import http from "node:http"; import { Kafka } from "kafkajs"; import { db } from "./db/index.js"; -import { orders } from "./db/schema.js"; +import { orders, outboxEvents, processedEvents } from "./db/schema.js"; +import { startOrderOutboxWorker, stopOrderOutboxWorker } from "./worker.js"; +import { processOrderBatch, processSingleOrderMessage } from "./consumer-processor.js"; + +let isReady = false; +let isShuttingDown = false; +let inflightMessages = 0; + +// High-resolution timing metrics buffer +const timingMetrics = { + total: [], + idempotency: [], + tx: [], + overhead: [], +}; + +export function getConsumerStats() { + const calc = (arr) => { + if (arr.length === 0) return { avg: 0, p50: 0, p95: 0, min: 0, max: 0 }; + const sorted = [...arr].sort((a, b) => a - b); + const avg = arr.reduce((a, b) => a + b, 0) / arr.length; + const p50 = sorted[Math.floor(sorted.length * 0.5)]; + const p95 = sorted[Math.floor(sorted.length * 0.95)]; + const min = sorted[0]; + const max = sorted[sorted.length - 1]; + return { + avg: Number(avg.toFixed(2)), + p50: Number(p50.toFixed(2)), + p95: Number(p95.toFixed(2)), + min: Number(min.toFixed(2)), + max: Number(max.toFixed(2)), + }; + }; + + const total = calc(timingMetrics.total); + const idempotency = calc(timingMetrics.idempotency); + const tx = calc(timingMetrics.tx); + const overhead = calc(timingMetrics.overhead); + + return { + sampleCount: timingMetrics.total.length, + total, + idempotency, + tx, + overhead, + impliedThroughput: total.avg > 0 ? Number((1000 / total.avg).toFixed(2)) : 0, + }; +} + +// Health check server for container orchestration & metrics +const healthServer = http.createServer((req, res) => { + if (req.url === "/health") { + if (isReady && !isShuttingDown) { + res.writeHead(200, { "Content-Type": "text/plain" }); + res.end("Order Service OK"); + } else { + res.writeHead(503, { "Content-Type": "text/plain" }); + res.end(isShuttingDown ? "Order Service Shutting Down" : "Order Service Starting..."); + } + } else if (req.url === "/consumer-stats") { + res.writeHead(200, { "Content-Type": "application/json" }); + res.end(JSON.stringify(getConsumerStats(), null, 2)); + } else { + res.writeHead(404); + res.end(); + } +}); + +const HEALTH_PORT = process.env.PORT || 8001; +healthServer.listen(HEALTH_PORT, () => { + const effectivePoolMax = parseInt(process.env.DB_POOL_MAX || "10", 10); + const effectiveConsumerMode = process.env.CONSUMER_MODE || "eachMessage"; + const effectiveConcurrency = parseInt(process.env.PARTITIONS_CONSUMED_CONCURRENTLY || "1", 10); + const effectiveRetentionHours = parseInt(process.env.OUTBOX_RETENTION_HOURS || "1", 10); + console.log(`๐Ÿš€ Order service health server listening on port ${HEALTH_PORT}`); + console.log( + `[EFFECTIVE CONFIG] order-service: PORT=${HEALTH_PORT}, DB_POOL_MAX=${effectivePoolMax}, CONSUMER_MODE=${effectiveConsumerMode}, PARTITIONS_CONSUMED_CONCURRENTLY=${effectiveConcurrency}, OUTBOX_RETENTION_HOURS=${effectiveRetentionHours}, KAFKA_BROKERS=${process.env.KAFKA_BROKERS || "localhost:9092"}` + ); +}); const kafka = new Kafka({ clientId: "order-service", @@ -8,7 +87,7 @@ const kafka = new Kafka({ ...(process.env.KAFKA_SASL_USERNAME && { ssl: true, sasl: { - mechanism: 'plain', + mechanism: "plain", username: process.env.KAFKA_SASL_USERNAME, password: process.env.KAFKA_SASL_PASSWORD, }, @@ -19,50 +98,157 @@ const producer = kafka.producer(); const consumer = kafka.consumer({ groupId: "order-service" }); const run = async () => { - try { - await producer.connect(); - await consumer.connect(); - await consumer.subscribe({ - topic: "payment-successful", - fromBeginning: true, - }); + let connected = false; + while (!connected && !isShuttingDown) { + try { + await producer.connect(); + await consumer.connect(); + await consumer.subscribe({ + topic: "payment-successful", + fromBeginning: true, + }); + await startOrderOutboxWorker(); + connected = true; + isReady = true; + console.log("Order Service: Connected to Kafka and subscribed to payment-successful"); + } catch (err) { + console.warn("Order Service: Retrying Kafka connection/subscription in 2s...", err.message); + await new Promise((r) => setTimeout(r, 2000)); + } + } + + if (isShuttingDown) return; + + const partitionsConsumedConcurrently = parseInt(process.env.PARTITIONS_CONSUMED_CONCURRENTLY || "1", 10); + const consumerMode = process.env.CONSUMER_MODE || "eachMessage"; // "eachMessage" or "eachBatch" + console.log(`Order Service: Running consumer with mode=${consumerMode}, partitionsConsumedConcurrently=${partitionsConsumedConcurrently}`); + const tables = { orders, processedEvents, outboxEvents }; + + if (consumerMode === "eachBatch") { await consumer.run({ + partitionsConsumedConcurrently, + eachBatch: async ({ batch, resolveOffset, heartbeat, commitOffsetsIfNecessary, isRunning, isStale }) => { + if (!isRunning() || isStale()) return; + inflightMessages += batch.messages.length; + + try { + const result = await processOrderBatch({ + batch, + resolveOffset, + heartbeat, + commitOffsetsIfNecessary, + isRunning, + isStale, + db, + producer, + tables, + }); + + if (result.processedCount > 0) { + const tTotal = result.tTotal || 0; + const tIdemp = result.tIdemp || 0; + const tTx = result.tTx || 0; + const tOverhead = Math.max(0, tTotal - tIdemp - tTx); + const perMsgTotal = tTotal / result.processedCount; + const perMsgIdemp = tIdemp / result.processedCount; + const perMsgTx = tTx / result.processedCount; + const perMsgOverhead = tOverhead / result.processedCount; + + for (let i = 0; i < result.processedCount; i++) { + timingMetrics.total.push(perMsgTotal); + timingMetrics.idempotency.push(perMsgIdemp); + timingMetrics.tx.push(perMsgTx); + timingMetrics.overhead.push(perMsgOverhead); + } + + if (timingMetrics.total.length % 200 < result.processedCount) { + const stats = getConsumerStats(); + console.log( + `๐Ÿ“Š [Order eachBatch N=${stats.sampleCount} msgs] Total avg=${stats.total.avg}ms/msg | DB Tx avg=${stats.tx.avg}ms/msg | Implied Rate=${stats.impliedThroughput} msgs/s` + ); + } + } + } finally { + inflightMessages = Math.max(0, inflightMessages - batch.messages.length); + } + }, + }); + } else { + // Sequential eachMessage processing + await consumer.run({ + partitionsConsumedConcurrently, eachMessage: async ({ topic, partition, message }) => { - const value = message.value.toString(); - const { userId, cart } = JSON.parse(value); - - // Create order on real DB (Drizzle ORM) - let orderId = "mock-order-id"; - if (process.env.DATABASE_URL) { - try { - const data = await db.insert(orders).values({ - userId: userId, - items: cart, - status: "processing" - }).returning(); - - if (data && data.length > 0) { - orderId = data[0].id; + inflightMessages++; + try { + const result = await processSingleOrderMessage({ + message, + topic, + partition, + db, + producer, + tables, + }); + + if (result.status === "created") { + const tTotal = result.tTotal || 0; + const tIdemp = result.tIdemp || 0; + const tTx = result.tTx || 0; + const tOverhead = Math.max(0, tTotal - tIdemp - tTx); + timingMetrics.total.push(tTotal); + timingMetrics.idempotency.push(tIdemp); + timingMetrics.tx.push(tTx); + timingMetrics.overhead.push(tOverhead); + + if (timingMetrics.total.length % 100 === 0) { + const stats = getConsumerStats(); + console.log(`๐Ÿ“Š [Order Consumer Breakdown N=${stats.sampleCount}] Total=${stats.total.avg}ms | DB Tx=${stats.tx.avg}ms (${((stats.tx.avg / stats.total.avg) * 100).toFixed(1)}%) | Idempotency SELECT=${stats.idempotency.avg}ms (${((stats.idempotency.avg / stats.total.avg) * 100).toFixed(1)}%) | CPU/Overhead=${stats.overhead.avg}ms | Implied Rate=${stats.impliedThroughput} msgs/s`); } - } catch (e) { - console.error("Database error inserting order. Make sure 'orders' table exists: ", e.message); } + } finally { + inflightMessages = Math.max(0, inflightMessages - 1); } - - console.log(`Order consumer: Order processed for user id: ${userId}, orderId: ${orderId}`); - - await producer.send({ - topic: "order-successful", - messages: [ - { value: JSON.stringify({ userId, orderId }) }, - ], - }); }, }); + } +}; + +run().catch((err) => { + console.error("Order Service Kafka error:", err); +}); + +// Graceful shutdown +const shutdown = async () => { + if (isShuttingDown) return; + isShuttingDown = true; + isReady = false; + console.log("Order Service: SIGTERM received. Initiating graceful shutdown..."); + + // Stop health check server + healthServer.close(); + + // Wait for any in-flight messages to complete processing (up to 5 seconds) + const maxWait = 5000; + const start = Date.now(); + while (inflightMessages > 0 && Date.now() - start < maxWait) { + console.log(`Order Service: Waiting for ${inflightMessages} inflight message(s) to complete...`); + await new Promise((r) => setTimeout(r, 200)); + } + + try { + await stopOrderOutboxWorker(); + console.log("Order Service: Outbox worker stopped."); + await consumer.disconnect(); + console.log("Order Service: Consumer disconnected."); + await producer.disconnect(); + console.log("Order Service: Producer disconnected."); } catch (err) { - console.log(err); + console.error("Order Service: Error during Kafka disconnect:", err.message); } + + console.log("Order Service: Graceful shutdown complete. Exiting cleanly."); + process.exit(0); }; -run(); +process.on("SIGTERM", shutdown); +process.on("SIGINT", shutdown); diff --git a/order-service/package.json b/order-service/package.json index cd20e1a..e3b9fce 100644 --- a/order-service/package.json +++ b/order-service/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "node --test tests/order.test.js" }, "keywords": [], "author": "", diff --git a/order-service/tests/order.test.js b/order-service/tests/order.test.js new file mode 100644 index 0000000..b44574f --- /dev/null +++ b/order-service/tests/order.test.js @@ -0,0 +1,382 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { processOrderBatch, processSingleOrderMessage } from "../consumer-processor.js"; + +function createFakeDb() { + const state = { + orders: [], + processedEvents: new Map(), // key: `${eventId}|${serviceName}` + outboxEvents: [], + orderSeq: 0, + }; + + const tables = { + orders: { __table: "orders" }, + processedEvents: { __table: "processed_events", eventId: "event_id", serviceName: "service_name" }, + outboxEvents: { __table: "outbox_events" }, + }; + + function makeTx(snapshot) { + return { + insert(table) { + return { + values(rows) { + const arr = Array.isArray(rows) ? rows : [rows]; + if (table.__table === "orders") { + const inserted = arr.map((r) => { + if (r.userId === null || r.userId === undefined) { + const err = new Error('null value in column "user_id" of relation "orders" violates not-null constraint'); + err.code = "23502"; + throw err; + } + if (r.items === null || r.items === undefined) { + const err = new Error('null value in column "items" of relation "orders" violates not-null constraint'); + err.code = "23502"; + throw err; + } + const row = { id: `order-${++snapshot.orderSeq}`, ...r }; + snapshot.orders.push(row); + return row; + }); + return { + returning: async () => inserted, + }; + } + if (table.__table === "processed_events") { + for (const r of arr) { + const key = `${r.eventId}|${r.serviceName}`; + if (snapshot.processedEvents.has(key)) { + const err = new Error('duplicate key value violates unique constraint "processed_events_pkey"'); + err.code = "23505"; + throw err; + } + snapshot.processedEvents.set(key, r); + } + return Promise.resolve(); + } + if (table.__table === "outbox_events") { + for (const r of arr) { + snapshot.outboxEvents.push(r); + } + return Promise.resolve(); + } + return Promise.resolve(); + }, + }; + }, + }; + } + + function extractQueryValues(node, out = []) { + if (!node || typeof node !== "object") return out; + if (Array.isArray(node)) { + for (const item of node) extractQueryValues(item, out); + return out; + } + if (Object.prototype.hasOwnProperty.call(node, "value")) { + const v = node.value; + if (typeof v === "string") out.push(v); + else if (Array.isArray(v)) { + for (const item of v) { + if (typeof item === "string") out.push(item); + else extractQueryValues(item, out); + } + } + } + if (node.queryChunks) extractQueryValues(node.queryChunks, out); + return out; + } + + const db = { + _state: state, + select() { + return { + from() { + return { + where(condition) { + const queriedStrings = new Set(extractQueryValues(condition)); + const rows = Array.from(state.processedEvents.values()) + .filter((r) => queriedStrings.has(r.eventId)) + .map((r) => ({ + eventId: r.eventId, + serviceName: r.serviceName, + })); + const p = Promise.resolve(rows); + p.limit = () => Promise.resolve(rows.slice(0, 1)); + return p; + }, + }; + }, + }; + }, + async transaction(fn) { + // Atomic snapshot rollback semantics + const snapshot = { + orders: [...state.orders], + processedEvents: new Map(state.processedEvents), + outboxEvents: [...state.outboxEvents], + orderSeq: state.orderSeq, + }; + const tx = makeTx(snapshot); + await fn(tx); + // Commit snapshot on success + state.orders = snapshot.orders; + state.processedEvents = snapshot.processedEvents; + state.outboxEvents = snapshot.outboxEvents; + state.orderSeq = snapshot.orderSeq; + }, + }; + + return { db, tables, state }; +} + +function makeMessage(offset, payload) { + return { + offset: String(offset), + value: Buffer.from(typeof payload === "string" ? payload : JSON.stringify(payload)), + }; +} + +test("Order Service Consumer Processor (eachBatch & eachMessage) Suite", async (t) => { + await t.test("eachBatch: 1 poison DB message among 50 falls back 1-by-1 -> 49 orders, 1 DLQ, all 50 offsets resolved, consumer not stuck", async () => { + const { db, tables, state } = createFakeDb(); + const dlqMessages = []; + const producer = { + async send(arg) { + if (arg.topic === "payment-successful.DLQ") { + dlqMessages.push(...arg.messages); + } + }, + }; + + // Build 50 messages: 49 valid + 1 poison (userId: null triggers PG 23502 NOT NULL) at index 24 + const messages = []; + for (let i = 0; i < 50; i++) { + if (i === 24) { + messages.push( + makeMessage(i, { + eventId: "poison-evt-24", + userId: null, + cart: [{ id: "bad", price: 10 }], + }) + ); + } else { + messages.push( + makeMessage(i, { + eventId: `evt-${i}`, + userId: `user-${i}`, + cart: [{ id: `item-${i}`, price: 25 }], + }) + ); + } + } + + const resolvedOffsets = []; + let heartbeats = 0; + let commits = 0; + + const result = await processOrderBatch({ + batch: { topic: "payment-successful", partition: 0, messages }, + resolveOffset: (o) => resolvedOffsets.push(o), + heartbeat: async () => { heartbeats++; }, + commitOffsetsIfNecessary: async () => { commits++; }, + isRunning: () => true, + isStale: () => false, + db, + producer, + tables, + hasDatabaseUrl: true, + maxRetries: 3, + retryBaseDelayMs: 1, + }); + + assert.equal(result.mode, "fallback_single", "Must fall back to per-message processing on batch tx failure"); + assert.equal(result.createdCount, 49, "Exactly 49 valid orders must be created"); + assert.equal(result.dlqCount, 1, "Exactly 1 poison message must be routed to DLQ"); + assert.equal(state.orders.length, 49, "DB orders table must contain 49 rows"); + assert.equal(state.outboxEvents.length, 49, "DB outbox_events table must contain 49 rows"); + assert.equal(dlqMessages.length, 1, "DLQ must receive exactly 1 message"); + assert.equal(dlqMessages[0].headers["original-event-id"], "poison-evt-24"); + assert.equal(dlqMessages[0].headers["error-reason"], "DB_INSERTION_EXHAUSTED"); + assert.equal(resolvedOffsets.length, 50, "All 50 offsets must be resolved"); + assert.deepEqual( + resolvedOffsets, + Array.from({ length: 50 }, (_, i) => String(i)), + "Offsets must be resolved in strict ascending order" + ); + assert.ok(commits >= 1, "Offsets must be committed"); + assert.ok(heartbeats >= 50, "Heartbeats must be called during fallback"); + + // Verify consumer is NOT stuck: a subsequent healthy batch processes normally in batch mode + const followUp = await processOrderBatch({ + batch: { + topic: "payment-successful", + partition: 0, + messages: [makeMessage(50, { eventId: "evt-50", userId: "user-50", cart: [{ price: 15 }] })], + }, + resolveOffset: (o) => resolvedOffsets.push(o), + heartbeat: async () => {}, + commitOffsetsIfNecessary: async () => {}, + isRunning: () => true, + isStale: () => false, + db, + producer, + tables, + hasDatabaseUrl: true, + }); + assert.equal(followUp.mode, "batch"); + assert.equal(state.orders.length, 50); + }); + + await t.test("eachBatch: 1 malformed JSON among 50 creates 49 orders in 1 batch tx and sends 1 to DLQ", async () => { + const { db, tables, state } = createFakeDb(); + const dlqMessages = []; + const producer = { + async send(arg) { + if (arg.topic === "payment-successful.DLQ") dlqMessages.push(...arg.messages); + }, + }; + + const messages = []; + for (let i = 0; i < 50; i++) { + if (i === 10) { + messages.push(makeMessage(i, "{not-valid-json")); + } else { + messages.push(makeMessage(i, { eventId: `json-evt-${i}`, userId: `u-${i}`, cart: [] })); + } + } + + const resolvedOffsets = []; + const result = await processOrderBatch({ + batch: { topic: "payment-successful", partition: 0, messages }, + resolveOffset: (o) => resolvedOffsets.push(o), + heartbeat: async () => {}, + commitOffsetsIfNecessary: async () => {}, + isRunning: () => true, + isStale: () => false, + db, + producer, + tables, + hasDatabaseUrl: true, + }); + + assert.equal(result.mode, "batch"); + assert.equal(state.orders.length, 49); + assert.equal(dlqMessages.length, 1); + assert.equal(dlqMessages[0].headers["error-reason"], "JSON_PARSE_ERROR"); + assert.equal(resolvedOffsets.length, 50); + }); + + await t.test("eachBatch: crash after DB commit before offset commit -> redelivery produces 0 duplicates and all orders present", async () => { + const { db, tables, state } = createFakeDb(); + const producer = { async send() {} }; + + const messages = Array.from({ length: 20 }, (_, i) => + makeMessage(i, { + eventId: `crash-evt-${i}`, + userId: `crash-user-${i}`, + cart: [{ price: 10 }], + ...(i === 19 ? { testCrashAfterDbCommit: true } : {}), + }) + ); + + const resolvedBeforeCrash = []; + let crashed = false; + + await assert.rejects( + () => + processOrderBatch({ + batch: { topic: "payment-successful", partition: 0, messages }, + resolveOffset: (o) => resolvedBeforeCrash.push(o), + heartbeat: async () => {}, + commitOffsetsIfNecessary: async () => {}, + isRunning: () => true, + isStale: () => false, + db, + producer, + tables, + hasDatabaseUrl: true, + onCrashAfterDbCommit: () => { + crashed = true; + throw new Error("SIMULATED_SIGKILL_AFTER_DB_COMMIT"); + }, + }), + /SIMULATED_SIGKILL_AFTER_DB_COMMIT/ + ); + + assert.equal(crashed, true); + assert.equal(state.orders.length, 20, "All 20 orders committed to DB before crash"); + assert.equal(resolvedBeforeCrash.length, 0, "Zero offsets resolved before crash"); + + // Simulate restart & Kafka redelivery of the exact same 20 messages + const resolvedAfterRestart = []; + let crashHookFiredAgain = false; + const redeliveryResult = await processOrderBatch({ + batch: { topic: "payment-successful", partition: 0, messages }, + resolveOffset: (o) => resolvedAfterRestart.push(o), + heartbeat: async () => {}, + commitOffsetsIfNecessary: async () => {}, + isRunning: () => true, + isStale: () => false, + db, + producer, + tables, + hasDatabaseUrl: true, + onCrashAfterDbCommit: () => { + crashHookFiredAgain = true; + }, + }); + + assert.equal(crashHookFiredAgain, false, "Crash hook must not re-fire when redelivered batch has 0 new items"); + assert.equal(redeliveryResult.createdCount, 0, "Zero duplicate orders created on redelivery"); + assert.equal(redeliveryResult.skippedDuplicates, 20, "All 20 redelivered messages skipped via processed_events"); + assert.equal(state.orders.length, 20, "Total orders remains exactly 20 (0 duplicates)"); + assert.equal(resolvedAfterRestart.length, 20, "All 20 offsets resolved after restart"); + }); + + await t.test("eachMessage: unique constraint violation (23505) skips concurrent duplicate cleanly without retries or DLQ", async () => { + const dlqMessages = []; + let attempts = 0; + const { tables } = createFakeDb(); + + const db = { + select() { + return { + from() { + return { + where() { + return { limit: async () => [] }; + }, + }; + }, + }; + }, + async transaction() { + attempts++; + const err = new Error('duplicate key value violates unique constraint "processed_events_pkey"'); + err.code = "23505"; + throw err; + }, + }; + + const producer = { + async send(arg) { + dlqMessages.push(...arg.messages); + }, + }; + + const result = await processSingleOrderMessage({ + message: makeMessage(0, { eventId: "dup-evt-1", userId: "u-1", cart: [] }), + db, + producer, + tables, + hasDatabaseUrl: true, + maxRetries: 3, + retryBaseDelayMs: 1, + }); + + assert.equal(result.status, "skipped_concurrent_duplicate"); + assert.equal(attempts, 1, "Must not retry on 23505"); + assert.equal(dlqMessages.length, 0, "Must not route concurrent duplicate to DLQ"); + }); +}); diff --git a/order-service/worker.js b/order-service/worker.js new file mode 100644 index 0000000..507d33a --- /dev/null +++ b/order-service/worker.js @@ -0,0 +1,182 @@ +import { db } from "./db/index.js"; +import { sql, inArray } from "drizzle-orm"; +import { outboxEvents } from "./db/schema.js"; +import { Kafka } from "kafkajs"; + +const kafka = new Kafka({ + clientId: "order-service-worker", + brokers: [process.env.KAFKA_BROKERS || "localhost:9092"], + ...(process.env.KAFKA_SASL_USERNAME && { + ssl: true, + sasl: { + mechanism: "plain", + username: process.env.KAFKA_SASL_USERNAME, + password: process.env.KAFKA_SASL_PASSWORD, + }, + }), +}); + +const producer = kafka.producer(); + +let isRunning = false; +let loopPromise = null; +let isConnected = false; + +/** + * Process a single batch of unpublished order outbox events using + * SELECT ... FOR UPDATE SKIP LOCKED to prevent duplicate publishes across workers. + * Deterministic partition key: orderId (no fallback chains). + */ +export const processOrderOutboxBatch = async () => { + if (!db || !isConnected) return 0; + + let processedCount = 0; + + try { + await db.transaction(async (tx) => { + const rows = await tx.execute( + sql`SELECT id, topic, payload, created_at FROM outbox_events WHERE published = false AND topic = 'order-successful' ORDER BY created_at ASC LIMIT 50 FOR UPDATE SKIP LOCKED` + ); + + const events = Array.from(rows || []); + if (events.length === 0) { + return; + } + + const publishedIds = []; + const messages = []; + + for (const event of events) { + const rawPayload = typeof event.payload === "string" ? JSON.parse(event.payload) : event.payload; + + const eventId = String(rawPayload.eventId || event.id); + const correlationId = String(rawPayload.correlationId || eventId); + const causationId = String(rawPayload.causationId || eventId); + const orderId = String(rawPayload.orderId); + + const enrichedPayload = { + ...rawPayload, + eventId, + correlationId, + causationId, + orderId, + }; + + // Deterministic partition key: orderId (strictly 1 key, no fallback chains) + const partitionKey = String(orderId); + + messages.push({ + key: partitionKey, + value: JSON.stringify(enrichedPayload), + headers: { + "event-id": eventId, + "correlation-id": correlationId, + "causation-id": causationId, + "order-id": orderId, + "event-type": String(event.topic), + }, + }); + + publishedIds.push(event.id); + processedCount++; + } + + if (messages.length > 0) { + await producer.send({ + topic: "order-successful", + messages, + }); + } + + if (publishedIds.length > 0) { + await tx + .update(outboxEvents) + .set({ published: true }) + .where(inArray(outboxEvents.id, publishedIds)); + console.log(`Order Outbox Worker: Batch-published ${publishedIds.length} order-successful events`); + } + }); + } catch (err) { + console.error("Order Outbox Worker: Batch processing failed (transaction rolled back):", err.message); + } + + return processedCount; +}; + +export async function pruneOrderOutboxEvents(retentionHours = 1) { + if (!db) return 0; + try { + const res = await db.execute( + sql`DELETE FROM outbox_events WHERE published = true AND topic = 'order-successful' AND created_at < NOW() - INTERVAL '1 hour' * ${retentionHours}` + ); + const count = Number(res?.count ?? res?.rowCount ?? 0); + if (count > 0) { + console.log(`Order Outbox Pruner: Deleted ${count} published order-successful events older than ${retentionHours} hour(s).`); + } + return count; + } catch (err) { + console.error("๐Ÿšจ [CRITICAL][Order Outbox Pruner] PRUNE FAILED! Published order-successful rows are NOT being cleaned up:", err.message, err.stack || ""); + return 0; + } +} + +let lastPruned = Date.now(); +const PRUNE_INTERVAL_MS = 5 * 60 * 1000; +const RETENTION_HOURS = parseInt(process.env.OUTBOX_RETENTION_HOURS || "1", 10); + +const runLoop = async () => { + while (isRunning) { + try { + const now = Date.now(); + if (now - lastPruned > PRUNE_INTERVAL_MS) { + lastPruned = now; + await pruneOrderOutboxEvents(RETENTION_HOURS); + } + + const processedCount = await processOrderOutboxBatch(); + if (!isRunning) break; + + if (processedCount === 0) { + await new Promise((resolve) => setTimeout(resolve, 500)); + } + } catch (err) { + console.error("Order Outbox Worker: Unexpected loop error:", err); + if (isRunning) { + await new Promise((resolve) => setTimeout(resolve, 2000)); + } + } + } +}; + +export const startOrderOutboxWorker = async () => { + if (!process.env.DATABASE_URL) return; + if (isRunning) return; + + try { + await producer.connect(); + isConnected = true; + isRunning = true; + console.log("Order Outbox Worker: Connected to Kafka. Starting relay loop."); + loopPromise = runLoop(); + } catch (err) { + console.error("Order Outbox Worker: Initial Kafka Connection Error", err.message); + } +}; + +export const stopOrderOutboxWorker = async () => { + console.log("Order Outbox Worker: Stopping worker loop..."); + isRunning = false; + if (loopPromise) { + await loopPromise; + loopPromise = null; + } + if (isConnected) { + try { + await producer.disconnect(); + isConnected = false; + console.log("Order Outbox Worker: Disconnected from Kafka"); + } catch (err) { + console.error("Order Outbox Worker: Error disconnecting from Kafka", err.message); + } + } +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..75366f3 --- /dev/null +++ b/package.json @@ -0,0 +1,32 @@ +{ + "name": "streammart", + "version": "1.0.0", + "description": "StreamMart: Enterprise Event-Driven E-Commerce Microservices", + "type": "module", + "scripts": { + "stack:up": "docker compose up -d --build --wait", + "stack:down": "docker compose down", + "stack:ps": "docker compose ps", + "checkout:test": "node scripts/test-checkout.js", + "demo:outage": "node scripts/demo-outage.js", + "latency:test": "node scripts/measure-latency.js", + "test:gateway": "npm test --prefix api-gateway", + "test:payment": "npm test --prefix payment-service", + "test:order": "npm test --prefix order-service", + "test:email": "npm test --prefix email-service", + "test:analytic": "npm test --prefix analytic-service", + "test": "npm test --prefix api-gateway && npm test --prefix payment-service && npm test --prefix order-service && npm test --prefix email-service && npm test --prefix analytic-service", + "db:migrate": "node payment-service/test-db.js" + }, + "keywords": [ + "kafka", + "microservices", + "transactional-outbox", + "postgresql", + "drizzle-orm", + "docker-compose" + ], + "author": "Vipin", + "license": "ISC" +} + diff --git a/payment-service/.dockerignore b/payment-service/.dockerignore new file mode 100644 index 0000000..994358b --- /dev/null +++ b/payment-service/.dockerignore @@ -0,0 +1,5 @@ +node_modules +npm-debug.log +.env +.git +tests diff --git a/payment-service/db/index.js b/payment-service/db/index.js index fa55d28..5a22e12 100644 --- a/payment-service/db/index.js +++ b/payment-service/db/index.js @@ -2,8 +2,10 @@ import { drizzle } from 'drizzle-orm/postgres-js'; import postgres from 'postgres'; import * as schema from './schema.js'; -// We now use PostgreSQL connection string for Drizzle ORM +// PostgreSQL connection string for Drizzle ORM const connectionString = process.env.DATABASE_URL; +// Configurable DB connection pool size (defaults to 10 to match baseline, overridable via DB_POOL_MAX) +const poolMax = parseInt(process.env.DB_POOL_MAX || "10", 10); -const client = postgres(connectionString, { prepare: false }); +const client = postgres(connectionString, { max: poolMax, prepare: false }); export const db = drizzle(client, { schema }); diff --git a/payment-service/db/schema.js b/payment-service/db/schema.js index e4fc701..e2cfab9 100644 --- a/payment-service/db/schema.js +++ b/payment-service/db/schema.js @@ -1,4 +1,4 @@ -import { pgTable, uuid, text, numeric, boolean, timestamp, jsonb } from 'drizzle-orm/pg-core'; +import { pgTable, uuid, text, numeric, boolean, timestamp, jsonb, primaryKey } from 'drizzle-orm/pg-core'; export const payments = pgTable('payments', { id: uuid('id').defaultRandom().primaryKey(), @@ -23,3 +23,11 @@ export const orders = pgTable('orders', { status: text('status').notNull(), createdAt: timestamp('created_at').defaultNow().notNull(), }); + +export const processedEvents = pgTable('processed_events', { + eventId: text('event_id').notNull(), + serviceName: text('service_name').notNull(), + processedAt: timestamp('processed_at').defaultNow().notNull(), +}, (table) => [ + primaryKey({ columns: [table.eventId, table.serviceName] }) +]); diff --git a/payment-service/index.js b/payment-service/index.js index f27c89f..fc04181 100644 --- a/payment-service/index.js +++ b/payment-service/index.js @@ -1,79 +1,125 @@ import express from "express"; -import { Kafka } from "kafkajs"; import cors from "cors"; +import crypto from "node:crypto"; import { db } from "./db/index.js"; import { payments, outboxEvents } from "./db/schema.js"; -import { startOutboxWorker } from "./worker.js"; +import { startOutboxWorker, stopOutboxWorker, isRelayRunning, getRelayStatus } from "./worker.js"; const app = express(); -app.use( - cors({ - origin: "http://localhost:3000", - }) -); +app.use(cors()); app.use(express.json()); -const kafka = new Kafka({ - clientId: "payment-service", - brokers: ["localhost:9094", "localhost:9095", "localhost:9096"], +// Liveness Check: returns 200 while the payment-service process is alive and responsive +app.get("/health", (req, res) => { + return res.status(200).send("Payment Service OK"); }); -const producer = kafka.producer(); - -const connectToKafka = async () => { - try { - await producer.connect(); - console.log("Producer connected!"); - } catch (err) { - console.log("Error connecting to Kafka", err); +// Relay Status Check: returns 200 if relay loop is active, 503 if disconnected from Kafka. +// Always includes outbox pruner health and last error for visibility. +app.get("/relay-status", (req, res) => { + const status = getRelayStatus(); + if (!status.relayRunning) { + return res.status(503).json({ + status: "unhealthy", + message: "Payment Service Relay Loop Not Running", + ...status, + }); } -}; + const hasPrunerError = Boolean(status.pruner?.lastError); + return res.status(200).json({ + status: hasPrunerError ? "degraded" : "ok", + message: hasPrunerError + ? `Payment Service Relay Running (Pruner Error: ${status.pruner.lastError})` + : "Payment Service Relay Running", + ...status, + }); +}); -app.post("/", async (req, res) => { - const { cart } = req.body; - // In a real app we decrypt user token/cookie - // Now we get it securely from the API Gateway header! - const userId = req.headers['x-user-id'] || "123"; +const handlePayment = async (req, res) => { + const { cart, testCrashAfterDbCommit } = req.body || {}; + // The authenticated user ID is verified and injected by the API Gateway + const userId = req.headers["x-user-id"] || "123"; - // PERFECT TRANSACTIONAL OUTBOX PATTERN via Drizzle ORM if (process.env.DATABASE_URL) { - const amount = cart ? cart.length * 10 : 0; + const amount = cart && Array.isArray(cart) ? cart.reduce((sum, item) => sum + (Number(item.price) || 10), 0) : 0; try { - // 1. Insert Payment & Outbox Event ATOMICALLY! + // Generate unique eventId for the payment-successful event. + // As the root initiating event, correlationId and causationId match eventId. + const eventId = crypto.randomUUID(); + + // Insert Payment & Outbox Event ATOMICALLY in a single SQL transaction await db.transaction(async (tx) => { await tx.insert(payments).values({ userId: userId, amount: String(amount), - status: "completed" + status: "completed", }); await tx.insert(outboxEvents).values({ + id: eventId, topic: "payment-successful", - payload: { userId, cart }, - published: false + payload: { + eventId, + correlationId: eventId, + causationId: eventId, + userId, + cart: cart || [], + amount: String(amount), + ...(testCrashAfterDbCommit && { testCrashAfterDbCommit: true }), + }, + published: false, }); }); } catch (e) { console.error("Failed Atomic Outbox Transaction:", e); - return res.status(500).send("Database transaction failed"); + return res.status(500).json({ error: "Database transaction failed", details: e.message }); } } - // Notice: Absolutely no producer.send() here! The background worker will do it. return res.status(200).send("Payment processed and event safely queued in outbox."); -}); +}; + +// Single authoritative payment route; aliases removed +app.post("/payment", handlePayment); app.use((err, req, res, next) => { + console.error("Payment Service Error:", err); res.status(err.status || 500).send(err.message); }); +let server; if (process.env.NODE_ENV !== "test") { - app.listen(8000, () => { - startOutboxWorker(); // Safely decoupling this from the REST logic! - console.log("Payment service is running on port 8000"); + const PORT = process.env.PORT || 8000; + server = app.listen(PORT, () => { + const effectivePoolMax = parseInt(process.env.DB_POOL_MAX || "10", 10); + const effectiveBatchSend = process.env.RELAY_BATCH_SEND === "true"; + const effectiveBusyPauseMs = parseInt(process.env.RELAY_BUSY_PAUSE_MS || "25", 10); + const effectiveRetentionHours = parseInt(process.env.OUTBOX_RETENTION_HOURS || "1", 10); + console.log(`๐Ÿš€ Payment service is running on port ${PORT}`); + console.log( + `[EFFECTIVE CONFIG] payment-service: PORT=${PORT}, DB_POOL_MAX=${effectivePoolMax}, RELAY_BATCH_SEND=${effectiveBatchSend}, RELAY_BUSY_PAUSE_MS=${effectiveBusyPauseMs}, OUTBOX_RETENTION_HOURS=${effectiveRetentionHours}, KAFKA_BROKERS=${process.env.KAFKA_BROKERS || "localhost:9092"}` + ); + startOutboxWorker(); }); } +// Graceful shutdown +const shutdown = async () => { + console.log("Payment Service: SIGTERM/SIGINT received, draining connections..."); + await stopOutboxWorker(); + if (server) { + server.close(() => { + console.log("Payment Service: HTTP server closed."); + process.exit(0); + }); + } else { + process.exit(0); + } +}; + +process.on("SIGTERM", shutdown); +process.on("SIGINT", shutdown); + export default app; diff --git a/payment-service/package-lock.json b/payment-service/package-lock.json index 7cfa51b..a5fd385 100644 --- a/payment-service/package-lock.json +++ b/payment-service/package-lock.json @@ -48,21 +48,21 @@ } }, "node_modules/@babel/core": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", - "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.13.tgz", + "integrity": "sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helpers": "^7.29.7", - "@babel/parser": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-compilation-targets": "^7.29.13", + "@babel/helper-module-transforms": "^7.29.13", + "@babel/helpers": "^7.29.13", + "@babel/parser": "^7.29.13", "@babel/template": "^7.29.7", - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7", + "@babel/traverse": "^7.29.13", + "@babel/types": "^7.29.11", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -79,14 +79,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", - "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.14.tgz", + "integrity": "sha512-qSY56jgW5JnSXzuekLVil6zaOQxOCtOHidr65KkaMBw772IuAY28Qx4ZykAcDn8+FRF15qk80XzKwgSc/RYW6g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.8", - "@babel/types": "^7.29.8", + "@babel/parser": "^7.29.14", + "@babel/types": "^7.29.14", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -96,9 +96,9 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", - "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.13.tgz", + "integrity": "sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==", "dev": true, "license": "MIT", "dependencies": { @@ -137,15 +137,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", - "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.14.tgz", + "integrity": "sha512-2XDvQVd9JESaOgGc4jT2/jquTAO7ppA5noTZQqH+MmZ89yjCzScLwtCPbWtkPZylL+TLWR49IwWmk+QkRR4GsA==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7", - "@babel/traverse": "^7.29.7" + "@babel/traverse": "^7.29.14" }, "engines": { "node": ">=6.9.0" @@ -165,9 +165,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", - "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.14.tgz", + "integrity": "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==", "dev": true, "license": "MIT", "engines": { @@ -195,27 +195,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", - "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.14.tgz", + "integrity": "sha512-6E3Mi1r0B0umq6vmZa4/78q+64fqO2YY0THUdjDPKUCKhNb0yQy5NQIaPHCSD3ryTgiTss//P4JsWS80AsZ6LQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7" + "@babel/types": "^7.29.14" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", - "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.14.tgz", + "integrity": "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.29.8" + "@babel/types": "^7.29.14" }, "bin": { "parser": "bin/babel-parser.js" @@ -479,18 +479,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz", - "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.14.tgz", + "integrity": "sha512-RAdQJrBgmIH1FWvN0X+1hoDxzMzlP4cv/1Zi4dn4tG1H0cTb+rw7CzUxQJhp1f4ANd8j5vH3fy8BAWFGkBDEsA==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.8", + "@babel/generator": "^7.29.14", "@babel/helper-globals": "^7.29.7", - "@babel/parser": "^7.29.8", + "@babel/parser": "^7.29.14", "@babel/template": "^7.29.7", - "@babel/types": "^7.29.8", + "@babel/types": "^7.29.14", "debug": "^4.3.1" }, "engines": { @@ -498,13 +498,13 @@ } }, "node_modules/@babel/types": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", - "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.14.tgz", + "integrity": "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-string-parser": "^7.29.14", "@babel/helper-validator-identifier": "^7.29.7" }, "engines": { @@ -525,40 +525,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", - "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", - "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@epic-web/invariant": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz", @@ -1473,6 +1439,91 @@ "node": ">=12" } }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz", + "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1501,17 +1552,17 @@ } }, "node_modules/@jest/console": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.4.1.tgz", - "integrity": "sha512-v3bhyxUh9Hgmo5p6hAOXe14/R3ZxZDOsvHleh4B07z3m/x4/ngPUXEm9XwK4sF4u+f+P2ORb0Ge+MgpaqRMVDA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.5.2.tgz", + "integrity": "sha512-e8sQC4pCMHPBrPX7Hk8TJr+DM5dkUnImSTNag8SEWFAFAF6xIz4AJvCKapnrdHnZxep4bxw4PhG+ZbimYBMyKw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", - "jest-message-util": "30.4.1", - "jest-util": "30.4.1", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", "slash": "^3.0.0" }, "engines": { @@ -1519,18 +1570,18 @@ } }, "node_modules/@jest/core": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.4.2.tgz", - "integrity": "sha512-TZJA6cPJUFxoWhxaLo8t0VX/MZX2wPWr0uIDvLSHIvN4gu9h02vSzqI2kBADG1ExqQlC+cY09xKMSreivvrChQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.5.2.tgz", + "integrity": "sha512-/jqvFWoJF7LV1a6AUpYMbMm+2yIYsHJfR474H0SCzr9k8tnO/jl9wRg6zSG6lxgf6EozNlCG4amFzWsbZSvvZA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.4.1", - "@jest/pattern": "30.4.0", - "@jest/reporters": "30.4.1", - "@jest/test-result": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", + "@jest/console": "30.5.2", + "@jest/pattern": "30.5.0", + "@jest/reporters": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", @@ -1538,20 +1589,20 @@ "exit-x": "^0.2.2", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.11", - "jest-changed-files": "30.4.1", - "jest-config": "30.4.2", - "jest-haste-map": "30.4.1", - "jest-message-util": "30.4.1", - "jest-regex-util": "30.4.0", - "jest-resolve": "30.4.1", - "jest-resolve-dependencies": "30.4.2", - "jest-runner": "30.4.2", - "jest-runtime": "30.4.2", - "jest-snapshot": "30.4.1", - "jest-util": "30.4.1", - "jest-validate": "30.4.1", - "jest-watcher": "30.4.1", - "pretty-format": "30.4.1", + "jest-changed-files": "30.5.1", + "jest-config": "30.5.2", + "jest-haste-map": "30.5.1", + "jest-message-util": "30.5.1", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-resolve-dependencies": "30.5.2", + "jest-runner": "30.5.2", + "jest-runtime": "30.5.2", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", + "jest-watcher": "30.5.2", + "pretty-format": "30.5.1", "slash": "^3.0.0" }, "engines": { @@ -1567,9 +1618,9 @@ } }, "node_modules/@jest/diff-sequences": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.4.0.tgz", - "integrity": "sha512-zOpzlfUs45l6u7jm39qr87JCHUDsaeCtvL+kQe/Vn9jSnRB4/5IPXISm0h9I1vZW/o00Kn4UTJ2MOlhnUGwv3g==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.5.0.tgz", + "integrity": "sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==", "dev": true, "license": "MIT", "engines": { @@ -1577,70 +1628,70 @@ } }, "node_modules/@jest/environment": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.4.1.tgz", - "integrity": "sha512-AK9yNRqgKxiabqMoe4oW+3/TSSeV8vkdC7BGaxZdU0AFXfOpofTLqdru2GXKZghP3sdgwE9XXpnVwfZ8JnFV4w==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.5.2.tgz", + "integrity": "sha512-nwFPOUMbmsjNNRCpnJpB9HbSZu4C07wDDds++5j+j1MezzPLxMPDdbdUVjr2o4RULDOValnDd70taPFI1EtxAg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/fake-timers": "30.4.1", - "@jest/types": "30.4.1", + "@jest/fake-timers": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", - "jest-mock": "30.4.1" + "jest-mock": "30.5.2" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.4.1.tgz", - "integrity": "sha512-ginrj6TMgh2GshLUGCjO94Ptx9HhdZA/I6A9iUfyeLKFtdAjnKzHDgzgP9HYQgbxM1lbXScQ2eUBz2lGeVDPWA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.5.2.tgz", + "integrity": "sha512-2E+1Pg6jJxbRjLNLpciC71iri/3qsKJL222/aXJEFwC0VdUSvfS+JZQQLEVjUYYc8t8pQu2MGE3cF2+bNTYRsg==", "dev": true, "license": "MIT", "dependencies": { - "expect": "30.4.1", - "jest-snapshot": "30.4.1" + "expect": "30.5.2", + "jest-snapshot": "30.5.2" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.4.1.tgz", - "integrity": "sha512-ZBn5CglH8fBsQsvs4VWNzD4aWfUYks+IdOOQU3MEK71ol/BcVm+P+rtb1KpiFBpSWSCE27uOahyyf1vfqOVbcQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.5.2.tgz", + "integrity": "sha512-d/HOLSrJUlBIl6n3LzOa7cjW3xdePm5H5gQw2lixZ/0h157l9sw3mLblzFqnPcTbhDzhRQdBOX3A3KcG73nm5Q==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0" + "@jest/get-type": "30.5.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.4.1.tgz", - "integrity": "sha512-iW5umdmfPeWzehrVhugFQZqCchSCud5S1l2YT0O9ZhjRR0ExclANDZkiSBwzqtnlOn0J1JXvO+HZ6rkuyOVOgQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.5.2.tgz", + "integrity": "sha512-GKk0h0tKT5SpDPxDhPg3r9mm5s8/YCBzVNMOGdRiQXwUiMsjU10mVPlMaQstH6/cu50vOb8N9oQUMETHuwwxKw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "@sinonjs/fake-timers": "^15.4.0", "@types/node": "*", - "jest-message-util": "30.4.1", - "jest-mock": "30.4.1", - "jest-util": "30.4.1" + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-util": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/get-type": { - "version": "30.1.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", - "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.5.0.tgz", + "integrity": "sha512-9/2VUPitAjmBzbvDvqrxmvB7BzWsBW0WmkkojX1ODuxX1NLGxx9gfaZpHB0z8DtJ9uhGNmZG/VXBhf8uO0OV8Q==", "dev": true, "license": "MIT", "engines": { @@ -1648,62 +1699,78 @@ } }, "node_modules/@jest/globals": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.4.1.tgz", - "integrity": "sha512-ZbuY4cmXC8DkxYjfvT2DbcHWL2T6vmsMhXCDcmTB2T0y0gaezBI77ufq5ZAIdcRkYZ7NEQEDg1xFeKbxUJ5v5Q==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.5.2.tgz", + "integrity": "sha512-62zfS+dL+M5aTNHXCNLyqD+j4oqxTIzDYrZbpqMP8Yn+gvlAGyzC6BSPNb1ZmFOakV1RtFYX/O3FCQXSWmQdgg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.4.1", - "@jest/expect": "30.4.1", - "@jest/types": "30.4.1", - "jest-mock": "30.4.1" + "@jest/environment": "30.5.2", + "@jest/expect": "30.5.2", + "@jest/types": "30.5.1", + "jest-mock": "30.5.2" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/pattern": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.4.0.tgz", - "integrity": "sha512-RAWn3+f9u8BsHijKJ71uHcFp6vmyEt6VvoWXkl6hKF3qVIuWNmudVjg12DlBPGup/frIl5UcUlH5HfEuvHpEXg==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.5.0.tgz", + "integrity": "sha512-HdNQYSdRTEBNrginaqzQtTjG0HRMfrra/z6Ok7uL3S87vSlarIVohEsJsSj5edu3MiHoHjAkvPROz5ZjoKai+w==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", - "jest-regex-util": "30.4.0" + "jest-regex-util": "30.5.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/@jest/react-is-18": { + "name": "react-is", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/react-is-19": { + "name": "react-is", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.1.tgz", + "integrity": "sha512-RRieF6IyxQBkcK6pP8xOHprLTPW6QjRkbGdImtqNme+/hYVwCZkLQLdlZGOhUqXwkS9IEynaGvPJtv6XB/cz0Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@jest/reporters": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.4.1.tgz", - "integrity": "sha512-/SnkPCzEQpUaBH81kjdEdDdo2WZl5hxw+BmLDGWjRkm8o7XlhjwsU36cqwe5PGBE5WYpBvDzRSdXx9rbGuJtNA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.5.2.tgz", + "integrity": "sha512-ev6E9iG73twQcfAfoTnviuYkr3yOrYbzAtMFCimv2fxHXPIp9PBt2u1wNMt0aYWgl8FPwIcS8oqRJg6alnht4Q==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "30.4.1", - "@jest/test-result": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", - "@jridgewell/trace-mapping": "^0.3.25", + "@jest/console": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", + "@jridgewell/trace-mapping": "^0.3.31", "@types/node": "*", "chalk": "^4.1.2", "collect-v8-coverage": "^1.0.2", "exit-x": "^0.2.2", - "glob": "^10.5.0", + "glob": "^13.0.6", "graceful-fs": "^4.2.11", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^5.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "30.4.1", - "jest-util": "30.4.1", - "jest-worker": "30.4.1", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", + "jest-worker": "30.5.1", "slash": "^3.0.0", "string-length": "^4.0.2", "v8-to-istanbul": "^9.0.1" @@ -1721,9 +1788,9 @@ } }, "node_modules/@jest/schemas": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.4.1.tgz", - "integrity": "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.5.0.tgz", + "integrity": "sha512-/hunigyNpc4RCjC0VaW3f5RCUZVM2+WQ65qP7z083Gmvac7or2LI50XVNOtE4YPgBpV0yxYiAgorAPGniCoJmg==", "dev": true, "license": "MIT", "dependencies": { @@ -1734,13 +1801,13 @@ } }, "node_modules/@jest/snapshot-utils": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.4.1.tgz", - "integrity": "sha512-ObY4ljvQ95mt6iwKtVLetR/4yXiAgl3H4nJxhztr0MTjrN97TwDYrnCp/kF60Ec9HdhkWTHSu+Hg05aXfngpOA==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.5.1.tgz", + "integrity": "sha512-V3wnxNtiVmw5PPVg433Cn3VdXnsOeu/ofLw3KC04Bn2y1wIlU5kozXQn48rhrgj/02LrCVtntTEF1yBha0XSUw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "natural-compare": "^1.4.0" @@ -1750,14 +1817,15 @@ } }, "node_modules/@jest/source-map": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.0.1.tgz", - "integrity": "sha512-MIRWMUUR3sdbP36oyNyhbThLHyJ2eEDClPCiHVbrYAe5g3CHRArIVpBw7cdSB5fr+ofSfIb2Tnsw8iEHL0PYQg==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.5.2.tgz", + "integrity": "sha512-c5CehvkbfHX6yyNg7bMn2ylqlp9AHXuZ/3hPH/Lh5bxD/vefd/lV9HBjMqXef9yQNqkdwyZvkLSVSwB38hy8Qw==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", + "@jridgewell/trace-mapping": "^0.3.31", "callsites": "^3.1.0", + "convert-source-map": "^2.0.0", "graceful-fs": "^4.2.11" }, "engines": { @@ -1765,14 +1833,14 @@ } }, "node_modules/@jest/test-result": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.4.1.tgz", - "integrity": "sha512-/ZG7pgEiOmmWkN9TplKbOu4id2N5lh7FHwRwlkgBVAzGdRH+OkkQ8wX/kIxg4zmd3ZQvAL1RwL2yWsvNYYECTw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.5.2.tgz", + "integrity": "sha512-eO6YU5rsLfs60ne694e0IAmRgeBnoA8mu0nlxXDbl/1j5km0o2vO9/VbbUIKIH+WRKKEI+ELgwraRGn2Lhep8g==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.4.1", - "@jest/types": "30.4.1", + "@jest/console": "30.5.2", + "@jest/types": "30.5.1", "@types/istanbul-lib-coverage": "^2.0.6", "collect-v8-coverage": "^1.0.2" }, @@ -1781,15 +1849,15 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.4.1.tgz", - "integrity": "sha512-PeYE+4td5rKjoRPxztObrXU+H8hsjZfxKMXOcmrr34JerSyB/ROOxbbicz8B7A5j9R9VayDnVPvBmedqCsFCdw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.5.2.tgz", + "integrity": "sha512-bmij8jZyYAC47ExT2GeP7PcrlwSNS+Bp3KeRuBH88gpcxqDv6fljN8PemS4J/lLZ79xb6mpaennQTTq0zUAVVg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "30.4.1", + "@jest/test-result": "30.5.2", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.4.1", + "jest-haste-map": "30.5.1", "slash": "^3.0.0" }, "engines": { @@ -1797,23 +1865,23 @@ } }, "node_modules/@jest/transform": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.4.1.tgz", - "integrity": "sha512-Wz0LyktlTvRefoymh+n64hQ84KNXsRGcwdoZ8CSa0Ea+fgYcHZlnk+hDP7v2MS7il2bQ5uTEIxf4/NNfhMN4KQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.5.2.tgz", + "integrity": "sha512-LBGwmaE886C41jDZ65eqR1YbXM7642MK3ZhTowZd5+xDlrDLuf4ePuDdDmVSvcr8NTVJ3MqxLkMbUCzuigUaoQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.27.4", - "@jest/types": "30.4.1", - "@jridgewell/trace-mapping": "^0.3.25", - "babel-plugin-istanbul": "^7.0.1", + "@jest/types": "30.5.1", + "@jridgewell/trace-mapping": "^0.3.31", + "babel-plugin-istanbul": "^8.0.0", "chalk": "^4.1.2", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.4.1", - "jest-regex-util": "30.4.0", - "jest-util": "30.4.1", + "jest-haste-map": "30.5.1", + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", "pirates": "^4.0.7", "slash": "^3.0.0", "write-file-atomic": "^5.0.1" @@ -1823,14 +1891,14 @@ } }, "node_modules/@jest/types": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.4.1.tgz", - "integrity": "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.5.1.tgz", + "integrity": "sha512-LvVYn83nnXPl+Rg98nvcFgjx6nRMTArhSn6RAX/w3ELn54S8A42TYZvsCMdGUqTM8S0wyXbtlQdU6Hi6dykj9g==", "dev": true, "license": "MIT", "dependencies": { - "@jest/pattern": "30.4.0", - "@jest/schemas": "30.4.1", + "@jest/pattern": "30.5.0", + "@jest/schemas": "30.5.0", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", @@ -1864,9 +1932,9 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", "dev": true, "license": "MIT", "engines": { @@ -1874,9 +1942,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", "dev": true, "license": "MIT" }, @@ -1891,28 +1959,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.3.tgz", - "integrity": "sha512-UMduMbqO5s5zF2NkNacMT/yK5Y5QiKvWr2+50bzIIxFDwVJ2h49b+oyjaCGPhJxd2/gC2x39EHv/gHVuu36x2Q==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@tybys/wasm-util": "^0.10.3" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=23.5.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.4", - "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4" - } - }, "node_modules/@noble/hashes": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", @@ -1936,99 +1982,375 @@ "@noble/hashes": "^1.1.5" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "node_modules/@parcel/watcher": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.6.0.tgz", + "integrity": "sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==", "dev": true, + "hasInstallScript": true, "license": "MIT", - "optional": true, + "dependencies": { + "detect-libc": "^2.0.3", + "is-glob": "^4.0.3", + "node-addon-api": "^7.0.0", + "picomatch": "^4.0.4" + }, "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgr/core": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.3.6.tgz", - "integrity": "sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==", + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.6.0", + "@parcel/watcher-darwin-arm64": "2.6.0", + "@parcel/watcher-darwin-x64": "2.6.0", + "@parcel/watcher-freebsd-x64": "2.6.0", + "@parcel/watcher-linux-arm-glibc": "2.6.0", + "@parcel/watcher-linux-arm-musl": "2.6.0", + "@parcel/watcher-linux-arm64-glibc": "2.6.0", + "@parcel/watcher-linux-arm64-musl": "2.6.0", + "@parcel/watcher-linux-x64-glibc": "2.6.0", + "@parcel/watcher-linux-x64-musl": "2.6.0", + "@parcel/watcher-win32-arm64": "2.6.0", + "@parcel/watcher-win32-x64": "2.6.0" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.6.0.tgz", + "integrity": "sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": ">= 10.0.0" }, "funding": { - "url": "https://opencollective.com/pkgr" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.34.52", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.52.tgz", - "integrity": "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@sinonjs/fake-timers": { - "version": "15.4.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.4.0.tgz", - "integrity": "sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==", + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.6.0.tgz", + "integrity": "sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", - "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.6.0.tgz", + "integrity": "sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", "optional": true, - "dependencies": { - "tslib": "^2.4.0" + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.6.0.tgz", + "integrity": "sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.6.0.tgz", + "integrity": "sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.6.0.tgz", + "integrity": "sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.6.0.tgz", + "integrity": "sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.6.0.tgz", + "integrity": "sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.6.0.tgz", + "integrity": "sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.6.0.tgz", + "integrity": "sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.6.0.tgz", + "integrity": "sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.6.0.tgz", + "integrity": "sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.3.6.tgz", + "integrity": "sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.34.52", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.52.tgz", + "integrity": "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.5.0.tgz", + "integrity": "sha512-i7HpIYIsUmdSTQbtBjs2b3VqMgDsVDWfzVPV3MuUrXVqJNZmzFB8YJeM9SPms2bGg5zg7HvKH31sPS1WoLLRFg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } @@ -2071,13 +2393,13 @@ } }, "node_modules/@types/node": { - "version": "26.2.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.2.0.tgz", - "integrity": "sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg==", + "version": "26.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", + "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~8.3.0" + "undici-types": "~8.9.0" } }, "node_modules/@types/stack-utils": { @@ -2105,16 +2427,16 @@ "license": "MIT" }, "node_modules/@ungap/structured-clone": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.3.tgz", - "integrity": "sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", "dev": true, "license": "ISC" }, "node_modules/@unrs/resolver-binding-android-arm-eabi": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz", - "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.13.0.tgz", + "integrity": "sha512-60E5mvmIiW+i1E/HYeSX4iE4A8s9NJSGYPu7UM0DJght1c2tTkWwuyDyAwzsEXhKM/XbbndfnTiXdfrf27d2hw==", "cpu": [ "arm" ], @@ -2126,9 +2448,9 @@ ] }, "node_modules/@unrs/resolver-binding-android-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz", - "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.13.0.tgz", + "integrity": "sha512-qlh/JR3Tuy1cJ7xtf5pR4ykvLiK6os7X7EL2+zXZbrVc/s+yB8DoFdQrCAW9/a2TOxPVbR7QVNpkPWh7UWIsEQ==", "cpu": [ "arm64" ], @@ -2140,9 +2462,9 @@ ] }, "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz", - "integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.13.0.tgz", + "integrity": "sha512-yynnnnJXUC99WeD1GfvuXPKsKNfvgzGYC2eRayFnUfsHVROjqrbFOkFQLZiSx1H8+PLy5BzU8vqyPyLqbRfeBQ==", "cpu": [ "arm64" ], @@ -2154,9 +2476,9 @@ ] }, "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz", - "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.13.0.tgz", + "integrity": "sha512-t8PXE0Ip9tmGyhRlfVsnEbzGM5iSvJIeNIXciUACjzpg0mmPs13fGv2x7W8sBa0S8zbIiohxKXS9fL/LXW/ERQ==", "cpu": [ "x64" ], @@ -2168,9 +2490,9 @@ ] }, "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz", - "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.13.0.tgz", + "integrity": "sha512-qdtl9GDWDoDx6rhzF4RU5SJutV3lcLOiTiyqD6nBxYfEO6lAgLNukfrA+HJ2u2OiyWvV8JW5iEWD3LoONw7lYA==", "cpu": [ "x64" ], @@ -2182,9 +2504,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz", - "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.13.0.tgz", + "integrity": "sha512-VrMUVwdrScTarsh4B6aUhTtziUavSlglo4Hi8XZ6CpAe4+j3nquY+XoP+tYkiSBDsXZ8386ne4pv4YYYBNi02w==", "cpu": [ "arm" ], @@ -2196,9 +2518,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz", - "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.13.0.tgz", + "integrity": "sha512-zSbTVwaxiTC+zYJ9xVNTC6c+BYO/kOV/odcTI3bHuFFXa+XmjLoUkb/8UxsZeU5YF4K000m17wrXoTblNWuzOg==", "cpu": [ "arm" ], @@ -2210,9 +2532,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz", - "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.13.0.tgz", + "integrity": "sha512-Z/Rax87moZHsuvJ8awdfP+zrMlsCt3d7mggUPIiPe32KpeagimyzJWnZSMQoV67an9uVQghyh92Pc0VprITnYA==", "cpu": [ "arm64" ], @@ -2224,9 +2546,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz", - "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.13.0.tgz", + "integrity": "sha512-oUzXz8hNvFLNEAag8lBKJe1euiV2dmGHAR+eQ5fNpsZO0F1K7IMRb4J6pqYsd7uLMRQNPiu5A1WKUJHbFLWbbw==", "cpu": [ "arm64" ], @@ -2238,9 +2560,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz", - "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.13.0.tgz", + "integrity": "sha512-BxhGYvZBg0YrvNOeSEGR3eNklwXYy0mUJk7oeGJvZoQMKM68zYvbbf52+fQI3Le4X0fW276FTKIoTwjpMob80A==", "cpu": [ "loong64" ], @@ -2252,9 +2574,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-loong64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz", - "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.13.0.tgz", + "integrity": "sha512-nZcIuup9Ar3gAlqoZfX/KW6x83TMI11tLpCjldZG5M1KeY8qNUPNJJ71+sPvG8HMBpoh+ix1pAm5gkMFvcSAcQ==", "cpu": [ "loong64" ], @@ -2266,9 +2588,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz", - "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.13.0.tgz", + "integrity": "sha512-AG6AgdDrkRNjAPwD/cftFJGgZUWCiJX+E8vpYCDEnwFHLTHZ7ppBiU6/vyPPwrfjcPUPQCDbbxE/eZUXsx49jQ==", "cpu": [ "ppc64" ], @@ -2280,9 +2602,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz", - "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.13.0.tgz", + "integrity": "sha512-6vOqYGcAmzpRWpUURWutzvpf1qJ6eOu5cfYObdtPJnzZ0+Kw4cw+ZkZJqIYEh8fPuTBwSYDL/FwlUhma1G/JVQ==", "cpu": [ "riscv64" ], @@ -2294,9 +2616,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz", - "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.13.0.tgz", + "integrity": "sha512-4HeIn0S2KVUowK0A+EweXrDvZ8CKHEfTtif0kx9vt3ORNsqcXNFFIFnHE0tizma3/Gt5OGrU2ovYNuj+D/bN4g==", "cpu": [ "riscv64" ], @@ -2308,9 +2630,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz", - "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.13.0.tgz", + "integrity": "sha512-JfkvqY7NZbxyhexLE+g6Z8Hsx4utHOGaVazAVghPiBn8Upw2iERZPpKYnW1FBVU4WStv/BiIsoK/Muke0E7asA==", "cpu": [ "s390x" ], @@ -2322,9 +2644,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz", - "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.13.0.tgz", + "integrity": "sha512-iwjLeVdZo/8v5OKAeRIC+4VQV045t1EPZr5B/AVLgUQ04IdtNthWzg6not2cNjZgH2gHpSf4fOXMmN83aLO1FA==", "cpu": [ "x64" ], @@ -2336,9 +2658,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz", - "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.13.0.tgz", + "integrity": "sha512-TOh1fqOjyq1OPoht3BDLd7Y+HeMJRwd5g2VNmCQclknEbjp4py5GFRmT4L/rOybF5Af8q0LT9zHs2WGkwlqtrw==", "cpu": [ "x64" ], @@ -2350,9 +2672,9 @@ ] }, "node_modules/@unrs/resolver-binding-openharmony-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz", - "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.13.0.tgz", + "integrity": "sha512-3T2MNtF2dd1yjaXCVqrsi+/3VZeksEzU1hygPzqqkBLVVjn+2iJzXEkxxCKIVFrWnpmEbazeHJp/ruYD0RUVWA==", "cpu": [ "arm64" ], @@ -2363,29 +2685,10 @@ "openharmony" ] }, - "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz", - "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.10.0", - "@emnapi/runtime": "1.10.0", - "@napi-rs/wasm-runtime": "^1.1.4" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", - "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.13.0.tgz", + "integrity": "sha512-hKWfSLiN3L4cIxg0jrpyP/66AXLTcyD37jmSn//rGdOUYGlizYxTEFdJ+GZbp2NnaML3YS/A73nCysze8FaJdg==", "cpu": [ "arm64" ], @@ -2397,9 +2700,9 @@ ] }, "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz", - "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.13.0.tgz", + "integrity": "sha512-N4gDKkDoiyIQEcn3vTqe2ksRxUAtBvQ8c5TiT+WonSa6FHgCAY5+RggnZ134hXJoRj57JEjv4/m+i/pAKHWrTQ==", "cpu": [ "ia32" ], @@ -2411,9 +2714,9 @@ ] }, "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz", - "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.13.0.tgz", + "integrity": "sha512-DpLMlAqlrk4zBVK3DiDjwKD0oq7pZNy+8BiIBRuByqb6dm5jsdoLMhIiyh/xR7+WejaW/1Ui+XgbgMNa4+zWJg==", "cpu": [ "x64" ], @@ -2454,16 +2757,13 @@ } }, "node_modules/ansi-regex": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.3.0.tgz", - "integrity": "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=8" } }, "node_modules/ansi-styles": { @@ -2534,16 +2834,16 @@ "license": "MIT" }, "node_modules/babel-jest": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.4.1.tgz", - "integrity": "sha512-fATAbM8piYxkiXQp3RBXmZHxZVNJZAVXXfyeyCN2Tida3+qJ8ea9UxhiJ2y4fLO90ZImKt6k9FlcH2+rLkJGhw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.5.2.tgz", + "integrity": "sha512-ES8WeJ2fNWPEDunyAtUfJ12nHyaWUloCHdkfK2oW5uSoQSUmjNKdWiGaXJITJwvFEWoD/evHEg/QoCXAvLaQqQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/transform": "30.4.1", + "@jest/transform": "30.5.2", "@types/babel__core": "^7.20.5", - "babel-plugin-istanbul": "^7.0.1", - "babel-preset-jest": "30.4.0", + "babel-plugin-istanbul": "^8.0.0", + "babel-preset-jest": "30.5.0", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "slash": "^3.0.0" @@ -2556,9 +2856,9 @@ } }, "node_modules/babel-plugin-istanbul": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz", - "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-8.0.2.tgz", + "integrity": "sha512-bXWZeWQvvCZcD2uHLWVbitr4s1+YqILBbWB/szXKtHXt6crLlD6mqxHZ0qWy2X/Xx5RtQvqqW80JHAXMlp+y1Q==", "dev": true, "license": "BSD-3-Clause", "workspaces": [ @@ -2569,16 +2869,16 @@ "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.3", "istanbul-lib-instrument": "^6.0.2", - "test-exclude": "^6.0.0" + "test-exclude": "^7.0.1" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/babel-plugin-jest-hoist": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.4.0.tgz", - "integrity": "sha512-9EdtWM/sSfXLOGLwSn+GS6pIXyBnL07/8gyJlwFXjWy4DxMOyItqyUT29d4lQiS380EZwYlX7/At4PgBS+m2aA==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.5.0.tgz", + "integrity": "sha512-gtGo1B+u14jrZQv6TdSWIWkTqclboo7Qn+dFAGUOIuXLFuJKAdg3U5MIWzZnW4vfUb4dX9skmAMiby86e/SF4A==", "dev": true, "license": "MIT", "dependencies": { @@ -2616,33 +2916,36 @@ } }, "node_modules/babel-preset-jest": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.4.0.tgz", - "integrity": "sha512-lBY4jxsNmCnSiu7kquw8ZC9F4+XLMOKypT3RnNHPvU2Kpd4W0xaPuLr5ZkRyOsvLYAY4yaW1ZwTW4xB7NIiZzg==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.5.0.tgz", + "integrity": "sha512-ZGPn5ClP4lBDpuOK8W1yQIOy359HmbnZv3suucAlIe+SEE9yDsxV4S2PjSbH2Vc97U+WmzYD7vw3kr8NsQ/i6w==", "dev": true, "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "30.4.0", + "babel-plugin-jest-hoist": "30.5.0", "babel-preset-current-node-syntax": "^1.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { - "@babel/core": "^7.11.0 || ^8.0.0-beta.1" + "@babel/core": "^7.11.0 || ^8.0.0-beta.1 || ^8.0.0" } }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/baseline-browser-mapping": { - "version": "2.11.18", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.18.tgz", - "integrity": "sha512-1iEmLEYSiE1SeBoAfPo/Mnx3PzfzHUkDK61ASkCpuk3YXugYLH5DYK1SzqV55F8FMI6s0F+/tCP7Polz1QRjxw==", + "version": "2.11.38", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.38.tgz", + "integrity": "sha512-rMgy5YW7x28SMfXHLlVZDBqlWzYZ0x2rVR/6FWrNBF0chjigARK1H6nM0hKA1Um3kPOlkQFVtjJs00d2N1ezuw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2653,39 +2956,59 @@ } }, "node_modules/body-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", - "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.4.0.tgz", + "integrity": "sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ==", "license": "MIT", "dependencies": { "bytes": "^3.1.2", - "content-type": "^1.0.5", - "debug": "^4.4.0", - "http-errors": "^2.0.0", - "iconv-lite": "^0.6.3", + "content-type": "^2.1.0", + "debug": "^4.4.3", + "http-errors": "^2.0.1", + "iconv-lite": "^0.7.3", "on-finished": "^2.4.1", - "qs": "^6.14.0", - "raw-body": "^3.0.0", - "type-is": "^2.0.0" + "qs": "^6.16.1", + "raw-body": "^3.0.2", + "type-is": "^2.1.0" }, "engines": { "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/body-parser/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/brace-expansion": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", - "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz", + "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/browserslist": { - "version": "4.28.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.8.tgz", - "integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==", + "version": "4.29.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.6.tgz", + "integrity": "sha512-CmVVIQ3RVc5HxYEc9X84GvxK/C8C1wH8TlKAiO7uTxF8PDwt7r8t9Qk3J9NkMOVzX5O/HbLv3yzxZg9HPrnI9w==", "dev": true, "funding": [ { @@ -2703,11 +3026,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.11.12", - "caniuse-lite": "^1.0.30001809", - "electron-to-chromium": "^1.5.402", - "node-releases": "^2.0.53", - "update-browserslist-db": "^1.3.0" + "baseline-browser-mapping": "^2.11.37", + "caniuse-lite": "^1.0.30001826", + "electron-to-chromium": "^1.5.486", + "node-releases": "^2.0.64", + "update-browserslist-db": "^1.4.0" }, "bin": { "browserslist": "cli.js" @@ -2717,11 +3040,11 @@ } }, "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.2.tgz", + "integrity": "sha512-V2o8YS2EhrKMO9AumnkK0ynynfFlsajpYupwq7S46H5mhcanwxDkNTw3K67wPIcKTH1ffkA4vhMOtAc7gRmPZw==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { "node-int64": "^0.4.0" } @@ -2792,9 +3115,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001809", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001809.tgz", - "integrity": "sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==", + "version": "1.0.30001826", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001826.tgz", + "integrity": "sha512-wTB+9tIbLro/BCXwLuNV1meHE4L9dS6dArMDwgYfNBPMYScqClHyGunhkCSDtHhe/69Xl0sHlKgBVZ+fNsYtWA==", "dev": true, "funding": [ { @@ -2840,9 +3163,9 @@ } }, "node_modules/ci-info": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", - "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.5.0.tgz", + "integrity": "sha512-d1uM8k5UZEyPza1n/MG3ko8nKupKN0KJpFsipgPcgaCCvV+IqIfJ+NzTjetlLM+UcXZx3+cLrNr76+eAO7G1Mw==", "dev": true, "funding": [ { @@ -2856,9 +3179,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.1.tgz", - "integrity": "sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.3.0.tgz", + "integrity": "sha512-lmNyBzi6iYiqyrExTctfmjd8tInx+dHu9PBomTfH5RXS53c27JMFJgzNv5TyAnm3PgGf+MLy0+Ws41/HlVxdKQ==", "dev": true, "license": "MIT" }, @@ -2868,76 +3191,13 @@ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=12" } }, "node_modules/co": { @@ -3001,13 +3261,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, "node_modules/content-disposition": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", @@ -3108,9 +3361,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -3168,6 +3421,16 @@ "node": ">= 0.8" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -3190,9 +3453,9 @@ } }, "node_modules/drizzle-kit": { - "version": "0.31.10", - "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.31.10.tgz", - "integrity": "sha512-7OZcmQUrdGI+DUNNsKBn1aW8qSoKuTH7d0mYgSP8bAzdFzKoovxEFnoGQp2dVs82EOJeYycqRtciopszwUf8bw==", + "version": "0.31.11", + "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.31.11.tgz", + "integrity": "sha512-YCYqxTLIB2OCqf6w9/Vef13baBVbwQIPcbT4Y56AfO6B9ajZhDhD8Jkveg/hJvT/iuMloKD/IYYkyMMNhr7Kqg==", "dev": true, "license": "MIT", "dependencies": { @@ -3358,9 +3621,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.413", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.413.tgz", - "integrity": "sha512-F1XPKvt7HVfly5WND90ec16nFsdr4g5x/cVUP3EqjeyXynupabGDqpMa84wwvuYGDnldXLBz6DLXyZXWO9TPvw==", + "version": "1.5.490", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.490.tgz", + "integrity": "sha512-I0dPyEsiaYAlbGJlr0SdRRGSWk9BpOz8AIo/4f93A6bAGuN3YafmT71rpss72SA05isaAkcAOYcW0F0H48om4Q==", "dev": true, "license": "ISC" }, @@ -3378,9 +3641,9 @@ } }, "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, @@ -3421,6 +3684,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", @@ -3564,13 +3834,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/execa/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, "node_modules/exit-x": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/exit-x/-/exit-x-0.2.2.tgz", @@ -3582,18 +3845,18 @@ } }, "node_modules/expect": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.4.1.tgz", - "integrity": "sha512-PMARsyh/JtqC20HoGqlFcIlQAyqUtW4PlI1rup1uhYJtKuwAjbvWi3GQMAn+STdHum/dk8xrKfUM1+5SAwpolA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.5.2.tgz", + "integrity": "sha512-0LNuMvs8/5mRYhnCR4k+lGV7fqPMs6Bnksda4S3zsCUmdxBpAn4zU4NNzXdq1pMKe/H4W5t/zVIDSJ/H3e0vDA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/expect-utils": "30.4.1", - "@jest/get-type": "30.1.0", - "jest-matcher-utils": "30.4.1", - "jest-message-util": "30.4.1", - "jest-mock": "30.4.1", - "jest-util": "30.4.1" + "@jest/expect-utils": "30.5.2", + "@jest/get-type": "30.5.0", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-util": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -3656,13 +3919,31 @@ "license": "MIT" }, "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.4.tgz", + "integrity": "sha512-tGQtaoYisPDriJBN0mT5yZSyNETnJGA1gTYxaVRAE5KUO3LI9kPUc9WIu8JXcxaIci+faIKlzXqXyPgrmubtBQ==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "bser": "2.1.1" + "bser": "2.1.2" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, "node_modules/finalhandler": { @@ -3713,6 +3994,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", @@ -3789,13 +4083,6 @@ "node": ">= 0.8" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3914,22 +4201,18 @@ } }, "node_modules/glob": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", - "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "version": "13.0.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.7.tgz", + "integrity": "sha512-wfsFgXQ8A3SEI9XGf7Nl3Y9l7ffSrGh7SUCT7vU/2CzYPep9kjxAn1S40F9OPKxAMGCVl7HtNlJhrCJUeUq83g==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" }, - "bin": { - "glob": "dist/esm/bin.mjs" + "engines": { + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3948,11 +4231,11 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz", + "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==", "dev": true, - "license": "ISC" + "license": "BlueOak-1.0.0" }, "node_modules/has-flag": { "version": "4.0.0", @@ -4012,28 +4295,23 @@ "license": "MIT" }, "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", "license": "MIT", "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" }, "engines": { "node": ">= 0.8" - } - }, - "node_modules/http-errors/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/human-signals": { @@ -4047,15 +4325,19 @@ } }, "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/import-local": { @@ -4088,18 +4370,6 @@ "node": ">=0.8.19" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -4122,6 +4392,16 @@ "dev": true, "license": "MIT" }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -4142,6 +4422,19 @@ "node": ">=6" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-promise": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", @@ -4196,9 +4489,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", "dev": true, "license": "ISC", "bin": { @@ -4269,16 +4562,16 @@ } }, "node_modules/jest": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-30.4.2.tgz", - "integrity": "sha512-Yi1jqNC/Oq0N4hBgNH/YvBpP1P57QqundgytzYqy3yqAa7NZPNjSoi4SGbRAXDMdBzNE6xBCi5U7RgfrvMEUVQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-30.5.2.tgz", + "integrity": "sha512-3gnpdBIza8ijCl3iMV9ChE3hSt1+46865qqod863gQtJr1DixOkAU5DoGbi3u+XlRcw++BhZQMu/y4xBdHBvSQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "30.4.2", - "@jest/types": "30.4.1", + "@jest/core": "30.5.2", + "@jest/types": "30.5.1", "import-local": "^3.2.0", - "jest-cli": "30.4.2" + "jest-cli": "30.5.2" }, "bin": { "jest": "bin/jest.js" @@ -4296,14 +4589,14 @@ } }, "node_modules/jest-changed-files": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.4.1.tgz", - "integrity": "sha512-IuctmYrxi21iOSOaIXpJWalHyPAsVv0GeBHKDn8C1CA4W5htHn7INL+wdnL4Bo0+olEndvAFkmb++tIQJG+vvg==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.5.1.tgz", + "integrity": "sha512-0+bvMM/ENhDI29Z8q1r4HxiDIi4G5tnBmSw4esfPQoj9q8Nik7KIyuxHkTVnnniJQf05SxpGaKDQ+4h28ynGPg==", "dev": true, "license": "MIT", "dependencies": { "execa": "^5.1.1", - "jest-util": "30.4.1", + "jest-util": "30.5.1", "p-limit": "^3.1.0" }, "engines": { @@ -4311,29 +4604,29 @@ } }, "node_modules/jest-circus": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.4.2.tgz", - "integrity": "sha512-rvHH7VlY6LgbJXJTQ87GW62g1FntOtbhh0zT+v04kC+pgL6aBKyYINXxWukCpj3dcIBMw5/XUbtDS9dU9JTXeQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.5.2.tgz", + "integrity": "sha512-vffFgjs5JSJ9q4ds1vNW3klKYPJfYfIY61LT/zaZgvTeASJOWZUt8LBfHgIcV4rwxlPBLl/ePBGccHEclS4PlQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.4.1", - "@jest/expect": "30.4.1", - "@jest/test-result": "30.4.1", - "@jest/types": "30.4.1", + "@jest/environment": "30.5.2", + "@jest/expect": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", "co": "^4.6.0", "dedent": "^1.6.0", "is-generator-fn": "^2.1.0", - "jest-each": "30.4.1", - "jest-matcher-utils": "30.4.1", - "jest-message-util": "30.4.1", - "jest-runtime": "30.4.2", - "jest-snapshot": "30.4.1", - "jest-util": "30.4.1", + "jest-each": "30.5.2", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-runtime": "30.5.2", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", "p-limit": "^3.1.0", - "pretty-format": "30.4.1", + "pretty-format": "30.5.1", "pure-rand": "^7.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.6" @@ -4343,21 +4636,21 @@ } }, "node_modules/jest-cli": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.4.2.tgz", - "integrity": "sha512-jfA2ocvVHMXS2QijrJ0d31ektP+d/W0T5RpcTX2Pq+3sVqHlsXVCM2+FmwpL+bdY8OfHpIg9xMxLF17Zg0U49Q==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.5.2.tgz", + "integrity": "sha512-YYYxUUVjFgPvgEleKNKMaYGIFgR3l3832Cl0kRL/oCiDZ03v7wImUtquHl2OOBCCNgprjZgBN5bczS/JklPBDg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "30.4.2", - "@jest/test-result": "30.4.1", - "@jest/types": "30.4.1", + "@jest/core": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", "chalk": "^4.1.2", "exit-x": "^0.2.2", "import-local": "^3.2.0", - "jest-config": "30.4.2", - "jest-util": "30.4.1", - "jest-validate": "30.4.1", + "jest-config": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", "yargs": "^17.7.2" }, "bin": { @@ -4376,33 +4669,33 @@ } }, "node_modules/jest-config": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.4.2.tgz", - "integrity": "sha512-rNHAShJQqQwFNoL0hbf3BphSBOWnpOUAKvidLS/AjNVLPfoj5mSf4jQMfW3cYOs6hXeZC7nF7mDHaBnbxELOzg==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.5.2.tgz", + "integrity": "sha512-U6221OZekabePvGcGPf4raIBKMvYQWFHvhobDJRojOYaFMj2HaGytAdknjDhYc6JTz2fdHW9+6k0wWUDaNeOFQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.27.4", - "@jest/get-type": "30.1.0", - "@jest/pattern": "30.4.0", - "@jest/test-sequencer": "30.4.1", - "@jest/types": "30.4.1", - "babel-jest": "30.4.1", + "@jest/get-type": "30.5.0", + "@jest/pattern": "30.5.0", + "@jest/test-sequencer": "30.5.2", + "@jest/types": "30.5.1", + "babel-jest": "30.5.2", "chalk": "^4.1.2", "ci-info": "^4.2.0", "deepmerge": "^4.3.1", - "glob": "^10.5.0", + "glob": "^13.0.6", "graceful-fs": "^4.2.11", - "jest-circus": "30.4.2", - "jest-docblock": "30.4.0", - "jest-environment-node": "30.4.1", - "jest-regex-util": "30.4.0", - "jest-resolve": "30.4.1", - "jest-runner": "30.4.2", - "jest-util": "30.4.1", - "jest-validate": "30.4.1", + "jest-circus": "30.5.2", + "jest-docblock": "30.5.0", + "jest-environment-node": "30.5.2", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-runner": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", "parse-json": "^5.2.0", - "pretty-format": "30.4.1", + "pretty-format": "30.5.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -4427,25 +4720,25 @@ } }, "node_modules/jest-diff": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.4.1.tgz", - "integrity": "sha512-CRpFK0RtLriVDGcPPAnR6HMVI8bSR2jnUIgralhauzYQZIb4RH9AtEInTuQr65LmmGggGcRT6HIASxwqsVsmlA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.5.2.tgz", + "integrity": "sha512-rBtHnI6BWTiWj3lM7fOLVfChx7R9B0u9VV3PRHawKs79x6ZjW1QoSrKenaigNGWlvhtoi2BqvDbABDie+Os3xQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/diff-sequences": "30.4.0", - "@jest/get-type": "30.1.0", + "@jest/diff-sequences": "30.5.0", + "@jest/get-type": "30.5.0", "chalk": "^4.1.2", - "pretty-format": "30.4.1" + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-docblock": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.4.0.tgz", - "integrity": "sha512-ZPMabUZCx5MpbZ2eBYSvZ0J8fvo3dR9oM+eeUpb3aKNQFuS2tu3Duw1TNlMoP8k3WQgKGJuhcMFvwcVuq6T7oA==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.5.0.tgz", + "integrity": "sha512-NwDqcxtoZi33RhuW+zJS/RVA3rmheQ8BnwpYZuc/Eruaz6seQb7+aoCeDZu/3X7W2XmD8DbSo9Pn72DbKsBFYw==", "dev": true, "license": "MIT", "dependencies": { @@ -4456,111 +4749,110 @@ } }, "node_modules/jest-each": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.4.1.tgz", - "integrity": "sha512-/8MJbH6fuj48TstjrMf+u/pd06Qezz5xOXvZA6442heNOWr8bdeoGZX2d9fCn028CoMgYmroH9//zky5GfyYmA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.5.2.tgz", + "integrity": "sha512-GRrW+7fmmgmkvyfEBqc1QFdWnF1Ex5yG6Y6AWL4TTxnkWlKIT98dsKh3P3UuWm6v4XsQwVE6DEzXIPMzWJ3ZbA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0", - "@jest/types": "30.4.1", + "@jest/get-type": "30.5.0", + "@jest/types": "30.5.1", "chalk": "^4.1.2", - "jest-util": "30.4.1", - "pretty-format": "30.4.1" + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-environment-node": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.4.1.tgz", - "integrity": "sha512-4FZYVOk85hz2AyT6BbarKy9u37g6DbrDyCdFhsnDdXqyrueYQvB+0zO4f/kqLCRD0BsPRXPMNJeQwihKZV8naw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.5.2.tgz", + "integrity": "sha512-Ciz4KgTGIbojxSKpuFImgWJj5EyqfE8xMq9NxWmOXnQywHHS03H9Mv+vaCB29J5pr3JBrY27WbRV18rBdjh8Dg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.4.1", - "@jest/fake-timers": "30.4.1", - "@jest/types": "30.4.1", + "@jest/environment": "30.5.2", + "@jest/fake-timers": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", - "jest-mock": "30.4.1", - "jest-util": "30.4.1", - "jest-validate": "30.4.1" + "jest-mock": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-haste-map": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.4.1.tgz", - "integrity": "sha512-rFrcONd8jeFsyw+Z9CrScJgglRf2+NFmNam8dKu7n+SoHqNYT47mn0DdEcVUZJpvh7Iz6/si7f7yUH7GJHVgnw==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.5.1.tgz", + "integrity": "sha512-VIFgt67jW480YDxKfEv9IYQKrFpYt7bOCMn3VsnjK7AK9qo7p6acpnA1DHwsVOULE3dTaYew/6JaTD/d0VDHoQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", + "@parcel/watcher": "^2.6.0", "@types/node": "*", "anymatch": "^3.1.3", "fb-watchman": "^2.0.2", + "fdir": "^6.5.0", "graceful-fs": "^4.2.11", - "jest-regex-util": "30.4.0", - "jest-util": "30.4.1", - "jest-worker": "30.4.1", - "picomatch": "^4.0.3", - "walker": "^1.0.8" + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", + "jest-worker": "30.5.1", + "picomatch": "^4.0.3" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.3" } }, "node_modules/jest-leak-detector": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.4.1.tgz", - "integrity": "sha512-IpmyiioeHxiWDhesHnUFmOxcTzwCwKpgACgWajtAP+nYQXiY7DakTxB6Bx9JFiRMljr0AX1PvnQdaU1KFoz6NQ==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.5.1.tgz", + "integrity": "sha512-gt4GT2aWgEoCNTcBe4rqS74xTIUJxi+UD9SNSu9aOk5LmTEd6fS5KSTmAKAfitCCktQHNN+upUuL6EkBfFbMDQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0", - "pretty-format": "30.4.1" + "@jest/get-type": "30.5.0", + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.4.1.tgz", - "integrity": "sha512-zvYfX5CaeEkFrrLS9suWe9rvJrm9J1Iv3ua8kIBv9GEPzcnsfBf0bob37la7s67fs0nlBC3EuvkOLnXQKxtx4A==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.5.2.tgz", + "integrity": "sha512-lFkB365PTIHOhPzwrb9T6gvlDnPpOZ7/c3ewOKKB7bzztqjVrtlyRL2MkyfJXpyY2u2SKw001JKrTx14fBUFcQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0", + "@jest/get-type": "30.5.0", "chalk": "^4.1.2", - "jest-diff": "30.4.1", - "pretty-format": "30.4.1" + "jest-diff": "30.5.2", + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-message-util": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.4.1.tgz", - "integrity": "sha512-kwCKIvq0MCW1HzLoGola9Te6JUdzgV0loyKJ3Qghrkz9i5/RRIHsL95BMQc2HBBhlBKC4j22K9p11TGHH8RBpQ==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.5.1.tgz", + "integrity": "sha512-UdQlLdd9wL/Ys7xRErckqwD6wPlSZYueosSWuHc1r2ztGLwlgPvtSJq2+BPEgaEY13WLvfFbmhTj8pba0Sd1jg==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "@types/stack-utils": "^2.0.3", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", - "jest-util": "30.4.1", + "jest-util": "30.5.1", "picomatch": "^4.0.3", - "pretty-format": "30.4.1", + "pretty-format": "30.5.1", "slash": "^3.0.0", "stack-utils": "^2.0.6" }, @@ -4569,42 +4861,25 @@ } }, "node_modules/jest-mock": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.4.1.tgz", - "integrity": "sha512-/i8SVb8/NSB7RfNi8gfqu8gxLV23KaL5EpAttyb9iz8qWRIqXRLflycz/32wXsYkOnaUlx8NAKnJYtpsmXUmfw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.5.2.tgz", + "integrity": "sha512-KTHb37Fhj8xY8qPFvTFaFJHcdsumQp+ExsUlgoX232Agmc706gagBs53+CYvulV7MVQo9AgXOUxsqzzVBoJlrA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/expect-utils": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", - "jest-util": "30.4.1" + "jest-util": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, "node_modules/jest-regex-util": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.4.0.tgz", - "integrity": "sha512-mWlvLviKIgIQ8VCuM1xRdD0TWp3zlzionlmDBjuXVBs+VkmXq6FgW9T4Emr7oGz/Rk6feDCGyiugolcQEyp3mg==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.5.0.tgz", + "integrity": "sha512-Mg0WK7A6xRHLSA1udJ8y9f3lM0uUhFTBnLKzwPmqB9AylvpleJ6BLemR8K9dK27DY+cesDryoA7yLZCAHsPG1A==", "dev": true, "license": "MIT", "engines": { @@ -4612,100 +4887,100 @@ } }, "node_modules/jest-resolve": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.4.1.tgz", - "integrity": "sha512-Zry8Yq/yJcNAZ7dJ5F2heic8AheXvbFZ7XI5V+h28nrYZ7Qoyy4dItq8OodjnYD270mvX+ZudmrNV9cysqhW5Q==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.5.1.tgz", + "integrity": "sha512-wprhLejRtwN6h8ZgaqC0eYjGJ1uMdGPT/+b3eFncbG4NWuuP9QL+vWwRinu9waw7hkOLcpMJGVJAMgBwsPssMQ==", "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.2", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.4.1", - "jest-pnp-resolver": "^1.2.3", - "jest-util": "30.4.1", - "jest-validate": "30.4.1", + "jest-haste-map": "30.5.1", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", "slash": "^3.0.0", - "unrs-resolver": "^1.7.11" + "unrs-resolver": "^1.12.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-resolve-dependencies": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.4.2.tgz", - "integrity": "sha512-gDiVh1I+GxYzz9oXlyw+1wv6VOYX1WYxMOfjsA3iGKePV2oxmbHhwxfkALxNxYy1ciw6APWwkW2zZONwP97aEQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.5.2.tgz", + "integrity": "sha512-GMI0DP5enX9Z2qW2zFy1bOkrCfWAOPRJQ7qHt0pdfrxBPsgWxglMPrRSK2TX/wRWYxcPRSLFg3Z88qPOzHx7FQ==", "dev": true, "license": "MIT", "dependencies": { - "jest-regex-util": "30.4.0", - "jest-snapshot": "30.4.1" + "jest-regex-util": "30.5.0", + "jest-snapshot": "30.5.2" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runner": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.4.2.tgz", - "integrity": "sha512-2dw0PslVYXxffXGpLo+Ejad+KcI1Qkjn7f4X4619gf21oCUmL+SPfjqIa/losUem3yEOvfNZe/F1HWUcNpODcg==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.5.2.tgz", + "integrity": "sha512-/B6px7hiiNhVSRwuv9AGn0nawYvwsHeQZ3ItTd5Gp2diFd0EOKaWVeWqcbw3L88vx1GfpCKjQkxWItZCTl11Rw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.4.1", - "@jest/environment": "30.4.1", - "@jest/test-result": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", + "@jest/console": "30.5.2", + "@jest/environment": "30.5.2", + "@jest/source-map": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", "emittery": "^0.13.1", "exit-x": "^0.2.2", "graceful-fs": "^4.2.11", - "jest-docblock": "30.4.0", - "jest-environment-node": "30.4.1", - "jest-haste-map": "30.4.1", - "jest-leak-detector": "30.4.1", - "jest-message-util": "30.4.1", - "jest-resolve": "30.4.1", - "jest-runtime": "30.4.2", - "jest-util": "30.4.1", - "jest-watcher": "30.4.1", - "jest-worker": "30.4.1", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" + "jest-docblock": "30.5.0", + "jest-environment-node": "30.5.2", + "jest-haste-map": "30.5.1", + "jest-leak-detector": "30.5.1", + "jest-message-util": "30.5.1", + "jest-resolve": "30.5.1", + "jest-runtime": "30.5.2", + "jest-util": "30.5.1", + "jest-watcher": "30.5.2", + "jest-worker": "30.5.1", + "p-limit": "^3.1.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runtime": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.4.2.tgz", - "integrity": "sha512-3/5e8iPz2k/VLqlr8DgTftYyLUv8Su3FkCAO2/Od81UsUTpSxOrS6O5x5KkoQwyUjmpYyDJKeyAvg2T2nvpNkQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.5.2.tgz", + "integrity": "sha512-0paUAHBlheai10A3XSy9Xh+YBG0IROy+/qzcDPzQ/nbbXrznQzeWy5qniICWK6d3W3scaRQCVAbXdcK0ibBq4w==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.4.1", - "@jest/fake-timers": "30.4.1", - "@jest/globals": "30.4.1", - "@jest/source-map": "30.0.1", - "@jest/test-result": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", + "@jest/environment": "30.5.2", + "@jest/fake-timers": "30.5.2", + "@jest/globals": "30.5.2", + "@jest/source-map": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", - "cjs-module-lexer": "^2.1.0", + "cjs-module-lexer": "^2.2.0", "collect-v8-coverage": "^1.0.2", - "glob": "^10.5.0", + "es-module-lexer": "^2.1.0", + "glob": "^13.0.6", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.4.1", - "jest-message-util": "30.4.1", - "jest-mock": "30.4.1", - "jest-regex-util": "30.4.0", - "jest-resolve": "30.4.1", - "jest-snapshot": "30.4.1", - "jest-util": "30.4.1", + "jest-haste-map": "30.5.1", + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -4714,9 +4989,9 @@ } }, "node_modules/jest-snapshot": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.4.1.tgz", - "integrity": "sha512-tEOkkfOMppUyeiHwjZswOQ3lcnoTnws/q5FnGIaeIh/jmoU0ZlgMYRR8sTlTj+nNGCoJ0RDq6SfxGxCsyMTPmw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.5.2.tgz", + "integrity": "sha512-jKIdes25AnAH73dOCi2qE6J6vHJ6L2vyBS11M89kT50DVJcLTf2AOjvcc+2vVaN8lUbY5v2R83aqXo3Ro9fqYA==", "dev": true, "license": "MIT", "dependencies": { @@ -4725,20 +5000,20 @@ "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1", "@babel/types": "^7.27.3", - "@jest/expect-utils": "30.4.1", - "@jest/get-type": "30.1.0", - "@jest/snapshot-utils": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", + "@jest/expect-utils": "30.5.2", + "@jest/get-type": "30.5.0", + "@jest/snapshot-utils": "30.5.1", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", "babel-preset-current-node-syntax": "^1.2.0", "chalk": "^4.1.2", - "expect": "30.4.1", + "expect": "30.5.2", "graceful-fs": "^4.2.11", - "jest-diff": "30.4.1", - "jest-matcher-utils": "30.4.1", - "jest-message-util": "30.4.1", - "jest-util": "30.4.1", - "pretty-format": "30.4.1", + "jest-diff": "30.5.2", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", + "pretty-format": "30.5.1", "semver": "^7.7.2", "synckit": "^0.11.8" }, @@ -4747,9 +5022,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", "dev": true, "license": "ISC", "bin": { @@ -4760,13 +5035,13 @@ } }, "node_modules/jest-util": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.4.1.tgz", - "integrity": "sha512-vjQb1sACEiv13DKJMDToJpzVW0joCsIQrmbg0fi7CyOOt+g9jTuQl2A216pWRBYhOVt53XbL/2LbMKg1BECWOw==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.5.1.tgz", + "integrity": "sha512-yKuxmNy2rSbTXw+3SIPanJo+nV4/BS1p26v44IYBFMsswSQySfMMcPHErnOncda7i9HEz0q605rIhSTBVgrZTg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", "ci-info": "^4.2.0", @@ -4778,18 +5053,18 @@ } }, "node_modules/jest-validate": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.4.1.tgz", - "integrity": "sha512-PDWi4SOwLnwqNDfHZjOcsEFyZ4fc/2W2gVL3DEoyqnB6jCQMLRtfBong8s6omIw3lI0HWOus12xfnFmQtjW3fw==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.5.1.tgz", + "integrity": "sha512-i/buJ56wTpxihE93hQYNMfdOThS87+HGvLZzZJmU4xggPcdTYQq051iwALLCHp3q+SkCGH+EFejQZz5EbBSkkg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0", - "@jest/types": "30.4.1", + "@jest/get-type": "30.5.0", + "@jest/types": "30.5.1", "camelcase": "^6.3.0", "chalk": "^4.1.2", "leven": "^3.1.0", - "pretty-format": "30.4.1" + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -4809,19 +5084,19 @@ } }, "node_modules/jest-watcher": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.4.1.tgz", - "integrity": "sha512-/l9UonmvCwjHH7d2h3iAwIloLc1H0S8mJZ/LNK3i86hqwPAz8otUJjP9MfYtz9Tt77Su5FD2xGjZn8d31IZHlw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.5.2.tgz", + "integrity": "sha512-rqRgg4R11GA9m1UsEZwQeixHsgZReCn6TOHAHtIH33yXrIvoX0OGPA20Yzzjkz7X40fZvcRSxEpQppYPcWzmcQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "30.4.1", - "@jest/types": "30.4.1", + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", "emittery": "^0.13.1", - "jest-util": "30.4.1", + "jest-util": "30.5.1", "string-length": "^4.0.2" }, "engines": { @@ -4829,15 +5104,15 @@ } }, "node_modules/jest-worker": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.4.1.tgz", - "integrity": "sha512-SHynN/q/QD++iNyvMdy+WMmbCGk8jIsNcRxycXbWubSOhvo6T+j2afcfUSl+3hYsiBebOTo0cT7c2H7CXugu1g==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.5.1.tgz", + "integrity": "sha512-Cbxh5v7AoLuFRmFJSM4/aHdQ68rjXvUWr716EE0Dh3I7T+T/3FgFKhOERGXHcU2Meftq9+9zxPM3TSNyI9D+HA==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", "@ungap/structured-clone": "^1.3.0", - "jest-util": "30.4.1", + "jest-util": "30.5.1", "merge-stream": "^2.0.0", "supports-color": "^8.1.1" }, @@ -4869,9 +5144,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.15.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.1.tgz", - "integrity": "sha512-S99WuO3HlhO3XN41EtYUNl9zzXjoJx7QvmipxsJVxtCBT0YHEFy+iOJhjSvrmV12nYhWpZaM8lPHkJm0yUMbag==", + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", "dev": true, "license": "MIT", "dependencies": { @@ -4981,9 +5256,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", "dev": true, "license": "ISC", "bin": { @@ -4993,16 +5268,6 @@ "node": ">=10" } }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -5095,16 +5360,16 @@ } }, "node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^2.0.2" + "brace-expansion": "^5.0.8" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -5127,12 +5392,13 @@ "license": "MIT" }, "node_modules/napi-postinstall": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", - "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.8.tgz", + "integrity": "sha512-dHbDC5V1g/EI8OLEtL4Iuwbu0fgzmyykxenn2KnlsX9XdhTXL3gWnfbbP+ab+oUcgV6CFpb8QGyQt/ZXA0UXig==", "dev": true, "license": "MIT", "bin": { + "napi-patch": "lib/patch.js", "napi-postinstall": "lib/cli.js" }, "engines": { @@ -5158,6 +5424,13 @@ "node": ">= 0.6" } }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "license": "MIT" + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -5166,9 +5439,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.53", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.53.tgz", - "integrity": "sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==", + "version": "2.0.65", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.65.tgz", + "integrity": "sha512-PfvofsGQ+MiOQIPkX9fU8ELUWmy5zL74CdQaph/ismKszfFkfwXaw0cGiwbwym2hT9k5+mdyl8O5WQ1MD8EHmA==", "dev": true, "license": "MIT", "engines": { @@ -5356,16 +5629,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -5377,36 +5640,40 @@ } }, "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" }, "engines": { - "node": ">=16 || 14 >=14.18" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "version": "11.5.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", "dev": true, - "license": "ISC" + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } }, "node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", + "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", "license": "MIT", - "engines": { - "node": ">=16" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/picocolors": { @@ -5417,9 +5684,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", - "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -5466,16 +5733,16 @@ } }, "node_modules/pretty-format": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.4.1.tgz", - "integrity": "sha512-K6KiKMHTL4jjX4u3Kir2EW07nRfcqVTXIImx50wbjHQTcZPgg+gjVeNTIT3l3L1Rd4UefxfogquC9J37SoFyyw==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "30.4.1", - "ansi-styles": "^5.2.0", - "react-is-18": "npm:react-is@^18.3.1", - "react-is-19": "npm:react-is@^19.2.5" + "@jest/react-is-18": "npm:react-is@^18.3.1", + "@jest/react-is-19": "npm:react-is@^19.2.5", + "@jest/schemas": "30.5.0", + "ansi-styles": "^5.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -5495,9 +5762,9 @@ } }, "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz", + "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==", "license": "MIT", "dependencies": { "forwarded": "0.2.0", @@ -5505,6 +5772,10 @@ }, "engines": { "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/pure-rand": { @@ -5525,9 +5796,9 @@ "license": "MIT" }, "node_modules/qs": { - "version": "6.15.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", - "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.17.1.tgz", + "integrity": "sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA==", "license": "BSD-3-Clause", "dependencies": { "es-define-property": "^1.0.1", @@ -5550,36 +5821,20 @@ } }, "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.6.3", - "unpipe": "1.0.0" + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.10" } }, - "node_modules/react-is-18": { - "name": "react-is", - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, - "node_modules/react-is-19": { - "name": "react-is", - "version": "19.2.8", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.8.tgz", - "integrity": "sha512-s5un28nYxKJw5gvUHyW5PCC28CvBqLu9r3cWgzHT4Vo/5fqqkFcdRYsGcKf50WMPpjjFZS5d76fn3YCo2njKwQ==", - "dev": true, - "license": "MIT" - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5666,9 +5921,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", "dev": true, "license": "ISC", "bin": { @@ -5814,17 +6069,11 @@ } }, "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "license": "ISC" }, "node_modules/slash": { "version": "3.0.0", @@ -5846,17 +6095,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5893,56 +6131,14 @@ "dev": true, "license": "MIT", "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-length/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-length/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=10" } }, - "node_modules/string-width-cjs": { - "name": "string-width", + "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", @@ -5957,24 +6153,23 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, "engines": { "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { + "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -5987,22 +6182,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", @@ -6017,16 +6196,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -6126,72 +6295,98 @@ } }, "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.2.tgz", + "integrity": "sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==", "dev": true, "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^10.2.2" }, "engines": { - "node": ">=8" + "node": ">=18" } }, + "node_modules/test-exclude/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.8.tgz", + "integrity": "sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": "*" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "node_modules/test-exclude/node_modules/glob/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.2" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "node_modules/test-exclude/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "license": "BSD-3-Clause" + "license": "ISC" + }, + "node_modules/test-exclude/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/toidentifier": { "version": "1.0.1", @@ -6202,14 +6397,6 @@ "node": ">=0.6" } }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, "node_modules/tsx": { "version": "4.23.12", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.12.tgz", @@ -6737,23 +6924,40 @@ } }, "node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz", + "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==", "license": "MIT", "dependencies": { - "content-type": "^1.0.5", + "content-type": "^2.0.0", "media-typer": "^1.1.0", "mime-types": "^3.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/type-is/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/undici-types": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", - "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", "dev": true, "license": "MIT" }, @@ -6767,47 +6971,45 @@ } }, "node_modules/unrs-resolver": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz", - "integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.13.0.tgz", + "integrity": "sha512-mcPQo9Vm6kXd84d/WqMiYBi2CcA57QHBX/ev5PoUEb8b2oQzUvJ6xYsfseQblnCncgnVmCZGWiFwK7KkS5JZJA==", "dev": true, - "hasInstallScript": true, "license": "MIT", "dependencies": { - "napi-postinstall": "^0.3.4" + "napi-postinstall": "^0.3.7" }, "funding": { "url": "https://opencollective.com/unrs-resolver" }, "optionalDependencies": { - "@unrs/resolver-binding-android-arm-eabi": "1.12.2", - "@unrs/resolver-binding-android-arm64": "1.12.2", - "@unrs/resolver-binding-darwin-arm64": "1.12.2", - "@unrs/resolver-binding-darwin-x64": "1.12.2", - "@unrs/resolver-binding-freebsd-x64": "1.12.2", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.12.2", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.12.2", - "@unrs/resolver-binding-linux-arm64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-arm64-musl": "1.12.2", - "@unrs/resolver-binding-linux-loong64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-loong64-musl": "1.12.2", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-riscv64-musl": "1.12.2", - "@unrs/resolver-binding-linux-s390x-gnu": "1.12.2", - "@unrs/resolver-binding-linux-x64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-x64-musl": "1.12.2", - "@unrs/resolver-binding-openharmony-arm64": "1.12.2", - "@unrs/resolver-binding-wasm32-wasi": "1.12.2", - "@unrs/resolver-binding-win32-arm64-msvc": "1.12.2", - "@unrs/resolver-binding-win32-ia32-msvc": "1.12.2", - "@unrs/resolver-binding-win32-x64-msvc": "1.12.2" + "@unrs/resolver-binding-android-arm-eabi": "1.13.0", + "@unrs/resolver-binding-android-arm64": "1.13.0", + "@unrs/resolver-binding-darwin-arm64": "1.13.0", + "@unrs/resolver-binding-darwin-x64": "1.13.0", + "@unrs/resolver-binding-freebsd-x64": "1.13.0", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.13.0", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.13.0", + "@unrs/resolver-binding-linux-arm64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-arm64-musl": "1.13.0", + "@unrs/resolver-binding-linux-loong64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-loong64-musl": "1.13.0", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-riscv64-musl": "1.13.0", + "@unrs/resolver-binding-linux-s390x-gnu": "1.13.0", + "@unrs/resolver-binding-linux-x64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-x64-musl": "1.13.0", + "@unrs/resolver-binding-openharmony-arm64": "1.13.0", + "@unrs/resolver-binding-win32-arm64-msvc": "1.13.0", + "@unrs/resolver-binding-win32-ia32-msvc": "1.13.0", + "@unrs/resolver-binding-win32-x64-msvc": "1.13.0" } }, "node_modules/update-browserslist-db": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.1.tgz", - "integrity": "sha512-ZZ61DsRsOnakl74HAmp3oSN4aXUmEWXf+i/yv0h7tIBfICc3VdrFErQKUUKPgu3AMsTUMbcongALEN4l6GSUrQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.4.0.tgz", + "integrity": "sha512-WPJuOnjI9FWDct4fB+ej4Mz8opLaw5CDcZ2t44tFZ0vIQVYWzBhWR3mkixuUj/A7+vY4V9+ApOZ2YYLwdgq46w==", "dev": true, "funding": [ { @@ -6859,16 +7061,6 @@ "node": ">= 0.8" } }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -6886,18 +7078,18 @@ } }, "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -6922,64 +7114,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7000,6 +7134,19 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -7046,51 +7193,6 @@ "node": ">=12" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/payment-service/package.json b/payment-service/package.json index 43aa016..e7bce81 100644 --- a/payment-service/package.json +++ b/payment-service/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest" + "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --forceExit" }, "keywords": [], "author": "", diff --git a/payment-service/tests/payment.test.js b/payment-service/tests/payment.test.js index e3fc207..b760045 100644 --- a/payment-service/tests/payment.test.js +++ b/payment-service/tests/payment.test.js @@ -2,10 +2,26 @@ import request from "supertest"; import { jest } from "@jest/globals"; // Mock the Kafka producer to bypass connections +const mockConnect = jest.fn().mockResolvedValue(undefined); +const mockDisconnect = jest.fn().mockResolvedValue(undefined); +const mockSend = jest.fn().mockResolvedValue(undefined); +const mockOn = jest.fn(); + jest.unstable_mockModule("kafkajs", () => { return { Kafka: class Kafka { - producer() { return { connect: jest.fn(), send: jest.fn() }; } + producer() { + return { + connect: mockConnect, + disconnect: mockDisconnect, + send: mockSend, + on: mockOn, + events: { + CONNECT: "producer.connect", + DISCONNECT: "producer.disconnect", + }, + }; + } consumer() { return { connect: jest.fn(), subscribe: jest.fn(), run: jest.fn() }; } } }; @@ -21,20 +37,77 @@ jest.unstable_mockModule("../db/index.js", () => { values: jest.fn() }; return cb(mockTx); - }) + }), + execute: jest.fn().mockResolvedValue({ rowCount: 5 }), } }; }); const { default: app } = await import("../index.js"); +const { prunePublishedEvents } = await import("../worker.js"); -describe("POST /payment-service", () => { - it("should output 200 upon successful payment processing and mock Kafka broadcast", async () => { +describe("Payment Service Routing & Endpoints", () => { + it("POST /payment succeeds with 200 upon valid payment processing", async () => { const res = await request(app) - .post("/payment-service") + .post("/payment") .send({ cart: [{ price: 50 }, { price: 20 }] }); - + expect(res.statusCode).toEqual(200); - expect(res.text).toBe("Payment processed and event broadcasted"); + expect(res.text).toBe("Payment processed and event safely queued in outbox."); + }); + + it("POST /payment-service is removed and returns 404", async () => { + const res = await request(app) + .post("/payment-service") + .send({ cart: [] }); + expect(res.statusCode).toEqual(404); + }); + + it("POST / is removed and returns 404", async () => { + const res = await request(app) + .post("/") + .send({ cart: [] }); + expect(res.statusCode).toEqual(404); + }); + + it("GET /health returns 200 while process is alive", async () => { + const res = await request(app).get("/health"); + expect(res.statusCode).toEqual(200); + expect(res.text).toBe("Payment Service OK"); + }); + + it("GET /relay-status returns 503 with pruner status when the relay loop is not running", async () => { + const res = await request(app).get("/relay-status"); + expect(res.statusCode).toEqual(503); + expect(res.body.status).toBe("unhealthy"); + expect(res.body.relayRunning).toBe(false); + expect(res.body.pruner).toBeDefined(); + }); + + it("prunePublishedEvents deletes published events older than retention cutoff", async () => { + const deleted = await prunePublishedEvents(true); + expect(deleted).toBe(5); + const res = await request(app).get("/relay-status"); + expect(res.body.pruner.lastDeletedCount).toBe(5); + expect(res.body.pruner.lastError).toBeNull(); + }); + + it("prunePublishedEvents logs loudly and exposes error in /relay-status on DB failure", async () => { + const { db } = await import("../db/index.js"); + db.execute.mockRejectedValueOnce(new Error("simulated prune failure")); + const errorSpy = jest.spyOn(console, "error").mockImplementation(() => { }); + + const deleted = await prunePublishedEvents(true); + expect(deleted).toBe(0); + expect(errorSpy).toHaveBeenCalledWith( + expect.stringContaining("[CRITICAL][Outbox Pruner] PRUNE FAILED"), + expect.any(String) + ); + + const res = await request(app).get("/relay-status"); + expect(res.body.pruner.lastError).toContain("simulated prune failure"); + expect(res.body.pruner.consecutiveErrors).toBeGreaterThanOrEqual(1); + + errorSpy.mockRestore(); }); }); diff --git a/payment-service/worker.js b/payment-service/worker.js index abef32c..c54a4dd 100644 --- a/payment-service/worker.js +++ b/payment-service/worker.js @@ -1,6 +1,6 @@ import { db } from "./db/index.js"; +import { sql, inArray } from "drizzle-orm"; import { outboxEvents } from "./db/schema.js"; -import { eq } from "drizzle-orm"; import { Kafka } from "kafkajs"; const kafka = new Kafka({ @@ -9,7 +9,7 @@ const kafka = new Kafka({ ...(process.env.KAFKA_SASL_USERNAME && { ssl: true, sasl: { - mechanism: 'plain', + mechanism: "plain", username: process.env.KAFKA_SASL_USERNAME, password: process.env.KAFKA_SASL_PASSWORD, }, @@ -18,44 +18,289 @@ const kafka = new Kafka({ const producer = kafka.producer(); -export const startOutboxWorker = async () => { - if (!process.env.DATABASE_URL) return; +const OUTBOX_RETENTION_HOURS = parseInt(process.env.OUTBOX_RETENTION_HOURS || "1", 10); +let lastPruneTime = 0; +const PRUNE_INTERVAL_MS = 60 * 1000; + +let prunerStatus = { + lastRunAt: null, + lastDeletedCount: 0, + lastError: null, + lastErrorAt: null, + consecutiveErrors: 0, +}; + +export const getPrunerStatus = () => ({ ...prunerStatus }); + +export const prunePublishedEvents = async (force = false) => { + if (!db) return 0; + const now = Date.now(); + if (!force && now - lastPruneTime < PRUNE_INTERVAL_MS) return 0; + lastPruneTime = now; + + try { + const retentionHours = parseInt(process.env.OUTBOX_RETENTION_HOURS || "1", 10); + const result = await db.execute( + sql`DELETE FROM outbox_events WHERE published = true AND topic = 'payment-successful' AND created_at < NOW() - INTERVAL '1 hour' * ${retentionHours}` + ); + const deletedCount = Number(result?.count ?? result?.rowCount ?? 0); + prunerStatus = { + lastRunAt: new Date(now).toISOString(), + lastDeletedCount: deletedCount, + lastError: null, + lastErrorAt: prunerStatus.lastErrorAt, + consecutiveErrors: 0, + }; + if (deletedCount > 0) { + console.log(`Outbox Pruner: Deleted ${deletedCount} published outbox events older than ${retentionHours} hour(s).`); + } + return deletedCount; + } catch (err) { + const errMsg = err?.message || String(err); + prunerStatus = { + lastRunAt: new Date(now).toISOString(), + lastDeletedCount: 0, + lastError: errMsg, + lastErrorAt: new Date(now).toISOString(), + consecutiveErrors: prunerStatus.consecutiveErrors + 1, + }; + console.error( + `๐Ÿšจ [CRITICAL][Outbox Pruner] PRUNE FAILED (consecutive=${prunerStatus.consecutiveErrors}): Published payment-successful outbox rows are NOT being cleaned up! Error: ${errMsg}`, + err?.stack || "" + ); + return 0; + } +}; + +let shouldRun = false; +let isRunning = false; +let isConnected = false; +let loopPromise = null; +let retryTimer = null; + +export const isRelayRunning = () => isRunning && isConnected; +export const getRelayStatus = () => ({ + relayRunning: isRelayRunning(), + kafkaConnected: isConnected, + pruner: getPrunerStatus(), +}); + +if (producer.on && producer.events) { + producer.on(producer.events.CONNECT, () => { + console.log("Outbox Worker: Kafka producer connected event received."); + isConnected = true; + }); + + producer.on(producer.events.DISCONNECT, () => { + console.warn("Outbox Worker: Kafka producer disconnected event received."); + isConnected = false; + isRunning = false; + }); +} + +/** + * Process a single batch of unpublished outbox events using + * SELECT ... FOR UPDATE SKIP LOCKED to prevent duplicate publishes across workers. + * Updates published status in batch using ANY(...) array syntax. + */ +const processOutboxBatch = async () => { + if (!db || !isConnected) return 0; + + let processedCount = 0; try { - await producer.connect(); - console.log("Outbox Worker: Connected to Kafka"); + await db.transaction(async (tx) => { + // 1. Concurrency-safe lock: claim up to 50 rows, skipping any locked by another worker + // Strictly filter to topic = 'payment-successful' for the payment service relay + const rows = await tx.execute( + sql`SELECT id, topic, payload, created_at FROM outbox_events WHERE published = false AND topic = 'payment-successful' ORDER BY created_at ASC LIMIT 50 FOR UPDATE SKIP LOCKED` + ); - // Poll every 5 seconds for unpublished events - setInterval(async () => { - const events = await db - .select() - .from(outboxEvents) - .where(eq(outboxEvents.published, false)) - .limit(50); // Batch limit + const events = Array.from(rows || []); + if (events.length === 0) { + return; + } - if (!events || events.length === 0) return; + const publishedIds = []; + const messagesByTopic = new Map(); for (const event of events) { - try { - // Attempt to publish + const rawPayload = typeof event.payload === "string" ? JSON.parse(event.payload) : event.payload; + + const eventId = String(rawPayload.eventId || event.id); + const correlationId = String(rawPayload.correlationId || eventId); + const causationId = String(rawPayload.causationId || eventId); + + const enrichedPayload = { + ...rawPayload, + eventId, + correlationId, + causationId, + }; + + // Deterministic partition key: userId (no fallback chains) + const partitionKey = String(enrichedPayload.userId); + + if (!messagesByTopic.has(event.topic)) { + messagesByTopic.set(event.topic, []); + } + + messagesByTopic.get(event.topic).push({ + key: partitionKey, + value: JSON.stringify(enrichedPayload), + headers: { + "event-id": eventId, + "correlation-id": correlationId, + "causation-id": causationId, + "event-type": String(event.topic), + }, + }); + + publishedIds.push(event.id); + processedCount++; + } + + if (process.env.RELAY_BATCH_SEND === "true") { + // Batch publish messages per topic in single network request + for (const [topic, messages] of messagesByTopic.entries()) { await producer.send({ - topic: event.topic, - messages: [{ value: JSON.stringify(event.payload) }], + topic, + messages, }); - - // Committing the publish back to DB only if Kafka strictly succeeds - await db - .update(outboxEvents) - .set({ published: true }) - .where(eq(outboxEvents.id, event.id)); - - console.log(`Outbox Worker: Confirmed publish for event ID: ${event.id}`); - } catch (err) { - console.error(`Outbox Worker: Failed to publish event ID ${event.id} (Leaving as unpublished to retry again)`, err); } + } else { + // Sequential publish (original baseline behavior) + for (const [topic, messages] of messagesByTopic.entries()) { + for (const msg of messages) { + await producer.send({ + topic, + messages: [msg], + }); + } + } + } + + // Batch update all published events in a single SQL operation + if (publishedIds.length > 0) { + await tx + .update(outboxEvents) + .set({ published: true }) + .where(inArray(outboxEvents.id, publishedIds)); + console.log(`Outbox Worker: Batch-published ${publishedIds.length} events (IDs: ${publishedIds.slice(0, 3).join(", ")}${publishedIds.length > 3 ? "..." : ""})`); } - }, 5000); + }); } catch (err) { - console.error("Outbox Worker: Initial Kafka Connection Error", err); + console.error("Outbox Worker: Batch processing failed (transaction rolled back):", err.message); + } + + return processedCount; +}; + +/** + * Main async outbox relay loop: + * Handles initial Kafka connection with backoff, batch processing, and auto-reconnect. + */ +const runLoop = async () => { + let backoffDelay = 1000; + const maxDelay = 10000; + + while (shouldRun) { + // 1. Ensure Kafka connection with retry and exponential backoff + if (!isConnected) { + isRunning = false; + try { + console.log(`Outbox Worker: Connecting to Kafka broker(s) (${process.env.KAFKA_BROKERS || "localhost:9092"})...`); + await producer.connect(); + isConnected = true; + isRunning = true; + backoffDelay = 1000; + console.log("Outbox Worker: Connected to Kafka. Relay loop active."); + } catch (err) { + isConnected = false; + isRunning = false; + console.error(`Outbox Worker: Kafka connect failed: ${err.message}. Retrying in ${backoffDelay}ms...`); + if (!shouldRun) break; + await new Promise((resolve) => { + retryTimer = setTimeout(resolve, backoffDelay); + }); + retryTimer = null; + backoffDelay = Math.min(backoffDelay * 2, maxDelay); + continue; + } + } + + // 2. Process outbox batch + try { + const processedCount = await processOutboxBatch(); + if (!shouldRun) break; + + // 3. Periodically prune published outbox events older than OUTBOX_RETENTION_HOURS + await prunePublishedEvents(); + + // If events were processed, apply busy pause; otherwise wait 500ms + const busyPause = parseInt(process.env.RELAY_BUSY_PAUSE_MS || "25", 10); + const delay = processedCount === 0 ? 500 : busyPause; + await new Promise((resolve) => { + retryTimer = setTimeout(resolve, delay); + }); + retryTimer = null; + } catch (err) { + console.error("Outbox Worker: Unexpected loop error:", err.message || err); + if ( + err.name === "KafkaJSConnectionError" || + err.name === "KafkaJSNumberOfRetriesExceeded" || + (err.message && (err.message.includes("connection") || err.message.includes("disconnected"))) + ) { + isConnected = false; + isRunning = false; + } + if (shouldRun) { + await new Promise((resolve) => { + retryTimer = setTimeout(resolve, 1000); + }); + retryTimer = null; + } + } + } + + isRunning = false; +}; + +export const startOutboxWorker = () => { + if (!process.env.DATABASE_URL) return; + if (shouldRun) return loopPromise; + + shouldRun = true; + loopPromise = runLoop().catch((err) => { + console.error("Outbox Worker: Fatal error in relay loop:", err); + isRunning = false; + isConnected = false; + }); + return loopPromise; +}; + +export const stopOutboxWorker = async () => { + console.log("Outbox Worker: Stopping worker loop..."); + shouldRun = false; + isRunning = false; + + if (retryTimer) { + clearTimeout(retryTimer); + retryTimer = null; + } + + if (loopPromise) { + await loopPromise; + loopPromise = null; + } + + if (isConnected) { + try { + await producer.disconnect(); + isConnected = false; + console.log("Outbox Worker: Disconnected from Kafka"); + } catch (err) { + console.error("Outbox Worker: Error disconnecting from Kafka", err.message); + } } }; diff --git a/scripts/demo-outage.js b/scripts/demo-outage.js new file mode 100644 index 0000000..8bd6880 --- /dev/null +++ b/scripts/demo-outage.js @@ -0,0 +1,213 @@ +import { execSync } from 'node:child_process'; + +const GATEWAY_URL = process.env.GATEWAY_URL || 'http://localhost:8085'; +const CHECKOUT_COUNT = parseInt(process.env.DEMO_CHECKOUT_COUNT || '20', 10); + +function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +async function fetchWithRetry(url, options, maxRetries = 4) { + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + return await fetch(url, options); + } catch (err) { + if (attempt === maxRetries) throw err; + await sleep(150 * attempt); + } + } +} + +function queryDb(sqlQuery) { + return execSync( + `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`, + { encoding: 'utf8' } + ).trim(); +} + +function probePaymentEndpoint(endpoint) { + try { + const out = execSync( + `docker exec streammart-payment node -e "fetch('http://localhost:8000${endpoint}').then(async r => console.log(r.status + '|' + (await r.text())))"`, + { encoding: 'utf8' } + ).trim(); + const idx = out.indexOf('|'); + return { status: parseInt(out.slice(0, idx), 10), body: out.slice(idx + 1) }; + } catch (err) { + return { status: 0, body: err.message }; + } +} + +async function waitForKafkaHealthy(maxSec = 45) { + process.stdout.write('โณ Waiting for Kafka healthcheck'); + for (let i = 0; i < maxSec; i++) { + await sleep(1000); + process.stdout.write('.'); + try { + const status = execSync('docker inspect --format "{{.State.Health.Status}}" streammart-kafka', { encoding: 'utf8' }).trim(); + if (status === 'healthy') { + console.log(' healthy!\n'); + return; + } + } catch {} + } + console.log(''); + throw new Error('Timed out waiting for streammart-kafka to become healthy'); +} + +async function runDemo() { + const demoId = `demo_${Date.now()}`; + let kafkaStopped = false; + + console.log('\n' + '='.repeat(76)); + console.log('๐ŸŽฌ StreamMart Live Demo: Surviving a Complete Kafka Broker Outage'); + console.log('='.repeat(76)); + console.log('This narrated demo proves the Transactional Outbox pattern end-to-end:'); + console.log(' 1. Stop the Kafka broker completely'); + console.log(` 2. Send ${CHECKOUT_COUNT} checkouts through the API Gateway while Kafka is down`); + console.log(' 3. Show every payment saved & queued in Postgres (0 orders yet)'); + console.log(' 4. Restart Kafka and watch every queued checkout drain and complete\n'); + + try { + // Step 0: Verify API Gateway and Kafka are healthy before starting + console.log('[Step 0] Checking that the local Docker stack is running...'); + const healthRes = await fetchWithRetry(`${GATEWAY_URL}/health`).catch(() => null); + if (!healthRes || !healthRes.ok) { + throw new Error(`API Gateway not reachable at ${GATEWAY_URL}. Run "npm run stack:up" first.`); + } + const kafkaStatus = execSync('docker inspect --format "{{.State.Health.Status}}" streammart-kafka', { encoding: 'utf8' }).trim(); + if (kafkaStatus !== 'healthy') { + await waitForKafkaHealthy(); + } + console.log(`โœ… Stack is healthy (API Gateway at ${GATEWAY_URL}, Kafka healthy).\n`); + + // Step 1: Mint demo JWTs for test shoppers + console.log(`[Step 1] Minting ${CHECKOUT_COUNT} demo shopper JWTs via /api/auth/token (demo-only endpoint)...`); + const users = []; + for (let i = 0; i < CHECKOUT_COUNT; i++) { + const userId = `${demoId}_shopper_${i + 1}`; + const res = await fetchWithRetry(`${GATEWAY_URL}/api/auth/token`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ userId }), + }); + if (!res.ok) { + throw new Error(`Failed to mint demo token (${res.status}). Ensure DEMO_AUTH=true and NODE_ENV!=production.`); + } + const { token } = await res.json(); + users.push({ userId, token }); + } + console.log(`โœ… Ready with ${users.length} shopper tokens.\n`); + + // Step 2: Stop Kafka + console.log('[Step 2] Pulling the plug on Apache Kafka (docker stop streammart-kafka)...'); + execSync('docker stop streammart-kafka', { stdio: 'inherit' }); + kafkaStopped = true; + await sleep(1000); + const liveness = probePaymentEndpoint('/health'); + console.log('๐Ÿ›‘ Kafka is now OFFLINE.'); + console.log(` - payment-service /health (liveness): HTTP ${liveness.status} (checkout API stays UP)\n`); + + // Step 3: Send checkouts while Kafka is down + console.log(`[Step 3] Sending ${CHECKOUT_COUNT} customer checkouts while Kafka is completely DOWN...`); + let accepted = 0; + const startMs = Date.now(); + for (let i = 0; i < users.length; i += 5) { + const chunk = users.slice(i, i + 5); + await Promise.all( + chunk.map(async ({ token }, idx) => { + const res = await fetchWithRetry(`${GATEWAY_URL}/api/payment`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + body: JSON.stringify({ + cart: [{ id: `demo-sku-${i + idx + 1}`, name: 'Outbox Demo Item', price: 29.99 }], + }), + }); + if (res && res.ok) accepted++; + }) + ); + } + const elapsedMs = Date.now() - startMs; + console.log(`โœ… Accepted ${accepted}/${CHECKOUT_COUNT} checkouts with HTTP 200 in ${elapsedMs}ms despite Kafka being offline!\n`); + + // Step 4: Inspect PostgreSQL during outage + console.log('[Step 4] Inspecting PostgreSQL while Kafka is STILL OFFLINE:'); + const paymentsSaved = parseInt(queryDb(`SELECT COUNT(*) FROM payments WHERE user_id LIKE '${demoId}_%'`), 10) || 0; + const outboxPending = parseInt(queryDb(`SELECT COUNT(*) FROM outbox_events WHERE topic = 'payment-successful' AND published = false AND payload->>'userId' LIKE '${demoId}_%'`), 10) || 0; + const ordersWhileDown = parseInt(queryDb(`SELECT COUNT(*) FROM orders WHERE user_id LIKE '${demoId}_%'`), 10) || 0; + + console.log(` - Payments committed in Postgres: ${paymentsSaved}/${CHECKOUT_COUNT}`); + console.log(` - Queued outbox rows (published = false): ${outboxPending}/${CHECKOUT_COUNT}`); + console.log(` - Orders created while Kafka is down: ${ordersWhileDown} (expected 0 โ€” safely buffered in DB)\n`); + + // Step 5: Restart Kafka + console.log('[Step 5] Bringing Apache Kafka back online (docker start streammart-kafka)...'); + execSync('docker start streammart-kafka', { stdio: 'inherit' }); + kafkaStopped = false; + await waitForKafkaHealthy(); + + // Step 6: Watch events drain and deliver end-to-end + console.log('[Step 6] Watching the outbox relay reconnect and deliver all queued checkouts...'); + const drainStart = Date.now(); + let ordersCreated = 0; + let emailsQueued = 0; + let remainingOutbox = outboxPending; + + for (let i = 0; i < 120; i++) { + await sleep(500); + const snap = queryDb( + `SELECT ` + + `(SELECT COUNT(*) FROM outbox_events WHERE topic = 'payment-successful' AND published = false AND payload->>'userId' LIKE '${demoId}_%') || '|' || ` + + `(SELECT COUNT(*) FROM orders WHERE user_id LIKE '${demoId}_%') || '|' || ` + + `(SELECT COUNT(*) FROM outbox_events WHERE topic = 'email-successful' AND payload->>'userId' LIKE '${demoId}_%')` + ); + [remainingOutbox, ordersCreated, emailsQueued] = snap.split('|').map((n) => parseInt(n, 10) || 0); + process.stdout.write( + ` Outbox remaining: ${remainingOutbox} | Orders created: ${ordersCreated}/${CHECKOUT_COUNT} | Emails queued: ${emailsQueued}/${CHECKOUT_COUNT} \r` + ); + if (remainingOutbox === 0 && ordersCreated === CHECKOUT_COUNT && emailsQueued === CHECKOUT_COUNT) { + break; + } + } + const drainSec = ((Date.now() - drainStart) / 1000).toFixed(2); + console.log(`\nโœ… Full recovery & end-to-end delivery completed in ${drainSec}s!\n`); + + const dupRows = queryDb( + `SELECT user_id FROM orders WHERE user_id LIKE '${demoId}_%' GROUP BY user_id HAVING COUNT(*) > 1` + ); + const duplicates = dupRows ? dupRows.split('\n').filter(Boolean).length : 0; + const lost = Math.max(0, CHECKOUT_COUNT - ordersCreated); + const relayAfter = probePaymentEndpoint('/relay-status'); + + console.log('='.repeat(76)); + console.log('๐Ÿ“Š Demo Summary'); + console.log('='.repeat(76)); + console.log(` Checkouts sent while Kafka was down: ${CHECKOUT_COUNT}`); + console.log(` HTTP 200 accepted during outage: ${accepted}/${CHECKOUT_COUNT}`); + console.log(` Orders created after Kafka recovery: ${ordersCreated}/${CHECKOUT_COUNT}`); + console.log(` Emails queued after Kafka recovery: ${emailsQueued}/${CHECKOUT_COUNT}`); + console.log(` Orders lost: ${lost}`); + console.log(` Duplicate orders: ${duplicates}`); + console.log(` payment-service /relay-status now: HTTP ${relayAfter.status}`); + console.log('='.repeat(76) + '\n'); + + if (accepted !== CHECKOUT_COUNT || ordersCreated !== CHECKOUT_COUNT || duplicates !== 0) { + throw new Error('Demo verification failed!'); + } + } finally { + if (kafkaStopped) { + console.log('Restoring Kafka broker before exiting...'); + try { + execSync('docker start streammart-kafka', { stdio: 'inherit' }); + } catch {} + } + } +} + +runDemo().catch((err) => { + console.error('\nโŒ Demo failed:', err.message); + process.exit(1); +}); diff --git a/scripts/measure-e2e-latency.js b/scripts/measure-e2e-latency.js new file mode 100644 index 0000000..2b8eb48 --- /dev/null +++ b/scripts/measure-e2e-latency.js @@ -0,0 +1,110 @@ +import { execSync } from 'node:child_process'; +import { performance } from 'node:perf_hooks'; + +const GATEWAY_URL = process.env.GATEWAY_URL || 'http://localhost:8085'; +const NUM_SAMPLES = 50; + +async function sleep(ms) { + return new Promise((r) => setTimeout(r, ms)); +} + +function queryDb(sqlQuery) { + const cmd = `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`; + return execSync(cmd, { encoding: 'utf8' }).trim(); +} + +async function measureE2ELatency() { + console.log('='.repeat(70)); + console.log(`โฑ๏ธ StreamMart: Measuring End-to-End Event Latency (${NUM_SAMPLES} sequential runs)`); + console.log(' Latency = (Time from HTTP Checkout Dispatch -> Order Row Created in DB)'); + console.log('='.repeat(70)); + + const runId = Date.now(); + console.log('Pre-generating user auth tokens...'); + const tokens = []; + + for (let i = 1; i <= NUM_SAMPLES; i++) { + const userId = `user_e2e_${runId}_${i}`; + const tokenRes = await fetch(`${GATEWAY_URL}/api/auth/token`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ userId }), + }); + const { token } = await tokenRes.json(); + tokens.push({ userId, token }); + } + console.log(`โœ… Pre-generated ${tokens.length} user JWTs.\n`); + + const latencies = []; + + for (let i = 0; i < tokens.length; i++) { + const { userId, token } = tokens[i]; + const sampleNum = i + 1; + const t0 = performance.now(); + + // 1. Dispatch checkout + const res = await fetch(`${GATEWAY_URL}/api/payment`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${token}`, + }, + body: JSON.stringify({ + cart: [{ id: `item-${sampleNum}`, name: 'Benchmark Item', price: 15.00 }], + }), + }); + + if (!res.ok) { + console.warn(`Request #${sampleNum} failed`); + continue; + } + + // 2. Poll DB until order is committed by order-service + let orderCommitted = false; + let tEnd = 0; + for (let poll = 0; poll < 100; poll++) { + await sleep(20); + const count = parseInt(queryDb(`SELECT COUNT(*) FROM orders WHERE user_id = '${userId}'`), 10) || 0; + if (count > 0) { + tEnd = performance.now(); + orderCommitted = true; + break; + } + } + + if (orderCommitted) { + const e2eDuration = tEnd - t0; + latencies.push(e2eDuration); + console.log(`Sample #${sampleNum.toString().padStart(2, ' ')}: ${e2eDuration.toFixed(2)} ms`); + } else { + console.warn(`Sample #${sampleNum}: timed out waiting for order commit`); + } + } + + // Calculate statistics + const sorted = [...latencies].sort((a, b) => a - b); + const min = sorted[0]; + const max = sorted[sorted.length - 1]; + const sum = sorted.reduce((acc, v) => acc + v, 0); + const avg = sum / sorted.length; + const p50 = sorted[Math.floor(sorted.length * 0.5)]; + const p95 = sorted[Math.floor(sorted.length * 0.95)]; + const p99 = sorted[Math.floor(sorted.length * 0.99)]; + + console.log('\n' + '='.repeat(70)); + console.log(' END-TO-END EVENT LATENCY RESULTS '); + console.log('='.repeat(70)); + console.log(`Sample Count: ${sorted.length}`); + console.log(`Min Latency: ${min.toFixed(2)} ms`); + console.log(`Max Latency: ${max.toFixed(2)} ms`); + console.log(`Mean (Average): ${avg.toFixed(2)} ms`); + console.log(`Median (p50): ${p50.toFixed(2)} ms`); + console.log(`95th Percentile (p95): ${p95.toFixed(2)} ms`); + console.log(`99th Percentile (p99): ${p99.toFixed(2)} ms`); + console.log('='.repeat(70) + '\n'); +} + +measureE2ELatency().catch((err) => { + console.error('E2E Latency Benchmark failed:', err); + process.exit(1); +}); diff --git a/scripts/measure-latency.js b/scripts/measure-latency.js new file mode 100644 index 0000000..d55ebd9 --- /dev/null +++ b/scripts/measure-latency.js @@ -0,0 +1,99 @@ +// Latency measurement script: First request vs steady-state (20 sequential checkouts) +import { performance } from "node:perf_hooks"; + +const GATEWAY_URL = process.env.GATEWAY_URL || "http://localhost:8085"; + +async function run() { + console.log(`Connecting to API Gateway at ${GATEWAY_URL}...`); + + // 1. Obtain demo auth token + const authRes = await fetch(`${GATEWAY_URL}/api/auth/token`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ userId: "latency_benchmark_user" }), + }); + + if (!authRes.ok) { + throw new Error(`Failed to obtain auth token: ${authRes.status} ${await authRes.text()}`); + } + + const { token } = await authRes.json(); + console.log("Auth token acquired."); + + const payload = { + userId: "latency_benchmark_user", + cart: [ + { id: "item_01", name: "Benchmark Item 1", price: 19.99 }, + { id: "item_02", name: "Benchmark Item 2", price: 29.99 }, + ], + }; + + const headers = { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }; + + // 2. First checkout request + console.log("\n--- Executing 1st Checkout Request (Cold Path) ---"); + const t0 = performance.now(); + const firstRes = await fetch(`${GATEWAY_URL}/api/payment`, { + method: "POST", + headers, + body: JSON.stringify(payload), + }); + const t1 = performance.now(); + const firstLatency = t1 - t0; + const firstData = await firstRes.text(); + + if (!firstRes.ok) { + throw new Error(`First request failed: ${firstRes.status} ${firstData}`); + } + console.log(`First Request Latency: ${firstLatency.toFixed(2)} ms (Status: ${firstRes.status})`); + + // 3. Steady-state checkouts (20 sequential requests) + console.log("\n--- Executing 20 Sequential Steady-State Checkouts ---"); + const latencies = []; + + for (let i = 1; i <= 20; i++) { + const start = performance.now(); + const res = await fetch(`${GATEWAY_URL}/api/payment`, { + method: "POST", + headers, + body: JSON.stringify(payload), + }); + const duration = performance.now() - start; + latencies.push(duration); + const text = await res.text(); + + if (!res.ok) { + console.warn(`Request #${i} failed with status ${res.status}: ${text}`); + } else { + console.log(`Request #${i.toString().padStart(2, " ")}: ${duration.toFixed(2)} ms`); + } + } + + // 4. Statistics calculation + const sorted = [...latencies].sort((a, b) => a - b); + const min = sorted[0]; + const max = sorted[sorted.length - 1]; + const sum = sorted.reduce((acc, v) => acc + v, 0); + const avg = sum / sorted.length; + const p50 = sorted[Math.floor(sorted.length * 0.5)]; + const p95 = sorted[Math.floor(sorted.length * 0.95)]; + + console.log("\n========================================================"); + console.log(" LATENCY BENCHMARK RESULTS "); + console.log("========================================================"); + console.log(`First Request (Cold): ${firstLatency.toFixed(2)} ms`); + console.log(`Steady-State Min: ${min.toFixed(2)} ms`); + console.log(`Steady-State Max: ${max.toFixed(2)} ms`); + console.log(`Steady-State Avg (Mean): ${avg.toFixed(2)} ms`); + console.log(`Steady-State p50 (Median):${p50.toFixed(2)} ms`); + console.log(`Steady-State p95: ${p95.toFixed(2)} ms`); + console.log("========================================================\n"); +} + +run().catch((err) => { + console.error("Benchmark failed:", err); + process.exit(1); +}); diff --git a/scripts/start-stack.js b/scripts/start-stack.js new file mode 100644 index 0000000..0d349bd --- /dev/null +++ b/scripts/start-stack.js @@ -0,0 +1,150 @@ +import { spawn } from 'node:child_process'; +import crypto from 'node:crypto'; +import http from 'node:http'; +import fs from 'node:fs'; +import path from 'node:path'; + +// Load .env +const envPath = path.resolve('.env'); +const env = { ...process.env }; +if (fs.existsSync(envPath)) { + const envContent = fs.readFileSync(envPath, 'utf8'); + for (const line of envContent.split('\n')) { + const trimmed = line.trim(); + if (trimmed && !trimmed.startsWith('#') && trimmed.includes('=')) { + const idx = trimmed.indexOf('='); + const k = trimmed.substring(0, idx).trim(); + const v = trimmed.substring(idx + 1).trim().replace(/^["']|["']$/g, ''); + if (!env[k]) env[k] = v; + } + } +} + +// Default environment settings +env.PORT = env.PORT || '8080'; +env.PAYMENT_SERVICE_URL = env.PAYMENT_SERVICE_URL || 'http://localhost:8000'; +env.KAFKA_BROKERS = env.KAFKA_BROKERS || 'localhost:9092'; + +if (!env.JWT_SECRET) { + const generatedSecret = crypto.randomBytes(32).toString('hex'); + env.JWT_SECRET = generatedSecret; + if (fs.existsSync(envPath)) { + const existing = fs.readFileSync(envPath, 'utf8'); + if (/^\s*JWT_SECRET\s*=/m.test(existing)) { + const updated = existing.replace(/^\s*JWT_SECRET\s*=.*$/m, `JWT_SECRET=${generatedSecret}`); + fs.writeFileSync(envPath, updated, 'utf8'); + } else { + const prefix = existing.length > 0 && !existing.endsWith('\n') ? '\n' : ''; + fs.appendFileSync(envPath, `${prefix}JWT_SECRET=${generatedSecret}\n`, 'utf8'); + } + } else { + fs.writeFileSync(envPath, `JWT_SECRET=${generatedSecret}\n`, 'utf8'); + } + console.log(`๐Ÿ”‘ Generated random JWT_SECRET and wrote it to ${envPath} (gitignored).`); +} + +const gatewayPort = Number(env.PORT) || 8085; + +const services = [ + { name: 'API-GATEWAY', dir: './api-gateway', file: 'index.js', port: gatewayPort, health: '/health' }, + { name: 'PAYMENT-SVC', dir: './payment-service', file: 'index.js', port: 8000, health: '/health' }, + { name: 'ORDER-SVC', dir: './order-service', file: 'index.js', port: 8001, health: '/health' }, + { name: 'EMAIL-SVC', dir: './email-service', file: 'index.js', port: 8002, health: '/health' }, + { name: 'ANALYTIC-SVC', dir: './analytic-service', file: 'index.js', port: 8003, health: '/health' }, +]; + +const children = []; + +function checkHealth(port, path) { + return new Promise((resolve) => { + const req = http.get(`http://localhost:${port}${path}`, (res) => { + resolve(res.statusCode === 200); + }); + req.on('error', () => resolve(false)); + req.setTimeout(1000, () => { + req.destroy(); + resolve(false); + }); + }); +} + +async function waitForHealth(service, maxRetries = 30) { + for (let i = 0; i < maxRetries; i++) { + const healthy = await checkHealth(service.port, service.health); + if (healthy) return true; + await new Promise(r => setTimeout(r, 500)); + } + return false; +} + +console.log('='.repeat(70)); +console.log('๐Ÿš€ StreamMart: Starting Microservices Stack (One-Command Startup)'); +console.log('='.repeat(70)); + +for (const svc of services) { + const child = spawn('node', [svc.file], { + cwd: path.resolve(svc.dir), + env: { ...env, PORT: String(svc.port) }, + stdio: ['ignore', 'pipe', 'pipe'], + }); + + child.stdout.on('data', (d) => { + for (const line of d.toString().split('\n')) { + if (line.trim()) console.log(`[${svc.name}] ${line.trim()}`); + } + }); + + child.stderr.on('data', (d) => { + for (const line of d.toString().split('\n')) { + if (line.trim()) console.error(`[${svc.name}] [ERR] ${line.trim()}`); + } + }); + + child.on('exit', (code) => { + if (code !== 0 && code !== null) { + console.warn(`[${svc.name}] Exited with code ${code}`); + } + }); + + children.push({ ...svc, process: child }); +} + +// Health check barrier +console.log('\nโณ Waiting for all services to report healthy on their /health probes...'); +let allHealthy = true; + +for (const svc of services) { + const ok = await waitForHealth(svc); + if (ok) { + console.log(`โœ… [${svc.name}] is HEALTHY on port ${svc.port}`); + } else { + console.error(`โŒ [${svc.name}] FAILED health check on port ${svc.port}`); + allHealthy = false; + } +} + +if (allHealthy) { + console.log('\n' + '='.repeat(70)); + console.log('๐ŸŽ‰ All 5 StreamMart microservices are ONLINE and HEALTHY!'); + console.log(' - API Gateway: http://localhost:8080/health'); + console.log(' - Payment Svc: http://localhost:8000/health'); + console.log(' - Order Svc: http://localhost:8001/health'); + console.log(' - Email Svc: http://localhost:8002/health'); + console.log(' - Analytic Svc: http://localhost:8003/health'); + console.log('='.repeat(70)); +} else { + console.error('\nโš ๏ธ Some services failed to report healthy within timeout.'); +} + +const shutdown = () => { + console.log('\n๐Ÿ›‘ Shutting down microservices stack...'); + for (const c of children) { + try { + c.process.kill('SIGTERM'); + } catch {} + } + setTimeout(() => process.exit(0), 1000); +}; + +process.on('SIGINT', shutdown); +process.on('SIGTERM', shutdown); diff --git a/scripts/test-checkout.js b/scripts/test-checkout.js new file mode 100644 index 0000000..24266ff --- /dev/null +++ b/scripts/test-checkout.js @@ -0,0 +1,127 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import postgres from '../payment-service/node_modules/postgres/src/index.js'; + +// Load .env +const envPath = path.resolve('.env'); +if (fs.existsSync(envPath)) { + const envContent = fs.readFileSync(envPath, 'utf8'); + for (const line of envContent.split('\n')) { + const trimmed = line.trim(); + if (trimmed && !trimmed.startsWith('#') && trimmed.includes('=')) { + const idx = trimmed.indexOf('='); + const k = trimmed.substring(0, idx).trim(); + const v = trimmed.substring(idx + 1).trim().replace(/^["']|["']$/g, ''); + if (!process.env[k]) process.env[k] = v; + } + } +} + +const GATEWAY_URL = process.env.GATEWAY_URL || 'http://localhost:8085'; +const DB_URL = process.env.DATABASE_URL; + +async function runCheckoutTest() { + console.log('='.repeat(70)); + console.log('๐Ÿ›’ StreamMart: Executing End-to-End Checkout Flow Test'); + console.log('='.repeat(70)); + + // 1. Authenticate via Gateway Token Endpoint (JWT) + console.log('\n[Step 1] Requesting cryptographically signed JWT from API Gateway...'); + const testUserId = `user_test_${Date.now()}`; + const tokenRes = await fetch(`${GATEWAY_URL}/api/auth/token`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ userId: testUserId }), + }); + + if (!tokenRes.ok) { + throw new Error(`Failed to obtain JWT from gateway: ${tokenRes.status} ${tokenRes.statusText}`); + } + + const { token, userId } = await tokenRes.json(); + console.log(`โœ… Obtained JWT for user: ${userId}`); + console.log(` Token prefix: ${token.substring(0, 32)}...`); + + // 2. Dispatch Checkout request to API Gateway + console.log('\n[Step 2] Sending Checkout POST /api/payment through API Gateway...'); + const testCart = [ + { id: 'item-101', name: 'Kafka Architecture Hoodie', price: 65.00 }, + { id: 'item-102', name: 'Postgres Mug', price: 15.50 }, + ]; + + const startTime = Date.now(); + const paymentRes = await fetch(`${GATEWAY_URL}/api/payment`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${token}`, + }, + body: JSON.stringify({ cart: testCart }), + }); + + const responseText = await paymentRes.text(); + const latencyMs = Date.now() - startTime; + + console.log(`โœ… Gateway Response: Status ${paymentRes.status} (Latency: ${latencyMs}ms)`); + console.log(` Message: "${responseText}"`); + + if (!paymentRes.ok) { + throw new Error(`Payment request failed: ${paymentRes.status} ${responseText}`); + } + + // 3. Verify Database Persistence (Payments & Outbox Events) + if (DB_URL) { + console.log('\n[Step 3] Verifying Database persistence in PostgreSQL...'); + const sql = postgres(DB_URL, { ssl: DB_URL.includes('sslmode=require') ? 'require' : false, max: 1 }); + + try { + // Check Payment record + const paymentRows = await sql`SELECT * FROM payments WHERE user_id = ${userId} ORDER BY created_at DESC LIMIT 1`; + if (paymentRows.length > 0) { + console.log(`โœ… Payment Record Found in DB:`); + console.log(` ID: ${paymentRows[0].id} | Amount: $${paymentRows[0].amount} | Status: ${paymentRows[0].status}`); + } else { + console.warn(`โš ๏ธ Payment record not found for user: ${userId}`); + } + + // Check Outbox Event record + const outboxRows = await sql`SELECT * FROM outbox_events ORDER BY created_at DESC LIMIT 1`; + if (outboxRows.length > 0) { + console.log(`โœ… Outbox Event Found in DB:`); + console.log(` ID: ${outboxRows[0].id} | Topic: ${outboxRows[0].topic} | Published: ${outboxRows[0].published}`); + } + + // Check Order record created by order-service + // Wait up to 5s for order-service to consume payment-successful and insert order + console.log('\n[Step 4] Checking for Order Service processing in DB...'); + let orderFound = false; + for (let i = 0; i < 10; i++) { + await new Promise(r => setTimeout(r, 500)); + const orderRows = await sql`SELECT * FROM orders WHERE user_id = ${userId} ORDER BY created_at DESC LIMIT 1`; + if (orderRows.length > 0) { + console.log(`โœ… Order Record Created by Order Service:`); + console.log(` Order ID: ${orderRows[0].id} | User: ${orderRows[0].user_id} | Status: ${orderRows[0].status}`); + orderFound = true; + break; + } + } + if (!orderFound) { + console.log(`โ„น๏ธ Note: Order consumer will process the outbox message once Kafka relay tick fires.`); + } + + await sql.end(); + } catch (dbErr) { + console.error('Database verification error:', dbErr.message); + await sql.end(); + } + } + + console.log('\n' + '='.repeat(70)); + console.log('๐ŸŽ‰ Checkout Flow Test Completed Successfully!'); + console.log('='.repeat(70)); +} + +runCheckoutTest().catch(err => { + console.error('\nโŒ Checkout Test Failed:', err); + process.exit(1); +}); diff --git a/scripts/test-mid-batch-crash.js b/scripts/test-mid-batch-crash.js new file mode 100644 index 0000000..8dc6367 --- /dev/null +++ b/scripts/test-mid-batch-crash.js @@ -0,0 +1,197 @@ +import { execSync, execFileSync } from 'node:child_process'; + +function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + return execSync( + `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`, + { encoding: 'utf8' } + ).trim(); +} + +function getConsumerLag(groupId, topic) { + const out = execSync( + `docker exec streammart-kafka /opt/kafka/bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group ${groupId}`, + { encoding: 'utf8' } + ); + let totalLag = 0; + for (const line of out.split(/\r?\n/)) { + const cols = line.trim().split(/\s+/); + if (cols.length >= 6 && cols[1] === topic) { + const lag = parseInt(cols[5], 10); + if (!Number.isNaN(lag)) totalLag += lag; + } + } + return totalLag; +} + +function produceMessages(topic, lines) { + const input = lines.join('\n') + '\n'; + execFileSync( + 'docker', + [ + 'exec', '-i', 'streammart-kafka', + '/opt/kafka/bin/kafka-console-producer.sh', + '--bootstrap-server', 'localhost:9092', + '--topic', topic, + '--property', 'parse.key=true', + '--property', 'key.separator=|', + ], + { input, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] } + ); +} + +async function waitForOrderHealthy(maxSec = 45) { + for (let i = 0; i < maxSec; i++) { + await sleep(1000); + try { + const status = execSync('docker inspect streammart-order --format "{{.State.Health.Status}}"', { + encoding: 'utf8', + }).trim(); + if (status === 'healthy') return; + } catch {} + } + throw new Error('Timed out waiting for streammart-order to become healthy'); +} + +async function runMidBatchCrashTest() { + const runId = `midbatch_${Date.now()}`; + const BATCH_SIZE = 50; + + console.log('='.repeat(75)); + console.log('๐Ÿงช Live Integration Test: Crash Mid-Batch (After DB Commit, Before Offset Commit)'); + console.log('='.repeat(75)); + + const initialLogs = execSync('docker logs streammart-order 2>&1', { encoding: 'utf8' }); + if (!initialLogs.includes('mode=eachBatch')) { + throw new Error('order-service must be running with CONSUMER_MODE=eachBatch for this test.'); + } + + // 1. Pause order-service so 50 messages queue up into a single batch + console.log('\n[Step 1] Stopping order-service to stage a 50-message batch in Kafka...'); + execSync('docker stop streammart-order', { stdio: 'inherit' }); + + // 2. Produce 50 valid messages; mark last one with testHoldBeforeOffsetCommit=true + // so order-service commits the batch transaction to Postgres and pauses right before resolveOffset() + console.log(`[Step 2] Producing ${BATCH_SIZE} valid payment-successful messages...`); + const kafkaLines = []; + for (let i = 0; i < BATCH_SIZE; i++) { + const evtId = `evt_${runId}_${i}`; + const userId = `user_${runId}_${i}`; + const payload = { + eventId: evtId, + correlationId: evtId, + causationId: evtId, + userId, + cart: [{ id: `item-${i}`, price: 15.0 }], + ...(i === BATCH_SIZE - 1 ? { testHoldBeforeOffsetCommit: true } : {}), + }; + kafkaLines.push(`${userId}|${JSON.stringify(payload)}`); + } + produceMessages('payment-successful', kafkaLines); + console.log(`โœ… Staged ${BATCH_SIZE} messages in payment-successful.`); + + // 3. Start order-service and wait until all 50 orders are committed in Postgres + console.log('\n[Step 3] Starting order-service and waiting for DB batch commit...'); + execSync('docker start streammart-order', { stdio: 'inherit' }); + + let ordersBeforeKill = 0; + for (let i = 0; i < 40; i++) { + await sleep(500); + ordersBeforeKill = parseInt( + queryDb(`SELECT COUNT(*) FROM orders WHERE user_id LIKE 'user_${runId}_%'`), + 10 + ) || 0; + if (ordersBeforeKill === BATCH_SIZE) break; + } + if (ordersBeforeKill !== BATCH_SIZE) { + throw new Error(`Expected ${BATCH_SIZE} orders committed before kill, saw ${ordersBeforeKill}`); + } + console.log(`โœ… Confirmed in Postgres: ${ordersBeforeKill}/${BATCH_SIZE} orders committed.`); + + // 4. Verify Kafka offsets are STILL NOT committed (lag == 50) + const lagBeforeKill = getConsumerLag('order-service', 'payment-successful'); + console.log(`โœ… Confirmed in Kafka BEFORE kill: consumer lag = ${lagBeforeKill} (offsets NOT committed yet).`); + if (lagBeforeKill < BATCH_SIZE) { + throw new Error(`Expected uncommitted lag >= ${BATCH_SIZE} before SIGKILL, got ${lagBeforeKill}`); + } + + // 5. Hard-kill order-service with SIGKILL before offsets are committed + console.log('\n[Step 4] Sending SIGKILL to order-service (docker kill -s SIGKILL streammart-order)...'); + execSync('docker kill -s SIGKILL streammart-order', { stdio: 'inherit' }); + await sleep(1000); + + const runningState = execSync('docker inspect streammart-order --format "{{.State.Running}}"', { + encoding: 'utf8', + }).trim(); + const lagAfterKill = getConsumerLag('order-service', 'payment-successful'); + console.log(` Container running=${runningState} | Kafka lag after kill=${lagAfterKill}`); + if (runningState !== 'false') { + throw new Error(`Expected streammart-order to be stopped after SIGKILL, got running=${runningState}`); + } + + // 6. Restart order-service -> Kafka redelivers all 50 messages -> bulk idempotency skips duplicates -> commits offsets + console.log('\n[Step 5] Restarting order-service (docker start streammart-order)...'); + execSync('docker start streammart-order', { stdio: 'inherit' }); + await waitForOrderHealthy(); + + // Wait for Kafka lag to drop to 0 and all 50 outbox events to publish + console.log('\n[Step 6] Waiting for redelivery dedupe, offset commit (lag -> 0), and outbox publish...'); + let finalLag = -1; + let publishedOutbox = 0; + for (let i = 0; i < 40; i++) { + await sleep(500); + finalLag = getConsumerLag('order-service', 'payment-successful'); + publishedOutbox = parseInt( + queryDb(`SELECT COUNT(*) FROM outbox_events WHERE topic = 'order-successful' AND published = true AND payload->>'userId' LIKE 'user_${runId}_%'`), + 10 + ) || 0; + if (finalLag === 0 && publishedOutbox === BATCH_SIZE) break; + } + + // 7. Strict assertions + const totalOrders = parseInt( + queryDb(`SELECT COUNT(*) FROM orders WHERE user_id LIKE 'user_${runId}_%'`), + 10 + ) || 0; + const distinctUsers = parseInt( + queryDb(`SELECT COUNT(DISTINCT user_id) FROM orders WHERE user_id LIKE 'user_${runId}_%'`), + 10 + ) || 0; + const duplicateRows = queryDb( + `SELECT user_id, COUNT(*) FROM orders WHERE user_id LIKE 'user_${runId}_%' GROUP BY user_id HAVING COUNT(*) > 1` + ); + const dupCount = duplicateRows ? duplicateRows.split('\n').filter(Boolean).length : 0; + + const afterLogs = execSync('docker logs streammart-order --tail 60 2>&1', { encoding: 'utf8' }); + const sawIdempotencySkip = afterLogs.includes('[eachBatch Idempotency]'); + + console.log('\n[Step 7] Verification Summary:'); + console.log(` - Orders in DB: ${totalOrders}/${BATCH_SIZE}`); + console.log(` - Distinct users with order: ${distinctUsers}/${BATCH_SIZE}`); + console.log(` - Duplicate orders: ${dupCount}`); + console.log(` - Published order outbox: ${publishedOutbox}/${BATCH_SIZE}`); + console.log(` - Final Kafka consumer lag: ${finalLag}`); + console.log(` - Redelivery dedupe logged: ${sawIdempotencySkip}`); + + if (totalOrders !== BATCH_SIZE || distinctUsers !== BATCH_SIZE || dupCount !== 0) { + throw new Error(`Order integrity failed: total=${totalOrders}, distinct=${distinctUsers}, dups=${dupCount}`); + } + if (publishedOutbox !== BATCH_SIZE) { + throw new Error(`Outbox publish incomplete: ${publishedOutbox}/${BATCH_SIZE}`); + } + if (finalLag !== 0) { + throw new Error(`Kafka consumer lag did not reach 0 after restart: ${finalLag}`); + } + + console.log('\n' + '='.repeat(75)); + console.log(`๐ŸŽ‰ PASS: Killed mid-batch with SIGKILL after DB commit; ${BATCH_SIZE}/${BATCH_SIZE} orders present, 0 duplicates, lag=0!`); + console.log('='.repeat(75)); +} + +runMidBatchCrashTest().catch((err) => { + console.error('\nโŒ Mid-Batch Crash Test Failed:', err); + process.exit(1); +}); diff --git a/scripts/test-order-crash-recovery.js b/scripts/test-order-crash-recovery.js new file mode 100644 index 0000000..90a839f --- /dev/null +++ b/scripts/test-order-crash-recovery.js @@ -0,0 +1,158 @@ +import { execSync } from 'node:child_process'; +import path from 'node:path'; + +const GATEWAY_URL = process.env.GATEWAY_URL || 'http://localhost:8085'; + +async function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + const cmd = `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`; + const output = execSync(cmd, { encoding: 'utf8' }).trim(); + return output; +} + +async function runCrashRecoveryTest() { + console.log('='.repeat(75)); + console.log('๐Ÿงช StreamMart Phase C: Order-Service Crash Recovery Integration Test'); + console.log('='.repeat(75)); + console.log('Scenario: Kill order-service after DB commit but before event publish.'); + console.log(' Assert that upon restart, order-successful is emitted exactly once.\n'); + + // 1. Authenticate via Gateway to get valid JWT + console.log('[Step 1] Requesting JWT from API Gateway...'); + const testUserId = `user_crash_${Date.now()}`; + const tokenRes = await fetch(`${GATEWAY_URL}/api/auth/token`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ userId: testUserId }), + }); + + if (!tokenRes.ok) { + throw new Error(`Auth failed: ${tokenRes.status} ${await tokenRes.text()}`); + } + const { token } = await tokenRes.json(); + console.log(`โœ… Obtained JWT for: ${testUserId}`); + + // Count baseline orders and outbox rows before test + const initialOrders = parseInt(queryDb(`SELECT COUNT(*) FROM orders WHERE user_id = '${testUserId}'`), 10) || 0; + + // 2. Dispatch checkout with crash hook flag: testCrashAfterDbCommit = true + console.log('\n[Step 2] Sending Checkout with testCrashAfterDbCommit=true flag...'); + const paymentRes = await fetch(`${GATEWAY_URL}/api/payment`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${token}`, + }, + body: JSON.stringify({ + cart: [{ id: 'item-crash', name: 'Fault-Tolerance Mug', price: 99.00 }], + testCrashAfterDbCommit: true, + }), + }); + + if (!paymentRes.ok) { + throw new Error(`Payment request failed: ${paymentRes.status}`); + } + console.log(`โœ… Payment accepted by gateway (200 OK) and queued in outbox.`); + + // 3. Wait for payment outbox worker to publish to Kafka and order-service to consume and crash + console.log('\n[Step 3] Waiting for order-service to consume payment event and trigger crash...'); + let orderCreatedInDb = false; + let orderRow = null; + + for (let i = 0; i < 20; i++) { + await sleep(500); + const count = parseInt(queryDb(`SELECT COUNT(*) FROM orders WHERE user_id = '${testUserId}'`), 10) || 0; + if (count > initialOrders) { + orderCreatedInDb = true; + const row = queryDb(`SELECT id, status FROM orders WHERE user_id = '${testUserId}' LIMIT 1`); + orderRow = row.split('|'); + break; + } + } + + if (!orderCreatedInDb) { + throw new Error('Order was not committed to DB within timeout.'); + } + + console.log(`โœ… Confirmed: Order was committed to DB (Order ID: ${orderRow[0]}, Status: ${orderRow[1]})`); + + // Check outbox row state before publish + const orderOutboxRow = queryDb(`SELECT id, topic, published FROM outbox_events WHERE payload->>'orderId' = '${orderRow[0]}' AND topic = 'order-successful'`); + console.log(`โœ… Confirmed DB Outbox state: ${orderOutboxRow}`); + + // 4. Wait for Docker auto-restart or explicitly restart order-service + console.log('\n[Step 4] Checking order-service crash logs...'); + await sleep(1500); + const orderLogs = execSync('docker logs streammart-order --tail 25', { encoding: 'utf8' }); + if (orderLogs.includes('Simulating immediate order-service crash after DB commit')) { + console.log('โœ… Found crash hook log in order-service:'); + console.log(' "๐Ÿ’ฅ [TEST HOOK]: Simulating immediate order-service crash after DB commit (before relay publish)!"'); + } else { + console.log('โ„น๏ธ order-service logs:\n', orderLogs); + } + + console.log('\n[Step 5] Ensuring order-service is running...'); + execSync('docker restart streammart-order', { stdio: 'inherit' }); + console.log('โœ… order-service container restarted.'); + + // 5. Wait for order-service outbox relay to drain and publish order-successful + console.log('\n[Step 6] Waiting for order-service outbox relay to publish order-successful...'); + let outboxPublished = false; + for (let i = 0; i < 30; i++) { + await sleep(500); + const published = queryDb(`SELECT published FROM outbox_events WHERE payload->>'orderId' = '${orderRow[0]}' AND topic = 'order-successful'`); + if (published.trim() === 't') { + outboxPublished = true; + break; + } + } + + if (!outboxPublished) { + throw new Error('Outbox event was not published after restart!'); + } + console.log('โœ… Confirmed in DB: outbox_events.published = true!'); + + // 6. Assertions + console.log('\n[Step 7] Running Verification Assertions:'); + const finalOrderCount = parseInt(queryDb(`SELECT COUNT(*) FROM orders WHERE user_id = '${testUserId}'`), 10); + console.log(` - Total orders created for user: ${finalOrderCount}`); + if (finalOrderCount !== 1) { + throw new Error(`Assertion Failed: Expected exactly 1 order, found ${finalOrderCount}`); + } + console.log(' โœ… EXACTLY ONE order persisted in database (no duplicates).'); + + const outboxEventCount = parseInt(queryDb(`SELECT COUNT(*) FROM outbox_events WHERE payload->>'orderId' = '${orderRow[0]}' AND topic = 'order-successful'`), 10); + console.log(` - Order outbox rows for this order: ${outboxEventCount}`); + if (outboxEventCount !== 1) { + throw new Error(`Assertion Failed: Expected exactly 1 order-successful outbox row, found ${outboxEventCount}`); + } + console.log(' โœ… EXACTLY ONE order-successful outbox row created and published.'); + + // Check email-service outbox and processing + await sleep(1000); + const emailOutboxCount = parseInt(queryDb(`SELECT COUNT(*) FROM outbox_events WHERE payload->>'orderId' = '${orderRow[0]}' AND topic = 'email-successful'`), 10); + console.log(` - Email outbox rows for this order: ${emailOutboxCount}`); + if (emailOutboxCount === 1) { + console.log(' โœ… EXACTLY ONE email-successful outbox row created and published.'); + } + + // Check email-service processing + await sleep(1000); + const emailProcessed = parseInt(queryDb(`SELECT COUNT(*) FROM processed_events WHERE service_name = 'email-service' AND event_id IN (SELECT id::text FROM outbox_events WHERE payload->>'orderId' = '${orderRow[0]}')`), 10); + console.log(` - Email service processed events: ${emailProcessed}`); + if (emailProcessed >= 1) { + console.log(' โœ… Email service successfully consumed and processed order-successful.'); + } + + console.log('\n' + '='.repeat(75)); + console.log('๐ŸŽ‰ SUCCESS: Crash recovery test passed completely! Zero lost, zero duplicates.'); + console.log('='.repeat(75)); +} + +runCrashRecoveryTest().catch((err) => { + console.error('\nโŒ Crash Recovery Test Failed:', err); + process.exit(1); +}); diff --git a/scripts/test-outbox-outage.js b/scripts/test-outbox-outage.js new file mode 100644 index 0000000..9960459 --- /dev/null +++ b/scripts/test-outbox-outage.js @@ -0,0 +1,212 @@ +import { execSync } from 'node:child_process'; +import path from 'node:path'; + +const GATEWAY_URL = process.env.GATEWAY_URL || 'http://localhost:8085'; +const TOTAL_CHECKOUTS = 500; + +async function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + const cmd = `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`; + return execSync(cmd, { encoding: 'utf8' }).trim(); +} + +async function fetchWithRetry(url, options, maxRetries = 3) { + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + const res = await fetch(url, options); + return res; + } catch (err) { + if (attempt === maxRetries) throw err; + await sleep(100 * attempt); + } + } +} + +async function runOutboxOutageTest() { + console.log('='.repeat(75)); + console.log('๐Ÿงช StreamMart Phase C: Outbox Outage & Concurrent Relay Integration Test'); + console.log('='.repeat(75)); + console.log(`Scenario: Stop Kafka broker, send ${TOTAL_CHECKOUTS} checkouts via API Gateway.`); + console.log(' Restart Kafka, run 2 concurrent outbox relays with SKIP LOCKED.'); + console.log(` Assert: exactly ${TOTAL_CHECKOUTS} orders, 0 lost, 0 duplicates.\n`); + + // 1. Authenticate and obtain JWTs for test users + console.log('[Step 1] Requesting JWT tokens from API Gateway for test users...'); + const batchRunId = `batch_${Date.now()}`; + const concurrency = 20; + const userTokens = new Map(); + + for (let i = 0; i < TOTAL_CHECKOUTS; i += 50) { + const chunk = Array.from({ length: Math.min(50, TOTAL_CHECKOUTS - i) }, (_, idx) => `user_${batchRunId}_${i + idx}`); + await Promise.all( + chunk.map(async (uId) => { + const tokenRes = await fetchWithRetry(`${GATEWAY_URL}/api/auth/token`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ userId: uId }), + }); + if (tokenRes && tokenRes.ok) { + const { token } = await tokenRes.json(); + userTokens.set(uId, token); + } + }) + ); + } + console.log(`โœ… Obtained ${userTokens.size} distinct user JWTs for batch run: ${batchRunId}`); + + // Count baseline + const baselineOrders = parseInt(queryDb('SELECT COUNT(*) FROM orders'), 10) || 0; + const baselinePayments = parseInt(queryDb('SELECT COUNT(*) FROM payments'), 10) || 0; + console.log(`๐Ÿ“Š Baseline DB State: ${baselinePayments} payments, ${baselineOrders} orders`); + + // 2. Stop Kafka Broker + console.log('\n[Step 2] Stopping Kafka broker (docker stop streammart-kafka)...'); + execSync('docker stop streammart-kafka', { stdio: 'inherit' }); + console.log('๐Ÿ›‘ Kafka broker stopped. The messaging system is completely OFFLINE.'); + + // 3. Dispatch 500 checkout requests through API Gateway + console.log(`\n[Step 3] Dispatching ${TOTAL_CHECKOUTS} checkouts to API Gateway while Kafka is DOWN...`); + const startTime = Date.now(); + let successfulRequests = 0; + + const testUserIds = Array.from({ length: TOTAL_CHECKOUTS }, (_, i) => `user_${batchRunId}_${i}`); + + for (let i = 0; i < TOTAL_CHECKOUTS; i += concurrency) { + const batch = testUserIds.slice(i, i + concurrency); + await Promise.all( + batch.map(async (uId) => { + const token = userTokens.get(uId); + const res = await fetchWithRetry(`${GATEWAY_URL}/api/payment`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${token}`, + }, + body: JSON.stringify({ + cart: [{ id: 'item-outage', name: 'Resilience Cap', price: 25.00 }], + }), + }); + + if (res && res.ok) { + successfulRequests++; + } else { + console.error(`Request failed for ${uId}: ${res ? res.status : 'no response'}`); + } + }) + ); + if ((i + concurrency) % 100 === 0 || i + concurrency >= TOTAL_CHECKOUTS) { + process.stdout.write(` Dispatched ${Math.min(i + concurrency, TOTAL_CHECKOUTS)}/${TOTAL_CHECKOUTS} checkouts...\n`); + } + } + + const durationSec = ((Date.now() - startTime) / 1000).toFixed(2); + console.log(`โœ… Dispatched ${successfulRequests}/${TOTAL_CHECKOUTS} checkouts in ${durationSec}s (100% accepted HTTP 200)`); + + if (successfulRequests !== TOTAL_CHECKOUTS) { + throw new Error(`Expected ${TOTAL_CHECKOUTS} successful checkouts, got ${successfulRequests}`); + } + + // 4. Verify DB state while Kafka is DOWN + console.log('\n[Step 4] Verifying database isolation while Kafka is OFFLINE:'); + const paymentsDuringOutage = parseInt(queryDb('SELECT COUNT(*) FROM payments'), 10) - baselinePayments; + const ordersDuringOutage = parseInt(queryDb('SELECT COUNT(*) FROM orders'), 10) - baselineOrders; + const pendingOutboxRows = parseInt(queryDb("SELECT COUNT(*) FROM outbox_events WHERE published = false AND topic = 'payment-successful'"), 10); + + console.log(` - New payments recorded in DB: ${paymentsDuringOutage}/${TOTAL_CHECKOUTS}`); + console.log(` - Pending outbox events in DB: ${pendingOutboxRows}/${TOTAL_CHECKOUTS}`); + console.log(` - Orders processed while Kafka is down: ${ordersDuringOutage} (Must be exactly 0)`); + + if (paymentsDuringOutage !== TOTAL_CHECKOUTS || ordersDuringOutage !== 0 || pendingOutboxRows < TOTAL_CHECKOUTS) { + throw new Error('Database isolation check failed! Outbox rows must buffer while Kafka is down.'); + } + console.log('โœ… PASS: All 500 events safely buffered in outbox table without data loss.'); + + // 5. Restart Kafka Broker + console.log('\n[Step 5] Restarting Kafka broker (docker start streammart-kafka)...'); + execSync('docker start streammart-kafka', { stdio: 'inherit' }); + console.log('โณ Waiting for Kafka to become healthy and accept connections...'); + + let kafkaReady = false; + for (let i = 0; i < 35; i++) { + await sleep(1000); + try { + const inspect = execSync('docker inspect --format "{{.State.Health.Status}}" streammart-kafka', { encoding: 'utf8' }).trim(); + if (inspect === 'healthy') { + kafkaReady = true; + break; + } + } catch {} + } + console.log('โœ… Kafka broker is back ONLINE and HEALTHY.'); + + // 6. Spawn 2nd Concurrent Outbox Relay Instance + console.log('\n[Step 6] Running 2 concurrent Outbox Relay instances with SELECT ... FOR UPDATE SKIP LOCKED...'); + try { + execSync('docker exec -d streammart-payment node -e "import(\'./worker.js\').then(m => m.startOutboxWorker())"'); + console.log('โœ… Concurrent Outbox Relay Instance #2 launched in background.'); + } catch (err) { + console.warn('Note on 2nd relay:', err.message); + } + + // 7. Drain Outbox and wait for Order Service to process all 500 events + console.log('\n[Step 7] Waiting for outbox to drain and order-service to consume all events...'); + const drainStart = Date.now(); + let drained = false; + + for (let i = 0; i < 100; i++) { + await sleep(1000); + const result = queryDb(`SELECT (SELECT COUNT(*) FROM outbox_events WHERE published = false AND topic = 'payment-successful') || '|' || (SELECT COUNT(*) FROM orders WHERE user_id LIKE 'user_${batchRunId}_%')`); + const [remStr, ordStr] = result.split('|'); + const remainingOutbox = parseInt(remStr, 10) || 0; + const currentOrders = parseInt(ordStr, 10) || 0; + + process.stdout.write(` [Drain Progress] Unpublished outbox: ${remainingOutbox} | Orders created: ${currentOrders}/${TOTAL_CHECKOUTS}\r`); + + if (remainingOutbox === 0 && currentOrders === TOTAL_CHECKOUTS) { + drained = true; + console.log(`\nโœ… Outbox completely drained and all orders processed in ${((Date.now() - drainStart) / 1000).toFixed(1)}s!`); + break; + } + } + + if (!drained) { + console.log('\n'); + throw new Error('Timeout waiting for outbox drain and order processing.'); + } + + // 8. Assertions: 500 orders, 0 lost, 0 duplicates processed + console.log('\n[Step 8] Executing Strict Correctness & Concurrency Assertions:'); + + const finalBatchOrders = parseInt(queryDb(`SELECT COUNT(*) FROM orders WHERE user_id LIKE 'user_${batchRunId}_%'`), 10); + console.log(` 1. Total orders created for batch: ${finalBatchOrders}/${TOTAL_CHECKOUTS}`); + if (finalBatchOrders !== TOTAL_CHECKOUTS) { + throw new Error(`ASSERTION FAILED: Expected ${TOTAL_CHECKOUTS} orders, got ${finalBatchOrders} (Lost: ${TOTAL_CHECKOUTS - finalBatchOrders})`); + } + console.log(' โœ… 0 Orders Lost (100% delivery guarantee).'); + + const duplicateUsers = queryDb(`SELECT user_id, COUNT(*) FROM orders WHERE user_id LIKE 'user_${batchRunId}_%' GROUP BY user_id HAVING COUNT(*) > 1`); + console.log(` 2. Duplicate orders detected: ${duplicateUsers ? duplicateUsers.split('\n').length : 0}`); + if (duplicateUsers && duplicateUsers.length > 0) { + throw new Error(`ASSERTION FAILED: Duplicate orders detected!\n${duplicateUsers}`); + } + console.log(' โœ… 0 Duplicates Processed (Strict Idempotency verified).'); + + const processedEventsCount = parseInt(queryDb(`SELECT COUNT(*) FROM processed_events WHERE service_name = 'order-service' AND event_id IN (SELECT id::text FROM outbox_events WHERE payload->>'userId' LIKE 'user_${batchRunId}_%')`), 10); + console.log(` 3. Order-service processed_events records: ${processedEventsCount}/${TOTAL_CHECKOUTS}`); + if (processedEventsCount !== TOTAL_CHECKOUTS) { + throw new Error(`ASSERTION FAILED: Expected ${TOTAL_CHECKOUTS} processed_events records, got ${processedEventsCount}`); + } + console.log(' โœ… Exactly 500 idempotent event records stored.'); + + console.log('\n' + '='.repeat(75)); + console.log(`๐ŸŽ‰ SUCCESS: 500 orders processed, 0 lost, 0 duplicates under broker outage & concurrent relays!`); + console.log('='.repeat(75)); +} + +runOutboxOutageTest().catch((err) => { + console.error('\nโŒ Outbox Outage Test Failed:', err); + process.exit(1); +}); diff --git a/scripts/test-outbox-pruner.js b/scripts/test-outbox-pruner.js new file mode 100644 index 0000000..cf6b7fc --- /dev/null +++ b/scripts/test-outbox-pruner.js @@ -0,0 +1,141 @@ +import { execSync } from 'node:child_process'; +import crypto from 'node:crypto'; + +function queryDb(sqlQuery) { + return execSync( + 'docker exec -i streammart-postgres psql -U postgres -d streammart -t -A', + { input: sqlQuery, encoding: 'utf8' } + ).trim(); +} + +function runServicePruner(service, jsCode) { + const escaped = jsCode.replace(/\n\s*/g, ' ').replace(/"/g, '\\"'); + return execSync( + `docker compose run --rm --no-deps ${service} node --input-type=module -e "${escaped}"`, + { encoding: 'utf8' } + ).trim(); +} + +async function main() { + console.log('='.repeat(75)); + console.log('๐Ÿงช Outbox Pruner Integration Test (Real PostgreSQL โ€” No Mocks)'); + console.log('='.repeat(75)); + + const tag = `prune_test_${Date.now()}`; + const ids = { + payOldPub1: crypto.randomUUID(), + payOldPub2: crypto.randomUUID(), + payRecentPub: crypto.randomUUID(), + payOldUnpub: crypto.randomUUID(), + orderOldPub: crypto.randomUUID(), + emailOldPub: crypto.randomUUID(), + }; + + console.log('[Step 1] Stopping relay containers briefly so live relays do not race on the unpublished test row...'); + execSync('docker compose stop payment-service order-service email-service', { stdio: 'inherit' }); + + try { + console.log('\n[Step 2] Inserting 6 test rows into real PostgreSQL outbox_events table...'); + const insertSql = ` + INSERT INTO outbox_events (id, topic, payload, published, created_at) VALUES + ('${ids.payOldPub1}', 'payment-successful', '{"tag":"${tag}","case":"old_pub_1"}'::jsonb, true, NOW() - INTERVAL '2 hours'), + ('${ids.payOldPub2}', 'payment-successful', '{"tag":"${tag}","case":"old_pub_2"}'::jsonb, true, NOW() - INTERVAL '3 hours'), + ('${ids.payRecentPub}', 'payment-successful', '{"tag":"${tag}","case":"recent_pub"}'::jsonb, true, NOW() - INTERVAL '10 minutes'), + ('${ids.payOldUnpub}', 'payment-successful', '{"tag":"${tag}","case":"old_unpub"}'::jsonb, false, NOW() - INTERVAL '2 hours'), + ('${ids.orderOldPub}', 'order-successful', '{"tag":"${tag}","case":"order_old"}'::jsonb, true, NOW() - INTERVAL '2 hours'), + ('${ids.emailOldPub}', 'email-successful', '{"tag":"${tag}","case":"email_old"}'::jsonb, true, NOW() - INTERVAL '2 hours'); + `; + queryDb(insertSql); + + const beforeTotal = parseInt(queryDb(`SELECT COUNT(*) FROM outbox_events WHERE payload->>'tag' = '${tag}';`), 10); + console.log(` Inserted ${beforeTotal} test rows (Expected: 6).`); + if (beforeTotal !== 6) throw new Error(`Expected 6 inserted test rows, got ${beforeTotal}`); + + console.log('\n[Step 3] Running real prunePublishedEvents(true) against real PostgreSQL...'); + const payOut = runServicePruner( + 'payment-service', + `import { prunePublishedEvents, getPrunerStatus } from './worker.js'; + const deleted = await prunePublishedEvents(true); + console.log(JSON.stringify({ deleted, status: getPrunerStatus() })); + process.exit(0);` + ); + console.log(` payment-service pruner output:\n ${payOut}`); + const payResult = JSON.parse(payOut.split('\n').pop()); + + console.log('\n[Step 4] Running real pruneOrderOutboxEvents(1) against real PostgreSQL...'); + const orderOut = runServicePruner( + 'order-service', + `import { pruneOrderOutboxEvents } from './worker.js'; + const deleted = await pruneOrderOutboxEvents(1); + console.log(JSON.stringify({ deleted })); + process.exit(0);` + ); + console.log(` order-service pruner output:\n ${orderOut}`); + + console.log('\n[Step 5] Running real pruneEmailOutboxEvents(1) against real PostgreSQL...'); + const emailOut = runServicePruner( + 'email-service', + `import { pruneEmailOutboxEvents } from './worker.js'; + const deleted = await pruneEmailOutboxEvents(1); + console.log(JSON.stringify({ deleted })); + process.exit(0);` + ); + console.log(` email-service pruner output:\n ${emailOut}`); + + console.log('\n[Step 6] Verifying surviving rows in real PostgreSQL...'); + const remainingRaw = queryDb( + `SELECT id || '|' || topic || '|' || published || '|' || (payload->>'case') FROM outbox_events WHERE payload->>'tag' = '${tag}' ORDER BY id;` + ); + const remainingRows = remainingRaw ? remainingRaw.split('\n').filter(Boolean) : []; + console.log(' Surviving test rows:'); + for (const row of remainingRows) console.log(` - ${row}`); + + const exists = (id) => remainingRows.some((r) => r.startsWith(id)); + + if (exists(ids.payOldPub1) || exists(ids.payOldPub2)) { + throw new Error('FAIL: Old published payment-successful rows were NOT deleted!'); + } + if (exists(ids.orderOldPub)) { + throw new Error('FAIL: Old published order-successful row was NOT deleted!'); + } + if (exists(ids.emailOldPub)) { + throw new Error('FAIL: Old published email-successful row was NOT deleted!'); + } + if (!exists(ids.payRecentPub)) { + throw new Error('FAIL: Recent published payment-successful row was wrongly deleted!'); + } + if (!exists(ids.payOldUnpub)) { + throw new Error('FAIL: Old UNPUBLISHED payment-successful row was wrongly deleted!'); + } + if (payResult.deleted < 2) { + throw new Error(`FAIL: Expected at least 2 deleted payment outbox rows, got ${payResult.deleted}`); + } + if (payResult.status.lastError !== null) { + throw new Error(`FAIL: Pruner reported error: ${payResult.status.lastError}`); + } + } finally { + // Clean up surviving test rows BEFORE restarting live relays + queryDb(`DELETE FROM outbox_events WHERE payload->>'tag' = '${tag}';`); + console.log('\n[Step 7] Restarting relay containers and checking /relay-status telemetry...'); + execSync('docker compose up -d payment-service order-service email-service api-gateway', { stdio: 'inherit' }); + } + + // Wait briefly for payment-service to start and connect + await new Promise((r) => setTimeout(r, 4000)); + const relayStatusRaw = execSync( + `docker exec streammart-payment node -e "fetch('http://localhost:8000/relay-status').then(async r => console.log(JSON.stringify({ httpStatus: r.status, body: await r.json() })))"`, + { encoding: 'utf8' } + ).trim(); + console.log(` /relay-status response: ${relayStatusRaw}`); + + console.log('\nโœ… PASS: Real Postgres Outbox Pruner Integration Test succeeded!'); + console.log(' - Old published rows (payment-successful, order-successful, email-successful) deleted.'); + console.log(' - Recent published row retained.'); + console.log(' - Old unpublished row retained (never pruned before delivery).'); + console.log(' - /relay-status exposes live pruner status and error visibility.'); +} + +main().catch((err) => { + console.error('\nโŒ Outbox Pruner Integration Test FAILED:', err.message); + process.exit(1); +}); diff --git a/scripts/test-poison-batch.js b/scripts/test-poison-batch.js new file mode 100644 index 0000000..7f9da74 --- /dev/null +++ b/scripts/test-poison-batch.js @@ -0,0 +1,209 @@ +import { execSync, execFileSync } from 'node:child_process'; + +function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + return execSync( + `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`, + { encoding: 'utf8' } + ).trim(); +} + +function getConsumerLag(groupId, topic) { + const out = execSync( + `docker exec streammart-kafka /opt/kafka/bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group ${groupId}`, + { encoding: 'utf8' } + ); + let totalLag = 0; + for (const line of out.split(/\r?\n/)) { + const cols = line.trim().split(/\s+/); + if (cols.length >= 6 && cols[1] === topic) { + const lag = parseInt(cols[5], 10); + if (!Number.isNaN(lag)) totalLag += lag; + } + } + return totalLag; +} + +function produceMessages(topic, lines) { + const input = lines.join('\n') + '\n'; + execFileSync( + 'docker', + [ + 'exec', '-i', 'streammart-kafka', + '/opt/kafka/bin/kafka-console-producer.sh', + '--bootstrap-server', 'localhost:9092', + '--topic', topic, + '--property', 'parse.key=true', + '--property', 'key.separator=|', + ], + { input, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] } + ); +} + +function readAllDlqMessages() { + try { + const out = execSync( + 'docker exec streammart-kafka /opt/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic payment-successful.DLQ --from-beginning --timeout-ms 4000', + { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] } + ); + return out + .split(/\r?\n/) + .map((l) => l.trim()) + .filter((l) => l.startsWith('{')) + .map((l) => JSON.parse(l)); + } catch (err) { + const stdout = err.stdout ? err.stdout.toString() : ''; + return stdout + .split(/\r?\n/) + .map((l) => l.trim()) + .filter((l) => l.startsWith('{')) + .map((l) => JSON.parse(l)); + } +} + +async function waitForOrderHealthy(maxSec = 45) { + for (let i = 0; i < maxSec; i++) { + await sleep(1000); + try { + const status = execSync('docker inspect streammart-order --format "{{.State.Health.Status}}"', { + encoding: 'utf8', + }).trim(); + if (status === 'healthy') return; + } catch {} + } + throw new Error('Timed out waiting for streammart-order to become healthy'); +} + +async function runPoisonBatchTest() { + const runId = `poison_${Date.now()}`; + const poisonEventId = `poison_evt_${runId}`; + const BATCH_SIZE = 50; + const POISON_INDEX = 24; + + console.log('='.repeat(75)); + console.log('๐Ÿงช Live Integration Test: Poison Message in eachBatch (1 bad among 50)'); + console.log('='.repeat(75)); + + // Verify order-service is in eachBatch mode + const initialLogs = execSync('docker logs streammart-order 2>&1', { encoding: 'utf8' }); + if (!initialLogs.includes('mode=eachBatch')) { + throw new Error('order-service must be running with CONSUMER_MODE=eachBatch for this test.'); + } + + // 1. Stop order-service briefly so all 50 messages queue up and arrive as one batch + console.log('\n[Step 1] Pausing order-service so 50 messages accumulate as a single batch...'); + execSync('docker stop streammart-order', { stdio: 'inherit' }); + + // 2. Produce 49 valid messages + 1 poison message (userId: null -> PG 23502 NOT NULL violation) + console.log(`[Step 2] Producing ${BATCH_SIZE} messages to payment-successful (index ${POISON_INDEX} has userId=null)...`); + const kafkaLines = []; + for (let i = 0; i < BATCH_SIZE; i++) { + if (i === POISON_INDEX) { + const payload = { + eventId: poisonEventId, + correlationId: poisonEventId, + causationId: poisonEventId, + userId: null, + cart: [{ id: 'poison-item', price: 10 }], + }; + kafkaLines.push(`poison-key|${JSON.stringify(payload)}`); + } else { + const evtId = `valid_evt_${runId}_${i}`; + const userId = `user_${runId}_${i}`; + const payload = { + eventId: evtId, + correlationId: evtId, + causationId: evtId, + userId, + cart: [{ id: `item-${i}`, price: 19.99 }], + }; + kafkaLines.push(`${userId}|${JSON.stringify(payload)}`); + } + } + produceMessages('payment-successful', kafkaLines); + console.log(`โœ… Produced ${BATCH_SIZE} messages (49 valid + 1 poison).`); + + // 3. Start order-service so eachBatch fetches the batch + console.log('\n[Step 3] Starting order-service (eachBatch mode)...'); + execSync('docker start streammart-order', { stdio: 'inherit' }); + await waitForOrderHealthy(); + + // 4. Wait for 49 orders to be created + console.log('\n[Step 4] Waiting for batch fallback and 49 valid orders to commit...'); + let createdOrders = 0; + for (let i = 0; i < 40; i++) { + await sleep(500); + createdOrders = parseInt( + queryDb(`SELECT COUNT(*) FROM orders WHERE user_id LIKE 'user_${runId}_%'`), + 10 + ) || 0; + if (createdOrders === 49) break; + } + console.log(` Orders created for batch: ${createdOrders}/49`); + if (createdOrders !== 49) { + throw new Error(`Expected exactly 49 orders, got ${createdOrders}`); + } + + // 5. Verify exactly 1 message landed in payment-successful.DLQ for this run + console.log('\n[Step 5] Checking payment-successful.DLQ for the poison message...'); + const dlqAll = readAllDlqMessages(); + const matchingDlq = dlqAll.filter((m) => m.eventId === poisonEventId); + console.log(` Matching DLQ messages for ${poisonEventId}: ${matchingDlq.length}`); + if (matchingDlq.length !== 1) { + throw new Error(`Expected exactly 1 DLQ message for ${poisonEventId}, found ${matchingDlq.length}`); + } + console.log(` DLQ error recorded: ${matchingDlq[0].error}`); + + // 6. Verify fallback log occurred + const afterLogs = execSync('docker logs streammart-order --tail 80 2>&1', { encoding: 'utf8' }); + const sawFallback = afterLogs.includes('[eachBatch Fallback]'); + console.log(` Saw [eachBatch Fallback] in order-service logs: ${sawFallback}`); + if (!sawFallback) { + throw new Error('Expected [eachBatch Fallback] log message proving batch tx failed and fell back 1-by-1'); + } + + // 7. Verify consumer is NOT stuck: send 1 follow-up healthy message (#51) + console.log('\n[Step 6] Sending follow-up healthy message #51 to prove consumer is NOT stuck...'); + const followUpUser = `user_${runId}_followup`; + const followUpEvt = `evt_${runId}_followup`; + produceMessages('payment-successful', [ + `${followUpUser}|${JSON.stringify({ + eventId: followUpEvt, + correlationId: followUpEvt, + causationId: followUpEvt, + userId: followUpUser, + cart: [{ id: 'followup-item', price: 42 }], + })}`, + ]); + + let followUpOrders = 0; + for (let i = 0; i < 20; i++) { + await sleep(500); + followUpOrders = parseInt( + queryDb(`SELECT COUNT(*) FROM orders WHERE user_id = '${followUpUser}'`), + 10 + ) || 0; + if (followUpOrders === 1) break; + } + if (followUpOrders !== 1) { + throw new Error(`Consumer appears stuck: follow-up message was not processed (orders=${followUpOrders})`); + } + + const finalLag = getConsumerLag('order-service', 'payment-successful'); + console.log(` Follow-up order created: ${followUpOrders}/1 | Kafka consumer lag: ${finalLag}`); + if (finalLag !== 0) { + throw new Error(`Expected Kafka consumer lag 0, got ${finalLag}`); + } + + console.log('\n' + '='.repeat(75)); + console.log('๐ŸŽ‰ PASS: 49 orders created, 1 poison message in DLQ, follow-up #51 processed, lag=0!'); + console.log('='.repeat(75)); +} + +runPoisonBatchTest().catch((err) => { + console.error('\nโŒ Poison Batch Test Failed:', err); + process.exit(1); +}); diff --git a/scripts/test-relay-startup.js b/scripts/test-relay-startup.js new file mode 100644 index 0000000..cff89d6 --- /dev/null +++ b/scripts/test-relay-startup.js @@ -0,0 +1,202 @@ +import { execSync } from 'node:child_process'; + +async function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +function queryDb(sqlQuery) { + const cmd = `docker exec streammart-postgres psql -U postgres -d streammart -t -A -c "${sqlQuery}"`; + return execSync(cmd, { encoding: 'utf8' }).trim(); +} + +function queryPaymentService(script) { + const cmd = `docker exec streammart-payment node -e "${script}"`; + return execSync(cmd, { encoding: 'utf8' }).trim(); +} + +async function runTest() { + console.log('='.repeat(75)); + console.log('๐Ÿงช Relay Startup Integration Test: Kafka Down -> Startup -> Up -> Deliver'); + console.log('='.repeat(75)); + + const testUserId = `user_startup_${Date.now()}`; + console.log(`Test user: ${testUserId}`); + + // Step 1: Clean reset for test isolation + console.log('[Step 1] Ensuring clean database and Kafka state for test isolation...'); + execSync('docker exec streammart-postgres psql -U postgres -d streammart -c "TRUNCATE payments, orders, processed_events, outbox_events CASCADE;"', { stdio: 'inherit' }); + const topics = ['payment-successful', 'order-successful', 'email-successful', 'payment-successful.DLQ']; + for (const topic of topics) { + try { + execSync(`docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic ${topic}`, { stdio: 'pipe' }); + } catch (_) {} + try { + execSync(`docker exec streammart-kafka /opt/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --if-not-exists --topic ${topic} --partitions 1 --replication-factor 1`, { stdio: 'pipe' }); + } catch (_) {} + } + execSync('docker compose restart order-service email-service', { stdio: 'inherit' }); + await sleep(3000); + + const baselinePayments = parseInt(queryDb('SELECT COUNT(*) FROM payments'), 10) || 0; + const baselineOrders = parseInt(queryDb('SELECT COUNT(*) FROM orders'), 10) || 0; + console.log(` Baseline DB State: ${baselinePayments} payments, ${baselineOrders} orders`); + + // Step 2: Stop Kafka + console.log('\n[Step 2] Stopping Kafka broker (docker stop streammart-kafka)...'); + execSync('docker stop streammart-kafka', { stdio: 'inherit' }); + console.log('๐Ÿ›‘ Kafka broker stopped.'); + + // Step 3: Restart payment-service with Kafka DOWN + console.log('\n[Step 3] Restarting payment-service with Kafka DOWN (docker restart streammart-payment)...'); + execSync('docker restart streammart-payment', { stdio: 'inherit' }); + await sleep(3000); + + // Step 4: Verify payment /health is 200 (liveness) and /relay-status is 503 (relay disconnected) + console.log('\n[Step 4] Probing payment-service /health and /relay-status while Kafka is down...'); + const livenessScript = ` + fetch('http://localhost:8000/health') + .then(async r => console.log(JSON.stringify({ status: r.status, text: await r.text() }))) + .catch(e => console.log(JSON.stringify({ error: e.message }))); + `.replace(/\n\s+/g, ' '); + + const relayStatusScript = ` + fetch('http://localhost:8000/relay-status') + .then(async r => console.log(JSON.stringify({ status: r.status, text: await r.text() }))) + .catch(e => console.log(JSON.stringify({ error: e.message }))); + `.replace(/\n\s+/g, ' '); + + const livenessResRaw = queryPaymentService(livenessScript); + console.log(` Liveness (/health) response: ${livenessResRaw}`); + const livenessRes = JSON.parse(livenessResRaw); + + const relayResRaw = queryPaymentService(relayStatusScript); + console.log(` Relay Status (/relay-status) response: ${relayResRaw}`); + const relayRes = JSON.parse(relayResRaw); + + if (livenessRes.status !== 200) { + throw new Error(`Expected liveness check /health to return 200 while process is alive, got: ${livenessRes.status}`); + } + if (relayRes.status !== 503) { + throw new Error(`Expected /relay-status to return 503 while Kafka is down, got: ${relayRes.status}`); + } + console.log('โœ… PASS: /health returned 200 (process alive) and /relay-status returned 503 (relay loop not connected to Kafka).'); + + // Step 5: Submit payment while Kafka is down + console.log('\n[Step 5] Submitting checkout to payment-service while Kafka is down...'); + const paymentScript = ` + fetch('http://localhost:8000/payment', { + method: 'POST', + headers: { 'Content-Type': 'application/json', 'x-user-id': '${testUserId}' }, + body: JSON.stringify({ cart: [{ price: 49.99 }] }) + }) + .then(async r => console.log(JSON.stringify({ status: r.status, text: await r.text() }))) + .catch(e => console.log(JSON.stringify({ error: e.message }))); + `.replace(/\n\s+/g, ' '); + + const paymentResRaw = queryPaymentService(paymentScript); + console.log(` Payment response: ${paymentResRaw}`); + const paymentRes = JSON.parse(paymentResRaw); + + if (paymentRes.status !== 200) { + throw new Error(`Expected payment HTTP 200, got: ${paymentRes.status}`); + } + console.log('โœ… PASS: Payment accepted (HTTP 200) and atomically queued in outbox table.'); + + // Step 6: Verify DB isolation while Kafka is down + console.log('\n[Step 6] Verifying database isolation while Kafka is down...'); + const unpubCount = parseInt( + queryDb(`SELECT COUNT(*) FROM outbox_events WHERE payload->>'userId' = '${testUserId}' AND published = false`), + 10 + ); + const ordersWhileDown = parseInt( + queryDb(`SELECT COUNT(*) FROM orders WHERE user_id = '${testUserId}'`), + 10 + ); + + console.log(` - Unpublished outbox row for user: ${unpubCount} (Expected: 1)`); + console.log(` - Orders created for user while Kafka down: ${ordersWhileDown} (Expected: 0)`); + + if (unpubCount !== 1 || ordersWhileDown !== 0) { + throw new Error('Database isolation check failed!'); + } + console.log('โœ… PASS: Event safely buffered in outbox table with published = false.'); + + // Step 7: Bring Kafka up + console.log('\n[Step 7] Bringing Kafka UP (docker start streammart-kafka)...'); + execSync('docker start streammart-kafka', { stdio: 'inherit' }); + console.log('โณ Waiting for Kafka to become healthy...'); + + let kafkaReady = false; + for (let i = 0; i < 45; i++) { + await sleep(1000); + try { + const inspectData = JSON.parse(execSync('docker inspect streammart-kafka', { encoding: 'utf8' })); + const status = inspectData[0]?.State?.Health?.Status; + if (status === 'healthy') { + kafkaReady = true; + break; + } + } catch (_) {} + } + + if (!kafkaReady) { + throw new Error('Kafka container failed to become healthy within 45s'); + } + console.log('โœ… Kafka broker is back ONLINE and HEALTHY.'); + + // Step 8: Verify payment /relay-status transitions to 200 as retry connects + console.log('\n[Step 8] Waiting for payment relay retry loop to connect and /relay-status to return 200...'); + let health200 = false; + for (let i = 0; i < 20; i++) { + await sleep(1000); + try { + const res = JSON.parse(queryPaymentService(relayStatusScript)); + if (res.status === 200) { + health200 = true; + console.log(` /relay-status returned 200 OK after ${i + 1}s! Message: "${res.text}"`); + break; + } + } catch (_) {} + } + + if (!health200) { + throw new Error('Payment service /relay-status failed to transition to 200 OK after Kafka restart'); + } + console.log('โœ… PASS: /relay-status successfully transitioned to 200 OK upon Kafka reconnection.'); + + // Step 9: Confirm outbox delivery and order creation + console.log('\n[Step 9] Confirming event delivery and downstream order processing...'); + let delivered = false; + for (let i = 0; i < 25; i++) { + await sleep(1000); + const pubStatus = queryDb( + `SELECT published FROM outbox_events WHERE payload->>'userId' = '${testUserId}' LIMIT 1` + ); + const orderCreated = parseInt( + queryDb(`SELECT COUNT(*) FROM orders WHERE user_id = '${testUserId}'`), + 10 + ); + + process.stdout.write(` [Waiting] outbox published: ${pubStatus} | orders created: ${orderCreated}\r`); + if (pubStatus === 't' && orderCreated === 1) { + delivered = true; + console.log(`\nโœ… PASS: Event published to Kafka (published = true) and order-service created order for ${testUserId}!`); + break; + } + } + + if (!delivered) { + console.log('\n'); + throw new Error('Timeout waiting for event delivery or order creation'); + } + + console.log('\n' + '='.repeat(75)); + console.log('๐ŸŽ‰ SUCCESS: Relay startup test complete! Kafka connect retry with backoff,'); + console.log(' 503 health check under outage, and zero-loss event delivery verified!'); + console.log('='.repeat(75)); +} + +runTest().catch((err) => { + console.error('\nโŒ Relay Startup Test FAILED:', err); + process.exit(1); +}); diff --git a/scripts/verify-db.js b/scripts/verify-db.js new file mode 100644 index 0000000..b9149af --- /dev/null +++ b/scripts/verify-db.js @@ -0,0 +1,20 @@ +import fs from 'node:fs'; +import postgres from '../payment-service/node_modules/postgres/src/index.js'; + +const envContent = fs.readFileSync('.env', 'utf8'); +const match = envContent.match(/DATABASE_URL=(.+)/); +const dbUrl = match ? match[1].trim().replace(/^["']|["']$/g, '') : null; + +const sql = postgres(dbUrl, { ssl: 'require' }); + +async function check() { + const payments = await sql`SELECT id, user_id, amount, status, created_at FROM payments ORDER BY created_at DESC LIMIT 5`; + console.log("Recent Payments:", payments); + const outbox = await sql`SELECT id, topic, payload, published, created_at FROM outbox_events ORDER BY created_at DESC LIMIT 5`; + console.log("Recent Outbox Events:", outbox); + const orders = await sql`SELECT id, user_id, items, status, created_at FROM orders ORDER BY created_at DESC LIMIT 5`; + console.log("Recent Orders:", orders); + await sql.end(); +} + +check().catch(console.error);