### Start Server with Docker Compose Source: https://github.com/ntsd/websocket-benchmark/blob/master/README.md This command starts the websocket server using Docker Compose. Replace 'fasthttp-websocket' with the desired framework to test. ```sh docker compose up fasthttp-websocket ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/tokio-tungstenite/binary-sync.txt This snippet outlines the k6 benchmark setup, including the execution environment, script used, and scenario configuration. It details the number of virtual users, duration, and graceful stop period. ```shell execution: local script: ./benchmarks/binary-sync.js output: - scenarios: (100.00%) 1 scenario, 64 max VUs, 35s max duration (incl. graceful stop): * default: 64 looping VUs for 5s (gracefulStop: 30s) ``` -------------------------------- ### K6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/fasthttp-websocket/plain-async.txt This snippet outlines the K6 benchmark setup, specifying the execution environment, the script used, and the scenario configuration. It details the number of virtual users, duration, and graceful stop settings for the test. ```shell Project: /ntsd/websocket-benchmark execution: local script: ./benchmarks/plain-async.js output: - scenarios: (100.00%) 1 scenario, 64 max VUs, 35s max duration (incl. graceful stop): * default: 64 looping VUs for 5s (gracefulStop: 30s) ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/uwebsocket-js/plain-sync.txt This snippet outlines the k6 benchmark setup, including the execution environment, script path, and scenario definition. It specifies the number of virtual users, duration, and graceful stop period. ```shell execution: local script: ./benchmarks/plain-sync.js output: - scenarios: (100.00%) 1 scenario, 128 max VUs, 35s max duration (incl. graceful stop): * default: 128 looping VUs for 5s (gracefulStop: 30s) ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/bun-websocket/json-async.txt This snippet outlines the k6 benchmark configuration, including the script used, execution environment, and scenario details. It shows the setup for 64 virtual users running for 5 seconds with a graceful stop period. ```shell Project: /ntsd/websocket-benchmark Content: /\ |‾‾| /‾‾/ /‾‾/ /\ / \ | |/ / / / / \/ \ | ( / ‾‾\ / \ | |\ \ | (‾) | / __________ \ |__| \__\ \_____/ .io execution: local script: ./benchmarks/json-async.js output: - scenarios: (100.00%) 1 scenario, 64 max VUs, 35s max duration (incl. graceful stop): * default: 64 looping VUs for 5s (gracefulStop: 30s) ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/fasthttp-websocket/binary-sync.txt This snippet shows the configuration and execution flow of a k6 benchmark script for websocket performance. It details the execution environment, the script used, scenario setup with virtual users and duration, and the progress of the benchmark run. ```shell execution: local script: ./benchmarks/binary-sync.js output: - scenarios: (100.00%) 1 scenario, 128 max VUs, 35s max duration (incl. graceful stop): * default: 128 looping VUs for 5s (gracefulStop: 30s) running (01.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 20% ] 128 VUs 1.0s/5s running (02.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 40% ] 128 VUs 2.0s/5s running (03.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 60% ] 128 VUs 3.0s/5s running (04.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 80% ] 128 VUs 4.0s/5s running (05.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 100% ] 128 VUs 5.0s/5s running (06.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s ... running (35.0s), 000/128 VUs, 0 complete and 128 interrupted iterations default ✓ [ 100% ] 128 VUs 5s ``` -------------------------------- ### k6 Assertion Examples Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/uwebsocket-js/binary-async.txt Illustrates example assertions used within the k6 benchmark script to validate WebSocket communication and data integrity. ```javascript ✓ expected ${this} to be a number ✓ expected ${this} to equal +0 ✓ status is 101 ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/tokio-tungstenite/binary-async.txt This snippet details the configuration and execution flow of a k6 benchmark. It specifies the script to be run, the execution environment, and the scenario parameters, including the number of virtual users and duration. The output shows the progress of the benchmark and the final results. ```shell Project: /ntsd/websocket-benchmark Content: /\ |‾‾| /‾‾/ /‾‾/ /\ / \ | |/ / / / / \/ \ | ( / ‾‾\ / \ | |\ \ | (‾) | / __________ \ |__| \__\ \_____/ .io execution: local script: ./benchmarks/binary-async.js output: - scenarios: (100.00%) 1 scenario, 64 max VUs, 35s max duration (incl. graceful stop): * default: 64 looping VUs for 5s (gracefulStop: 30s) running (01.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 19% ] 64 VUs 1.0s/5s running (02.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 39% ] 64 VUs 2.0s/5s running (03.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 59% ] 64 VUs 3.0s/5s running (04.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 79% ] 64 VUs 4.0s/5s running (05.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 99% ] 64 VUs 5.0s/5s running (06.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (07.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (08.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (09.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (10.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (11.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (12.0s), 63/64 VUs, 1 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s ✓ expected ${this} to be a number ✓ expected ${this} to equal +0 ✓ status is 101 checks................: 100.00% ✓ 192 ✗ 0 data_received.........: 38 MB 3.0 MB/s data_sent.............: 64 MB 4.9 MB/s iteration_duration....: avg=12.79s min=11.94s med=12.88s max=12.94s p(90)=12.93s p(95)=12.93s iterations............: 64 4.945481/s vus...................: 63 min=63 max=64 vus_max...............: 64 min=64 max=64 ws_connecting.........: avg=41.33ms min=2.38ms med=45.33ms max=53.2ms p(90)=52.8ms p(95)=52.88ms ws_msgs_received......: 6400000 494548.05839/s ws_msgs_sent..........: 6400000 494548.05839/s ws_session_duration...: avg=12.79s min=11.94s med=12.88s max=12.94s p(90)=12.93s p(95)=12.93s ws_sessions...........: 64 4.945481/s running (12.9s), 00/64 VUs, 64 complete and 0 interrupted iterations default ✓ [ 100% ] 64 VUs 5s ``` -------------------------------- ### Benchmark Assertion Example Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/tokio-tungstenite/plain-async.txt Demonstrates an assertion used within the benchmark script to validate specific conditions during execution. This example checks if a value matches a regular expression and if the status code is 101. ```javascript ✓ expected ${this} to match /number\:\s[0-9]/ ✓ status is 101 ``` -------------------------------- ### k6 Assertion Examples Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/tokio-tungstenite/json-async.txt Illustrates example assertions used within the k6 JavaScript script to validate WebSocket responses. These checks ensure that received data conforms to expected types and values. ```javascript ✓ expected ${this} to be a number ✓ expected ${this} to equal +0 ✓ status is 101 ``` -------------------------------- ### JavaScript Assertion Examples Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/tokio-tungstenite/binary-async.txt This snippet shows examples of assertions used within the benchmark script. It demonstrates how to check if a value is a number and if it equals zero, as well as verifying the status code of a WebSocket connection. ```javascript expect(this).toBeInstanceOf(Number); expect(this).toEqual(0); expect(status).toEqual(101); ``` -------------------------------- ### JavaScript Assertion Example Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/tokio-tungstenite/binary-async.txt Illustrates JavaScript assertions used within the benchmark script to validate WebSocket responses. It checks for expected numerical values and specific status codes. ```javascript ✓ expected ${this} to be a number ✓ expected ${this} to equal +0 ✓ status is 101 ``` -------------------------------- ### Run All K6 Benchmarks Source: https://github.com/ntsd/websocket-benchmark/blob/master/README.md This command executes all available K6 benchmark tests. You can replace 'all' with a specific test method name to run individual benchmarks. ```makefile make benchmark:all ``` -------------------------------- ### JavaScript Benchmark Script Example Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/uwebsocket-js/plain-async.txt This snippet represents a JavaScript file used for benchmarking WebSocket performance. It likely contains logic for setting up WebSocket connections, sending/receiving messages, and defining test scenarios. ```javascript // This is a placeholder for the actual JavaScript code in plain-async.js // The benchmark results indicate successful execution and high performance metrics. // Example of what might be inside: // import http from 'k6/http'; // import { check, sleep } from 'k6'; // export const options = { // vus: 128, // duration: '5s', // }; // export default function () { // const url = 'ws://localhost:8080/ws'; // const params = { tags: { my_tag: 'ws_test' } }; // const res = http.ws.open(url, null, params); // check(res, { // 'status is 101': (r) => r.status === 101, // }); // http.ws.send(res, 'Hello from k6'); // const msg = http.ws.recv(res); // check(msg, { // 'received message matches pattern': (m) => /number: [0-9]+/.test(m), // }); // http.ws.close(res); // } ``` -------------------------------- ### Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/uwebsocket-js/binary-sync.txt This snippet outlines the k6 benchmark configuration, including the execution environment, script path, and scenario definitions. It details the number of virtual users, duration, and graceful stop period. The output shows the progress of the benchmark execution and final statistics. ```javascript execution: local script: ./benchmarks/binary-sync.js output: - scenarios: (100.00%) 1 scenario, 128 max VUs, 35s max duration (incl. graceful stop): * default: 128 looping VUs for 5s (gracefulStop: 30s) running (01.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 20% ] 128 VUs 1.0s/5s ... running (35.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s ✓ status is 101 data_received......: 21 MB 592 kB/s data_sent..........: 35 MB 986 kB/s vus................: 128 min=128 max=128 vus_max............: 128 min=128 max=128 ws_connecting......: avg=49.23ms min=4.37ms med=62.86ms max=180.61ms p(90)=134.65ms p(95)=180.36ms ws_msgs_received...: 3447589 98502.398444/s ws_msgs_sent.......: 3447714 98505.969868/s ws_sessions........: 128 3.657137/s running (35.0s), 000/128 VUs, 0 complete and 128 interrupted iterations default ✓ [ 100% ] 128 VUs 5s ``` -------------------------------- ### Benchmark Execution Configuration Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/bun-websocket/binary-async.txt Details the execution environment and script used for the benchmark. Specifies local execution and the path to the binary asynchronous benchmark script. ```shell execution: local script: ./benchmarks/binary-async.js output: - ``` -------------------------------- ### k6 Benchmark Execution Output Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/bun-websocket/json-async.txt Example output from a k6 benchmark run, showing the progress of virtual users, completed iterations, and key performance metrics. It includes checks, data transfer rates, and websocket-specific statistics. ```shell running (00.9s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 19% ] 128 VUs 0.9s/5s running (01.9s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 39% ] 128 VUs 1.9s/5s ... running (05.9s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s ... running (19.9s), 120/128 VUs, 8 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s ✓ expected ${this} to be a number ✓ expected ${this} to equal +0 ✓ status is 101 checks................: 100.00% ✓ 384 ✗ 0 data_received.........: 229 MB 11 MB/s data_sent.............: 280 MB 14 MB/s iteration_duration....: avg=20.37s min=18.82s med=20.46s max=20.62s p(90)=20.58s p(95)=20.6s iterations............: 128 6.20611/s vus...................: 120 min=120 max=128 vus_max...............: 128 min=128 max=128 ws_connecting.........: avg=41.15ms min=4.33ms med=50.56ms max=110.33ms p(90)=106.41ms p(95)=110ms ws_msgs_received......: 12800000 620611.021552/s ws_msgs_sent..........: 12800000 620611.021552/s ws_session_duration...: avg=20.37s min=18.82s med=20.46s max=20.62s p(90)=20.58s p(95)=20.6s ws_sessions...........: 128 6.20611/s running (20.6s), 000/128 VUs, 128 complete and 0 interrupted iterations default ✓ [ 100% ] 128 VUs 5s ``` -------------------------------- ### k6 Benchmark Execution and Configuration Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/uwebsocket-js/binary-async.txt Details the execution environment, the script being run, and the scenario configuration for the k6 benchmark. This includes the number of virtual users, duration, and graceful stop settings. ```shell execution: local script: ./benchmarks/binary-async.js output: - scenarios: (100.00%) 1 scenario, 64 max VUs, 35s max duration (incl. graceful stop): * default: 64 looping VUs for 5s (gracefulStop: 30s) ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/tokio-tungstenite/plain-sync.txt This snippet outlines the configuration for a k6 load testing scenario, specifying the execution environment, script path, and scenario parameters. It also includes the output logs detailing the benchmark's progress and final results. ```javascript execution: local script: ./benchmarks/plain-sync.js output: - scenarios: (100.00%) 1 scenario, 128 max VUs, 35s max duration (incl. graceful stop): * default: 128 looping VUs for 5s (gracefulStop: 30s) running (01.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 20% ] 128 VUs 1.0s/5s running (02.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 40% ] 128 VUs 2.0s/5s running (03.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 60% ] 128 VUs 3.0s/5s running (04.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 80% ] 128 VUs 4.0s/5s running (05.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 100% ] 128 VUs 5.0s/5s running (06.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (07.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (08.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (09.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (10.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (11.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (12.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (13.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (14.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (15.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (16.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (17.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (18.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (19.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (20.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (21.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (22.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (23.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (24.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (25.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (26.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (27.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (28.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (29.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (30.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (30.2s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (31.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (32.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (33.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (34.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (35.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s ✓ status is 101 data_received......: 58 MB 1.7 MB/s data_sent..........: 74 MB 2.1 MB/s vus................: 128 min=128 max=128 vus_max............: 128 min=128 max=128 ws_connecting......: avg=14.21ms min=1.45ms med=4.96ms max=73ms p(90)=36.48ms p(95)=67.12ms ws_msgs_received...: 3955796 113024.354171/s ws_msgs_sent.......: 3955919 113027.868507/s ws_sessions........: 128 3.657195/s running (35.0s), 000/128 VUs, 0 complete and 128 interrupted iterations default ✓ [ 100% ] 128 VUs 5s ``` -------------------------------- ### Benchmark Execution Configuration Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/fasthttp-websocket/plain-async.txt Defines the execution environment, the script used for the benchmark, and the output configuration. This sets up how the benchmark will run. ```shell execution: local script: ./benchmarks/plain-async.js output: - ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/tokio-tungstenite/plain-sync.txt This snippet shows the configuration and execution flow of a k6 benchmark script for WebSocket performance. It defines the execution environment, the script to be run, and the scenario parameters, including the number of virtual users and duration. The output logs the progress of the benchmark. ```shell execution: local script: ./benchmarks/plain-sync.js output: - scenarios: (100.00%) 1 scenario, 64 max VUs, 35s max duration (incl. graceful stop): * default: 64 looping VUs for 5s (gracefulStop: 30s) running (01.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 20% ] 64 VUs 1.0s/5s running (02.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 40% ] 64 VUs 2.0s/5s running (03.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 60% ] 64 VUs 3.0s/5s running (04.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 80% ] 64 VUs 4.0s/5s running (05.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 100% ] 64 VUs 5.0s/5s running (06.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (35.0s), 00/64 VUs, 0 complete and 64 interrupted iterations default ✓ [ 100% ] 64 VUs 5s ``` -------------------------------- ### Benchmark Execution Configuration Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/tokio-tungstenite/plain-async.txt Defines the execution environment, the script used for the benchmark, and the output configuration. This sets up how the benchmark will run. ```shell execution: local script: ./benchmarks/plain-async.js output: - ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/tokio-tungstenite/binary-sync.txt This snippet outlines the configuration and execution details of a k6 performance test. It specifies the execution environment, the script used, and the scenario parameters, including the number of virtual users and duration. The output shows the progress of the benchmark. ```shell execution: local script: ./benchmarks/binary-sync.js output: - scenarios: (100.00%) 1 scenario, 128 max VUs, 35s max duration (incl. graceful stop): * default: 128 looping VUs for 5s (gracefulStop: 30s) running (01.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 20% ] 128 VUs 1.0s/5s running (02.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 40% ] 128 VUs 2.0s/5s running (03.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 60% ] 128 VUs 3.0s/5s running (04.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default [ 80% ] 128 VUs 4.0s/5s running (05.0s), 128/128 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 128 VUs 5s running (35.0s), 000/128 VUs, 0 complete and 128 interrupted iterations default ✓ [ 100% ] 128 VUs 5s ``` -------------------------------- ### k6 Benchmark Configuration Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/uwebsocket-js/binary-async.txt Defines the execution environment, script path, and scenario parameters for the k6 benchmark. It specifies a single scenario with 128 virtual users running for 5 seconds, with a graceful stop period of 30 seconds. ```shell execution: local script: ./benchmarks/binary-async.js output: - scenarios: (100.00%) 1 scenario, 128 max VUs, 35s max duration (incl. graceful stop): * default: 128 looping VUs for 5s (gracefulStop: 30s) ``` -------------------------------- ### K6 Benchmark Script Configuration Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/tokio-tungstenite/connection.txt This snippet shows the configuration for a k6 benchmark script, specifying the execution environment, the script to run, and the defined scenarios. It outlines how the load test is set up. ```javascript execution: local script: ./benchmarks/connection.js output: - scenarios: (100.00%) 1 scenario, 128 max VUs, 35s max duration (incl. graceful stop): * default: 128 looping VUs for 5s (gracefulStop: 30s) ``` -------------------------------- ### Available K6 Benchmark Test Methods Source: https://github.com/ntsd/websocket-benchmark/blob/master/README.md Lists the available test methods that can be used with the K6 benchmark command. These cover different data formats and communication patterns. ```makefile all connection plain-async plain-sync json-async json-sync binary-async binary-sync ``` -------------------------------- ### k6 Benchmark Configuration and Execution Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/gorilla-websocket/json-async.txt This snippet shows the configuration and execution flow of a k6 benchmark test. It specifies the execution environment, the script to be run, and the test scenario details, including the number of virtual users and duration. The output logs the progress of the benchmark as it runs. ```shell execution: local script: ./benchmarks/json-async.js output: - scenarios: (100.00%) 1 scenario, 64 max VUs, 35s max duration (incl. graceful stop): * default: 64 looping VUs for 5s (gracefulStop: 30s) running (01.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 20% ] 64 VUs 1.0s/5s running (02.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 39% ] 64 VUs 2.0s/5s running (03.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 59% ] 64 VUs 3.0s/5s running (04.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 79% ] 64 VUs 4.0s/5s running (05.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default [ 99% ] 64 VUs 5.0s/5s running (06.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (07.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (08.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (09.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (10.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (11.0s), 64/64 VUs, 0 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (12.0s), 63/64 VUs, 1 complete and 0 interrupted iterations default ↓ [ 100% ] 64 VUs 5s running (12.8s), 00/64 VUs, 64 complete and 0 interrupted iterations default ✓ [ 100% ] 64 VUs 5s ``` -------------------------------- ### k6 Benchmark Configuration Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-128/tokio-tungstenite/binary-async.txt Defines the execution environment and script for the WebSocket benchmark. It specifies local execution and the primary script file. ```shell execution: local script: ./benchmarks/binary-async.js output: - ``` -------------------------------- ### k6 Benchmark Execution Configuration Source: https://github.com/ntsd/websocket-benchmark/blob/master/results/vus-64/gorilla-websocket/binary-async.txt Defines the execution environment and script for the k6 benchmark. It specifies a local execution with the script located at './benchmarks/binary-async.js' and indicates no specific output format. ```shell execution: local script: ./benchmarks/binary-async.js output: - ```