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
23 changes: 23 additions & 0 deletions frameworks/CSharp/celerio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Celerio Benchmarks

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# 12
- .NET 8

## Benchmarks Included

- **Plaintext**
- **JSON**

## Author

* [Oxule](https://github.com/Oxule)
26 changes: 26 additions & 0 deletions frameworks/CSharp/celerio/benchmark_config.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
24 changes: 24 additions & 0 deletions frameworks/CSharp/celerio/celerio.dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
15 changes: 15 additions & 0 deletions frameworks/CSharp/celerio/config.toml
Original file line number Diff line number Diff line change
@@ -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"
25 changes: 25 additions & 0 deletions frameworks/CSharp/celerio/src/.dockerignore
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions frameworks/CSharp/celerio/src/Endpoints.cs
Original file line number Diff line number Diff line change
@@ -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());
}
}
6 changes: 6 additions & 0 deletions frameworks/CSharp/celerio/src/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System.Net;
using Celerio.Generated;

var server = new Server(IPAddress.Any, 8080);
server.Start();
await Task.Delay(Timeout.Infinite);
18 changes: 18 additions & 0 deletions frameworks/CSharp/celerio/src/src.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!--<PublishAot>true</PublishAot>-->
<InvariantGlobalization>true</InvariantGlobalization>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Celerio" Version="2.0.0-preview.1" />
</ItemGroup>

</Project>
Loading