From 6f9043c6fe1c5c7a72c14e096ba50791395b31f4 Mon Sep 17 00:00:00 2001 From: Marvin Drude Date: Thu, 24 Sep 2026 23:38:43 +0200 Subject: [PATCH 1/4] Update version --- frameworks/beskar-websocket/Dockerfile | 4 ++-- frameworks/beskar-websocket/Program.cs | 12 ++++++------ frameworks/beskar-websocket/beskar-websocket.csproj | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frameworks/beskar-websocket/Dockerfile b/frameworks/beskar-websocket/Dockerfile index 90dcf2212..fdd016def 100644 --- a/frameworks/beskar-websocket/Dockerfile +++ b/frameworks/beskar-websocket/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /source COPY beskar-websocket.csproj ./ @@ -7,7 +7,7 @@ RUN dotnet restore COPY . . RUN dotnet publish -c Release --no-self-contained -o /app -FROM mcr.microsoft.com/dotnet/runtime:10.0 +FROM mcr.microsoft.com/dotnet/runtime:11.0 WORKDIR /app COPY --from=build /app . diff --git a/frameworks/beskar-websocket/Program.cs b/frameworks/beskar-websocket/Program.cs index 76192058f..ce66f5ff2 100644 --- a/frameworks/beskar-websocket/Program.cs +++ b/frameworks/beskar-websocket/Program.cs @@ -11,12 +11,9 @@ private static async Task Main() { Path = "/ws", KeepAliveInterval = TimeSpan.Zero, - OnMessage = (session, payload, opcode) => - { - _ = session.SendFrameAsync(payload, opcode); - } + OnMessageAsync = (session, payload, opcode) + => session.SendFrameAsync(payload, opcode) }; - options.TcpOptions.SocketOptions.IoQueueCount = Environment.ProcessorCount; var endPoint = new IPEndPoint(IPAddress.Any, 8080); var listener = new WsNetworkListener(endPoint, options); @@ -29,6 +26,9 @@ private static async Task Main() } Console.WriteLine("Application started."); - await Task.Delay(-1); + while (true) + { + _ = await listener.AcceptSessionAsync(); + } } } diff --git a/frameworks/beskar-websocket/beskar-websocket.csproj b/frameworks/beskar-websocket/beskar-websocket.csproj index 8ac312a0d..7af88c0b9 100644 --- a/frameworks/beskar-websocket/beskar-websocket.csproj +++ b/frameworks/beskar-websocket/beskar-websocket.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable enable true @@ -11,7 +11,7 @@ - + From 30eacf89ff1e75dc1cd97e61c4d0bd7844b21b0d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Sep 2026 22:30:34 +0000 Subject: [PATCH 2/4] Benchmark results: beskar-websocket [skip ci] --- site/data/results/beskar-websocket.json | 124 ++++++++++++------------ 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/site/data/results/beskar-websocket.json b/site/data/results/beskar-websocket.json index e94cd0bf8..9097ac5d0 100644 --- a/site/data/results/beskar-websocket.json +++ b/site/data/results/beskar-websocket.json @@ -4,18 +4,18 @@ "echo-ws-16384": { "framework": "beskar-websocket", "language": "C#", - "rps": 2123042, - "avg_latency": "2.17ms", - "p99_latency": "9.95ms", - "cpu": "6168.7%", - "memory": "613MiB", + "rps": 1811735, + "avg_latency": "7.99ms", + "p99_latency": "22.00ms", + "cpu": "5851.5%", + "memory": "813MiB", "connections": 16384, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "14.30MB/s", - "reconnects": 1672, - "status_2xx": 10615210, + "bandwidth": "12.49MB/s", + "reconnects": 0, + "status_2xx": 9058678, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -23,18 +23,18 @@ "echo-ws-4096": { "framework": "beskar-websocket", "language": "C#", - "rps": 2114598, - "avg_latency": "1.69ms", - "p99_latency": "8.41ms", - "cpu": "5873.9%", - "memory": "319MiB", + "rps": 1888765, + "avg_latency": "2.15ms", + "p99_latency": "6.13ms", + "cpu": "5819.6%", + "memory": "329MiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "14.19MB/s", - "reconnects": 75, - "status_2xx": 10572994, + "bandwidth": "12.69MB/s", + "reconnects": 0, + "status_2xx": 9443829, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -42,18 +42,18 @@ "echo-ws-512": { "framework": "beskar-websocket", "language": "C#", - "rps": 2055455, - "avg_latency": "248us", - "p99_latency": "1.42ms", - "cpu": "5704.5%", - "memory": "150MiB", + "rps": 2090969, + "avg_latency": "244us", + "p99_latency": "1.48ms", + "cpu": "5416.2%", + "memory": "151MiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "13.73MB/s", + "bandwidth": "13.96MB/s", "reconnects": 0, - "status_2xx": 10277279, + "status_2xx": 10454849, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -61,18 +61,18 @@ "echo-ws-limited-4096": { "framework": "beskar-websocket", "language": "C#", - "rps": 539202, - "avg_latency": "77us", - "p99_latency": "180us", - "cpu": "4411.3%", - "memory": "2.7GiB", + "rps": 979701, + "avg_latency": "196us", + "p99_latency": "2.19ms", + "cpu": "4832.4%", + "memory": "172MiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "10.24MB/s", - "reconnects": 365576, - "status_2xx": 2696014, + "bandwidth": "18.59MB/s", + "reconnects": 489963, + "status_2xx": 4898509, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -80,18 +80,18 @@ "echo-ws-limited-512": { "framework": "beskar-websocket", "language": "C#", - "rps": 547595, - "avg_latency": "75us", - "p99_latency": "176us", - "cpu": "4253.1%", - "memory": "2.7GiB", + "rps": 946826, + "avg_latency": "135us", + "p99_latency": "1.16ms", + "cpu": "4702.3%", + "memory": "132MiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "10.40MB/s", - "reconnects": 394901, - "status_2xx": 2737979, + "bandwidth": "17.96MB/s", + "reconnects": 473429, + "status_2xx": 4734133, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -99,18 +99,18 @@ "echo-ws-pipeline-16384": { "framework": "beskar-websocket", "language": "C#", - "rps": 23254816, - "avg_latency": "4.66ms", - "p99_latency": "18.30ms", - "cpu": "6183.1%", - "memory": "700MiB", + "rps": 25068505, + "avg_latency": "9.37ms", + "p99_latency": "25.30ms", + "cpu": "5952.3%", + "memory": "797MiB", "connections": 16384, "threads": 64, "duration": "5s", "pipeline": 16, - "bandwidth": "155.45MB/s", - "reconnects": 408, - "status_2xx": 116274081, + "bandwidth": "167.71MB/s", + "reconnects": 0, + "status_2xx": 125342528, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -118,18 +118,18 @@ "echo-ws-pipeline-4096": { "framework": "beskar-websocket", "language": "C#", - "rps": 23999043, - "avg_latency": "2.39ms", - "p99_latency": "10.10ms", - "cpu": "5999.6%", - "memory": "376MiB", + "rps": 26118694, + "avg_latency": "2.50ms", + "p99_latency": "6.93ms", + "cpu": "6118.6%", + "memory": "284MiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 16, - "bandwidth": "160.25MB/s", - "reconnects": 218, - "status_2xx": 119995216, + "bandwidth": "174.40MB/s", + "reconnects": 0, + "status_2xx": 130593472, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -137,18 +137,18 @@ "echo-ws-pipeline-512": { "framework": "beskar-websocket", "language": "C#", - "rps": 22867776, - "avg_latency": "357us", - "p99_latency": "2.52ms", - "cpu": "5859.4%", - "memory": "146MiB", + "rps": 27605168, + "avg_latency": "296us", + "p99_latency": "1.64ms", + "cpu": "5705.2%", + "memory": "102MiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 16, - "bandwidth": "152.62MB/s", + "bandwidth": "184.33MB/s", "reconnects": 0, - "status_2xx": 114338880, + "status_2xx": 138025840, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 From f13b48e86ac26e3e290d608a86ecf9a6d1e79161 Mon Sep 17 00:00:00 2001 From: MarvinDrude Date: Thu, 8 Oct 2026 20:15:57 +0200 Subject: [PATCH 3/4] Bump beskar websocket version --- frameworks/beskar-websocket/beskar-websocket.csproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frameworks/beskar-websocket/beskar-websocket.csproj b/frameworks/beskar-websocket/beskar-websocket.csproj index 7af88c0b9..bbff145d1 100644 --- a/frameworks/beskar-websocket/beskar-websocket.csproj +++ b/frameworks/beskar-websocket/beskar-websocket.csproj @@ -3,15 +3,19 @@ Exe net11.0 + Preview enable enable true + $(Features);runtime-async=on + true beskar_websocket true + true - + From 6c9496470bf465ecff4fe1f95bd0e1c79384bd35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Oct 2026 20:52:48 +0000 Subject: [PATCH 4/4] Benchmark results: beskar-websocket [skip ci] --- site/data/results/beskar-websocket.json | 114 ++++++++++++------------ 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/site/data/results/beskar-websocket.json b/site/data/results/beskar-websocket.json index 9097ac5d0..003add817 100644 --- a/site/data/results/beskar-websocket.json +++ b/site/data/results/beskar-websocket.json @@ -4,18 +4,18 @@ "echo-ws-16384": { "framework": "beskar-websocket", "language": "C#", - "rps": 1811735, - "avg_latency": "7.99ms", - "p99_latency": "22.00ms", - "cpu": "5851.5%", - "memory": "813MiB", + "rps": 2007405, + "avg_latency": "7.85ms", + "p99_latency": "16.40ms", + "cpu": "5908.9%", + "memory": "831MiB", "connections": 16384, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "12.49MB/s", + "bandwidth": "13.79MB/s", "reconnects": 0, - "status_2xx": 9058678, + "status_2xx": 10037029, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -23,18 +23,18 @@ "echo-ws-4096": { "framework": "beskar-websocket", "language": "C#", - "rps": 1888765, - "avg_latency": "2.15ms", - "p99_latency": "6.13ms", - "cpu": "5819.6%", - "memory": "329MiB", + "rps": 2199112, + "avg_latency": "1.84ms", + "p99_latency": "4.77ms", + "cpu": "6197.0%", + "memory": "307MiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "12.69MB/s", + "bandwidth": "14.77MB/s", "reconnects": 0, - "status_2xx": 9443829, + "status_2xx": 10995563, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -42,18 +42,18 @@ "echo-ws-512": { "framework": "beskar-websocket", "language": "C#", - "rps": 2090969, - "avg_latency": "244us", - "p99_latency": "1.48ms", - "cpu": "5416.2%", - "memory": "151MiB", + "rps": 2308233, + "avg_latency": "221us", + "p99_latency": "1.13ms", + "cpu": "5848.4%", + "memory": "140MiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "13.96MB/s", + "bandwidth": "15.41MB/s", "reconnects": 0, - "status_2xx": 10454849, + "status_2xx": 11541169, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -61,18 +61,18 @@ "echo-ws-limited-4096": { "framework": "beskar-websocket", "language": "C#", - "rps": 979701, - "avg_latency": "196us", - "p99_latency": "2.19ms", - "cpu": "4832.4%", - "memory": "172MiB", + "rps": 1037160, + "avg_latency": "201us", + "p99_latency": "2.14ms", + "cpu": "4626.8%", + "memory": "165MiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "18.59MB/s", - "reconnects": 489963, - "status_2xx": 4898509, + "bandwidth": "19.68MB/s", + "reconnects": 518603, + "status_2xx": 5185801, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -80,18 +80,18 @@ "echo-ws-limited-512": { "framework": "beskar-websocket", "language": "C#", - "rps": 946826, - "avg_latency": "135us", - "p99_latency": "1.16ms", - "cpu": "4702.3%", - "memory": "132MiB", + "rps": 977705, + "avg_latency": "149us", + "p99_latency": "1.38ms", + "cpu": "4403.0%", + "memory": "131MiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 1, - "bandwidth": "17.96MB/s", - "reconnects": 473429, - "status_2xx": 4734133, + "bandwidth": "18.55MB/s", + "reconnects": 488847, + "status_2xx": 4888528, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -99,18 +99,18 @@ "echo-ws-pipeline-16384": { "framework": "beskar-websocket", "language": "C#", - "rps": 25068505, - "avg_latency": "9.37ms", - "p99_latency": "25.30ms", - "cpu": "5952.3%", - "memory": "797MiB", + "rps": 27539888, + "avg_latency": "9.22ms", + "p99_latency": "19.10ms", + "cpu": "5994.8%", + "memory": "777MiB", "connections": 16384, "threads": 64, "duration": "5s", "pipeline": 16, - "bandwidth": "167.71MB/s", + "bandwidth": "184.21MB/s", "reconnects": 0, - "status_2xx": 125342528, + "status_2xx": 137699440, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -118,18 +118,18 @@ "echo-ws-pipeline-4096": { "framework": "beskar-websocket", "language": "C#", - "rps": 26118694, - "avg_latency": "2.50ms", - "p99_latency": "6.93ms", - "cpu": "6118.6%", - "memory": "284MiB", + "rps": 30338692, + "avg_latency": "2.14ms", + "p99_latency": "5.09ms", + "cpu": "6053.8%", + "memory": "372MiB", "connections": 4096, "threads": 64, "duration": "5s", "pipeline": 16, - "bandwidth": "174.40MB/s", + "bandwidth": "202.57MB/s", "reconnects": 0, - "status_2xx": 130593472, + "status_2xx": 151693463, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0 @@ -137,18 +137,18 @@ "echo-ws-pipeline-512": { "framework": "beskar-websocket", "language": "C#", - "rps": 27605168, - "avg_latency": "296us", - "p99_latency": "1.64ms", - "cpu": "5705.2%", + "rps": 32017315, + "avg_latency": "255us", + "p99_latency": "1.09ms", + "cpu": "6087.5%", "memory": "102MiB", "connections": 512, "threads": 64, "duration": "5s", "pipeline": 16, - "bandwidth": "184.33MB/s", + "bandwidth": "213.54MB/s", "reconnects": 0, - "status_2xx": 138025840, + "status_2xx": 160086576, "status_3xx": 0, "status_4xx": 0, "status_5xx": 0