Skip to content
Open
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
26 changes: 13 additions & 13 deletions frameworks/CSharp/embedio/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>

<TargetFramework>net9.0</TargetFramework>
<LangVersion>13.0</LangVersion>

<AssemblyTitle>EmbedIO Benchmarks</AssemblyTitle>
<Description>Test suite to be executed with TechEmpower FrameworkBenchmarks.</Description>
<StartupObject>Benchmarks.Program</StartupObject>

<StartupObject>Benchmarks.Program</StartupObject>
<OutputType>Exe</OutputType>

<ServerGarbageCollection>true</ServerGarbageCollection>
<TieredCompilation>false</TieredCompilation>

</PropertyGroup>

<ItemGroup>
<PackageReference Include="EmbedIO" Version="3.4.3" />
<PackageReference Include="EmbedIO" Version="3.5.2" />
</ItemGroup>
</Project>

</Project>
14 changes: 8 additions & 6 deletions frameworks/CSharp/embedio/Benchmarks/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using EmbedIO;
using Swan.Logging;
using System;
using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

using EmbedIO;

using Swan.Logging;

namespace Benchmarks
{

Expand All @@ -21,7 +23,7 @@ public class JsonResult

public static class Program
{
private static readonly ManualResetEvent _WaitEvent = new ManualResetEvent(false);
private static readonly ManualResetEvent WaitEvent = new(false);

public static async Task<int> Main(string[] args)
{
Expand Down Expand Up @@ -60,12 +62,12 @@ public static async Task<int> Main(string[] args)
{
AppDomain.CurrentDomain.ProcessExit += (_, __) =>
{
_WaitEvent.Set();
WaitEvent.Set();
};

await server.RunAsync();

_WaitEvent.WaitOne();
WaitEvent.WaitOne();

return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions frameworks/CSharp/embedio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ See the [project website](https://github.com/unosquare/embedio) for more informa

**Language**

* C# 9.0
* C# 13.0

**Platforms**

* .NET 5
* .NET 9

**Web Servers**

* [EmbedIO](https://github.com/unosquare/embedio)

## Paths & Source for Tests
## Paths \& Source for Tests

* [Plaintext](Benchmarks/Program.cs): "/plaintext"
* [JSON](Benchmarks/Program.cs): "/json"
6 changes: 3 additions & 3 deletions frameworks/CSharp/embedio/embedio.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
WORKDIR /source

# copy csproj and restore as distinct layers
Expand All @@ -7,10 +7,10 @@ RUN dotnet restore -r linux-musl-x64

# copy and publish app and libraries
COPY Benchmarks/ .
RUN dotnet publish -c release -o /app -r linux-musl-x64
RUN dotnet publish -c release -o /app -r linux-musl-x64 --no-restore --self-contained

# final stage/image
FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine
FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-alpine
WORKDIR /app
COPY --from=build /app .

Expand Down
8 changes: 4 additions & 4 deletions frameworks/CSharp/genhttp/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@

<ItemGroup>

<PackageReference Include="GenHTTP.Core" Version="9.6.2" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="9.6.2" />
<PackageReference Include="GenHTTP.Core" Version="9.8.0" />
<PackageReference Include="GenHTTP.Modules.Webservices" Version="9.8.0" />

<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.10" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />

</ItemGroup>

Expand Down
28 changes: 14 additions & 14 deletions frameworks/CSharp/netcoreserver/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>

<TargetFramework>net9.0</TargetFramework>
<LangVersion>13.0</LangVersion>

<AssemblyTitle>EmbedIO Benchmarks</AssemblyTitle>
<Description>Test suite to be executed with TechEmpower FrameworkBenchmarks.</Description>
<StartupObject>Benchmarks.Program</StartupObject>

<StartupObject>Benchmarks.Program</StartupObject>
<OutputType>Exe</OutputType>

<ServerGarbageCollection>true</ServerGarbageCollection>
<TieredCompilation>false</TieredCompilation>

</PropertyGroup>

<ItemGroup>
<PackageReference Include="NetCoreServer" Version="5.0.7" />
<PackageReference Include="System.Text.Json" Version="5.0.0" />
<PackageReference Include="NetCoreServer" Version="8.0.7" />
<PackageReference Include="System.Text.Json" Version="9.0.10" />
</ItemGroup>
</Project>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected override void OnReceivedRequest(HttpRequest request)
}
else
{
SendResponseAsync(Response.MakeErrorResponse("Not found", 404));
SendResponseAsync(Response.MakeErrorResponse(404, "Not found"));
}
}

Expand Down
6 changes: 3 additions & 3 deletions frameworks/CSharp/netcoreserver/Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Benchmarks
public static class Program
{

private static readonly ManualResetEvent _WaitEvent = new ManualResetEvent(false);
private static readonly ManualResetEvent WaitEvent = new(false);

public static int Main(string[] args)
{
Expand All @@ -18,12 +18,12 @@ public static int Main(string[] args)
{
AppDomain.CurrentDomain.ProcessExit += (_, __) =>
{
_WaitEvent.Set();
WaitEvent.Set();
};

server.Start();

_WaitEvent.WaitOne();
WaitEvent.WaitOne();

return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions frameworks/CSharp/netcoreserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ See the [project website](https://github.com/chronoxor/NetCoreServer) for more i

**Language**

* C# 9.0
* C# 13.0

**Platforms**

* .NET 5
* .NET 9

**Web Servers**

* [NetCoreServer](https://github.com/chronoxor/NetCoreServer)

## Paths & Source for Tests
## Paths \& Source for Tests

* [Plaintext](Benchmarks/HttpBenchmarkSession.cs): "/plaintext"
* [JSON](Benchmarks/HttpBenchmarkSession.cs): "/json"
6 changes: 3 additions & 3 deletions frameworks/CSharp/netcoreserver/netcoreserver.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
WORKDIR /source

# copy csproj and restore as distinct layers
Expand All @@ -7,10 +7,10 @@ RUN dotnet restore -r linux-musl-x64

# copy and publish app and libraries
COPY Benchmarks/ .
RUN dotnet publish -c release -o /app -r linux-musl-x64
RUN dotnet publish -c release -o /app -r linux-musl-x64 --no-restore --self-contained

# final stage/image
FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine
FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-alpine
WORKDIR /app
COPY --from=build /app .

Expand Down
2 changes: 1 addition & 1 deletion frameworks/CSharp/wiredio/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- Required for self-contained publish -->
<RuntimeIdentifier>linux-musl-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>

</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion frameworks/CSharp/wiredio/Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ await builder
.Type("application/json");
})
.Build()
.RunAsync();
.RunAsync();
Loading