From 3f661bf2d8b952cdfe996b6d8c5cc27b3dd8bb56 Mon Sep 17 00:00:00 2001 From: Oxule Date: Thu, 25 Sep 2025 20:05:53 +0300 Subject: [PATCH 1/3] Add Celerio C# framework benchmark --- frameworks/CSharp/celerio/README.md | 10 +++++++ .../CSharp/celerio/benchmark_config.json | 26 +++++++++++++++++++ frameworks/CSharp/celerio/celerio.dockerfile | 24 +++++++++++++++++ frameworks/CSharp/celerio/config.toml | 15 +++++++++++ frameworks/CSharp/celerio/src/.dockerignore | 25 ++++++++++++++++++ frameworks/CSharp/celerio/src/Endpoints.cs | 25 ++++++++++++++++++ frameworks/CSharp/celerio/src/Program.cs | 6 +++++ frameworks/CSharp/celerio/src/src.csproj | 18 +++++++++++++ 8 files changed, 149 insertions(+) create mode 100644 frameworks/CSharp/celerio/README.md create mode 100644 frameworks/CSharp/celerio/benchmark_config.json create mode 100644 frameworks/CSharp/celerio/celerio.dockerfile create mode 100644 frameworks/CSharp/celerio/config.toml create mode 100644 frameworks/CSharp/celerio/src/.dockerignore create mode 100644 frameworks/CSharp/celerio/src/Endpoints.cs create mode 100644 frameworks/CSharp/celerio/src/Program.cs create mode 100644 frameworks/CSharp/celerio/src/src.csproj diff --git a/frameworks/CSharp/celerio/README.md b/frameworks/CSharp/celerio/README.md new file mode 100644 index 00000000000..f0a426d3bd1 --- /dev/null +++ b/frameworks/CSharp/celerio/README.md @@ -0,0 +1,10 @@ +# [Celerio](https://github.com/Oxule/Celerio) benchmarks + +* [Github](https://github.com/Oxule/Celerio) +* [NuGet](https://www.nuget.org/packages/Celerio) + +## Infrastructure Software Versions + +* C# 13.0 +* .NET 8 + diff --git a/frameworks/CSharp/celerio/benchmark_config.json b/frameworks/CSharp/celerio/benchmark_config.json new file mode 100644 index 00000000000..9cd233d5d6a --- /dev/null +++ b/frameworks/CSharp/celerio/benchmark_config.json @@ -0,0 +1,26 @@ +{ + "framework": "celerio", + "tests": [ + { + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "None", + "framework": "Celerio", + "language": "CSharp", + "flavor": "None", + "orm": "None", + "platform": ".NET", + "webserver": "Celerio", + "os": "Linux", + "database_os": "Linux", + "display_name": "Celerio", + "notes": "", + "versus": "aspcore-mvc" + } + } + ] +} diff --git a/frameworks/CSharp/celerio/celerio.dockerfile b/frameworks/CSharp/celerio/celerio.dockerfile new file mode 100644 index 00000000000..3558ec99b4b --- /dev/null +++ b/frameworks/CSharp/celerio/celerio.dockerfile @@ -0,0 +1,24 @@ +FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base +USER $APP_UID +WORKDIR /app + +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["src/src.csproj", "src/"] +RUN dotnet restore "src/src.csproj" +COPY . . +WORKDIR "/src/src" +RUN dotnet build "./src.csproj" -c $BUILD_CONFIGURATION -o /app/build + +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./src.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . + +EXPOSE 8080 + +ENTRYPOINT ["dotnet", "src.dll"] diff --git a/frameworks/CSharp/celerio/config.toml b/frameworks/CSharp/celerio/config.toml new file mode 100644 index 00000000000..e942fe23094 --- /dev/null +++ b/frameworks/CSharp/celerio/config.toml @@ -0,0 +1,15 @@ +[framework] +name = "celerio" + +[main] +urls.plaintext = "/plaintext" +urls.json = "/json" +approach = "Realistic" +classification = "Micro" +database = "None" +database_os = "Linux" +os = "Linux" +orm = "None" +platform = ".NET" +webserver = "Celerio" +versus = "aspcore-mvc" \ No newline at end of file diff --git a/frameworks/CSharp/celerio/src/.dockerignore b/frameworks/CSharp/celerio/src/.dockerignore new file mode 100644 index 00000000000..cd967fc3a29 --- /dev/null +++ b/frameworks/CSharp/celerio/src/.dockerignore @@ -0,0 +1,25 @@ +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/.idea +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/frameworks/CSharp/celerio/src/Endpoints.cs b/frameworks/CSharp/celerio/src/Endpoints.cs new file mode 100644 index 00000000000..eb90fb38413 --- /dev/null +++ b/frameworks/CSharp/celerio/src/Endpoints.cs @@ -0,0 +1,25 @@ +namespace src; + +using Celerio; +using static Celerio.Result; + +public static class Endpoints +{ + [Get("/plaintext")] + public static Result Plaintext() + { + return Ok().Text("Hello, World!"); + } + + [Serializable] + public class SampleResponse + { + public string message { get; set; } = "Hello, World!"; + } + + [Get("/json")] + public static Result Json() + { + return Ok().Json(new SampleResponse()); + } +} \ No newline at end of file diff --git a/frameworks/CSharp/celerio/src/Program.cs b/frameworks/CSharp/celerio/src/Program.cs new file mode 100644 index 00000000000..c442387575e --- /dev/null +++ b/frameworks/CSharp/celerio/src/Program.cs @@ -0,0 +1,6 @@ +using System.Net; +using Celerio.Generated; + +var server = new Server(IPAddress.Any, 8080); +server.Start(); +await Task.Delay(Timeout.Infinite); \ No newline at end of file diff --git a/frameworks/CSharp/celerio/src/src.csproj b/frameworks/CSharp/celerio/src/src.csproj new file mode 100644 index 00000000000..d262c58dd1f --- /dev/null +++ b/frameworks/CSharp/celerio/src/src.csproj @@ -0,0 +1,18 @@ + + + + Exe + net8.0 + preview + enable + enable + + true + Linux + + + + + + + From 07167db3fc1b9450d9be27f04d42ee3ec70a462f Mon Sep 17 00:00:00 2001 From: Oxule Date: Thu, 25 Sep 2025 20:12:30 +0300 Subject: [PATCH 2/3] Add Celerio C# framework benchmark --- frameworks/CSharp/celerio/README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/frameworks/CSharp/celerio/README.md b/frameworks/CSharp/celerio/README.md index f0a426d3bd1..53401f1e90a 100644 --- a/frameworks/CSharp/celerio/README.md +++ b/frameworks/CSharp/celerio/README.md @@ -1,10 +1,23 @@ -# [Celerio](https://github.com/Oxule/Celerio) benchmarks +# Celerio Benchmarks -* [Github](https://github.com/Oxule/Celerio) -* [NuGet](https://www.nuget.org/packages/Celerio) +Celerio is a modern C# framework designed for high-performance web applications based on Source Generation **only**. +This benchmark tests Celerio using the standard TechEmpower FrameworkBenchmarks suite. + +## Links + +- [GitHub](https://github.com/Oxule/Celerio) +- [NuGet](https://www.nuget.org/packages/Celerio) ## Infrastructure Software Versions -* C# 13.0 -* .NET 8 +- C# 12 +- .NET 8 + +## Benchmarks Included + +- **Plaintext** +- **JSON** + +## Author +* [Oxule Rise](https://github.com/Oxule) From b96920a156fed05b78591a64b7f8f325b32a9f39 Mon Sep 17 00:00:00 2001 From: Oxule Date: Thu, 25 Sep 2025 20:14:11 +0300 Subject: [PATCH 3/3] Readme fix --- frameworks/CSharp/celerio/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/CSharp/celerio/README.md b/frameworks/CSharp/celerio/README.md index 53401f1e90a..438fe9ac12f 100644 --- a/frameworks/CSharp/celerio/README.md +++ b/frameworks/CSharp/celerio/README.md @@ -20,4 +20,4 @@ This benchmark tests Celerio using the standard TechEmpower FrameworkBenchmarks ## Author -* [Oxule Rise](https://github.com/Oxule) +* [Oxule](https://github.com/Oxule)