Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion frameworks/genhttp-11/Project.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using GenHTTP.Api.Content;

using GenHTTP.Modules.Compression;
using GenHTTP.Modules.Compression.Algorithms;
using GenHTTP.Modules.IO;
using GenHTTP.Modules.Layouting;
using GenHTTP.Modules.Layouting.Provider;
Expand Down Expand Up @@ -35,7 +37,10 @@ private static LayoutBuilder AddStaticFiles(this LayoutBuilder app)
{
if (Directory.Exists("/data/static"))
{
app.Add("static", Resources.From(ResourceTree.FromDirectory("/data/static")));
var handler = PreCompressedResources.From(ResourceTree.FromDirectory("/data/static"))
.Add(new BrotliAlgorithm());

app.Add("static", handler);
}

return app;
Expand Down
14 changes: 7 additions & 7 deletions frameworks/genhttp-11/genhttp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@

<ItemGroup>

<PackageReference Include="GenHTTP.Core" Version="11.0.0-preview.10" />
<PackageReference Include="GenHTTP.Modules.Compression" Version="11.0.0-preview.10" />
<PackageReference Include="GenHTTP.Modules.IO" Version="11.0.0-preview.10" />
<PackageReference Include="GenHTTP.Modules.Layouting" Version="11.0.0-preview.10" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="11.0.0-preview.10" />
<PackageReference Include="GenHTTP.Modules.Websockets" Version="11.0.0-preview.10" />
<PackageReference Include="GenHTTP.Core" Version="11.0.0-preview.11" />
<PackageReference Include="GenHTTP.Modules.Compression" Version="11.0.0-preview.11" />
<PackageReference Include="GenHTTP.Modules.IO" Version="11.0.0-preview.11" />
<PackageReference Include="GenHTTP.Modules.Layouting" Version="11.0.0-preview.11" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="11.0.0-preview.11" />
<PackageReference Include="GenHTTP.Modules.Websockets" Version="11.0.0-preview.11" />

<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.8" />

<PackageReference Include="Npgsql" Version="10.0.2" />
<PackageReference Include="Npgsql" Version="10.0.3" />

</ItemGroup>

Expand Down
24 changes: 12 additions & 12 deletions site/data/api-16-1024.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,28 +414,28 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 122771,
"avg_latency": "7.08ms",
"p99_latency": "32.60ms",
"cpu": "1527.0%",
"memory": "282MiB",
"rps": 134218,
"avg_latency": "5.85ms",
"p99_latency": "28.60ms",
"cpu": "1536.3%",
"memory": "270MiB",
"connections": 1024,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "623.14MB/s",
"input_bw": "6.91MB/s",
"reconnects": 368254,
"status_2xx": 1841565,
"bandwidth": "679.78MB/s",
"input_bw": "7.55MB/s",
"reconnects": 402676,
"status_2xx": 2013276,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0,
"tpl_baseline": 689717,
"tpl_json": 691365,
"tpl_baseline": 754488,
"tpl_json": 755291,
"tpl_db": 0,
"tpl_upload": 0,
"tpl_static": 0,
"tpl_async_db": 460483
"tpl_async_db": 503489
},
{
"framework": "genhttp-kestrel",
Expand Down
24 changes: 12 additions & 12 deletions site/data/api-4-256.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,28 +414,28 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 45959,
"avg_latency": "4.52ms",
"p99_latency": "17.50ms",
"cpu": "389.6%",
"memory": "147MiB",
"rps": 48671,
"avg_latency": "3.89ms",
"p99_latency": "15.60ms",
"cpu": "386.2%",
"memory": "145MiB",
"connections": 256,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "232.99MB/s",
"input_bw": "2.59MB/s",
"reconnects": 137882,
"status_2xx": 689395,
"bandwidth": "246.28MB/s",
"input_bw": "2.74MB/s",
"reconnects": 145991,
"status_2xx": 730070,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0,
"tpl_baseline": 258725,
"tpl_json": 258524,
"tpl_baseline": 273998,
"tpl_json": 273549,
"tpl_db": 0,
"tpl_upload": 0,
"tpl_static": 0,
"tpl_async_db": 172146
"tpl_async_db": 182523
},
{
"framework": "genhttp-kestrel",
Expand Down
18 changes: 9 additions & 9 deletions site/data/async-db-1024.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,19 +338,19 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 171582,
"avg_latency": "5.32ms",
"p99_latency": "12.50ms",
"cpu": "3387.4%",
"memory": "330MiB",
"rps": 190146,
"avg_latency": "4.87ms",
"p99_latency": "11.80ms",
"cpu": "3567.3%",
"memory": "346MiB",
"connections": 1024,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "664.70MB/s",
"input_bw": "11.45MB/s",
"reconnects": 68576,
"status_2xx": 1715825,
"bandwidth": "733.59MB/s",
"input_bw": "12.69MB/s",
"reconnects": 75794,
"status_2xx": 1901466,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
16 changes: 8 additions & 8 deletions site/data/baseline-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,19 +432,19 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 1428408,
"avg_latency": "2.56ms",
"p99_latency": "11.80ms",
"cpu": "5652.8%",
"memory": "448MiB",
"rps": 1456237,
"avg_latency": "2.64ms",
"p99_latency": "13.50ms",
"cpu": "5863.8%",
"memory": "500MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "175.68MB/s",
"input_bw": "110.34MB/s",
"bandwidth": "179.12MB/s",
"input_bw": "112.49MB/s",
"reconnects": 0,
"status_2xx": 7142040,
"status_2xx": 7281186,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
16 changes: 8 additions & 8 deletions site/data/baseline-512.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,19 +432,19 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 1486774,
"avg_latency": "343us",
"p99_latency": "2.84ms",
"cpu": "5787.6%",
"memory": "218MiB",
"rps": 1477601,
"avg_latency": "346us",
"p99_latency": "3.00ms",
"cpu": "5558.0%",
"memory": "242MiB",
"connections": 512,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "182.87MB/s",
"input_bw": "114.85MB/s",
"bandwidth": "181.74MB/s",
"input_bw": "114.14MB/s",
"reconnects": 0,
"status_2xx": 7433873,
"status_2xx": 7388005,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
16 changes: 8 additions & 8 deletions site/data/crud-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 454082,
"avg_latency": "8.53ms",
"rps": 453772,
"avg_latency": "8.62ms",
"p99_latency": "29.50ms",
"cpu": "4049.0%",
"memory": "626MiB",
"cpu": "4029.0%",
"memory": "668MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "173.80MB/s",
"input_bw": "38.97MB/s",
"reconnects": 32107,
"status_2xx": 6811234,
"bandwidth": "172.48MB/s",
"input_bw": "38.95MB/s",
"reconnects": 32095,
"status_2xx": 6806594,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-16384.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,18 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 1875182,
"avg_latency": "6.09ms",
"p99_latency": "16.50ms",
"cpu": "5749.5%",
"memory": "1.5GiB",
"rps": 1841848,
"avg_latency": "6.03ms",
"p99_latency": "17.50ms",
"cpu": "6028.1%",
"memory": "1.6GiB",
"connections": 16384,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "13.08MB/s",
"bandwidth": "12.85MB/s",
"reconnects": 0,
"status_2xx": 9375913,
"status_2xx": 9209243,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,18 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 2033859,
"avg_latency": "1.85ms",
"p99_latency": "5.39ms",
"cpu": "5868.1%",
"memory": "704MiB",
"rps": 2077313,
"avg_latency": "1.77ms",
"p99_latency": "5.08ms",
"cpu": "6214.7%",
"memory": "679MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "13.71MB/s",
"bandwidth": "13.98MB/s",
"reconnects": 0,
"status_2xx": 10169297,
"status_2xx": 10386569,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-512.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,18 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 2072434,
"avg_latency": "246us",
"p99_latency": "1.05ms",
"cpu": "6102.4%",
"memory": "196MiB",
"rps": 2088245,
"avg_latency": "244us",
"p99_latency": "1.20ms",
"cpu": "6076.4%",
"memory": "188MiB",
"connections": 512,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "13.83MB/s",
"bandwidth": "13.94MB/s",
"reconnects": 0,
"status_2xx": 10362173,
"status_2xx": 10441226,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-pipeline-16384.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,18 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 3687198,
"avg_latency": "3.20ms",
"p99_latency": "3.28ms",
"cpu": "6062.3%",
"memory": "974MiB",
"rps": 3615216,
"avg_latency": "1.27ms",
"p99_latency": "2.33ms",
"cpu": "5887.5%",
"memory": "1.6GiB",
"connections": 16384,
"threads": 64,
"duration": "5s",
"pipeline": 16,
"bandwidth": "24.91MB/s",
"bandwidth": "24.33MB/s",
"reconnects": 0,
"status_2xx": 18435991,
"status_2xx": 18076081,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-pipeline-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,18 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 3690572,
"avg_latency": "1.36ms",
"p99_latency": "3.25ms",
"cpu": "6285.5%",
"memory": "530MiB",
"rps": 3664667,
"avg_latency": "643us",
"p99_latency": "3.27ms",
"cpu": "6106.2%",
"memory": "818MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 16,
"bandwidth": "24.65MB/s",
"bandwidth": "24.57MB/s",
"reconnects": 0,
"status_2xx": 18452864,
"status_2xx": 18323335,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/echo-ws-pipeline-512.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,18 @@
{
"framework": "genhttp-11",
"language": "C#",
"rps": 3967059,
"avg_latency": "455us",
"p99_latency": "1.04ms",
"cpu": "6079.4%",
"memory": "230MiB",
"rps": 4010686,
"avg_latency": "638us",
"p99_latency": "3.13ms",
"cpu": "6211.9%",
"memory": "375MiB",
"connections": 512,
"threads": 64,
"duration": "5s",
"pipeline": 16,
"bandwidth": "26.48MB/s",
"bandwidth": "26.78MB/s",
"reconnects": 0,
"status_2xx": 19835299,
"status_2xx": 20053431,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
Loading