mirror of
https://github.com/zigzap/zap.git
synced 2025-10-21 07:34:08 +00:00
Merge pull request #22 from leo-costa/add-wrk-csharp
Add C# AOT version for comparison
This commit is contained in:
commit
75ce8d4754
5 changed files with 43 additions and 0 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -6,6 +6,11 @@ tmp/
|
||||||
**/target/*
|
**/target/*
|
||||||
**/__pycache__/*
|
**/__pycache__/*
|
||||||
wrk/go/main
|
wrk/go/main
|
||||||
|
wrk/csharp/bin/
|
||||||
|
wrk/csharp/obj/
|
||||||
|
wrk/csharp/out/
|
||||||
scratch
|
scratch
|
||||||
**/.mypy_cache/*
|
**/.mypy_cache/*
|
||||||
docs/
|
docs/
|
||||||
|
.DS_Store
|
||||||
|
.vs/
|
||||||
|
|
8
wrk/csharp/Program.cs
Normal file
8
wrk/csharp/Program.cs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
builder.Logging.ClearProviders();
|
||||||
|
|
||||||
|
var app = builder.Build();
|
||||||
|
|
||||||
|
app.MapGet("/", () => "Hello from C#");
|
||||||
|
|
||||||
|
app.Run();
|
15
wrk/csharp/Properties/launchSettings.json
Normal file
15
wrk/csharp/Properties/launchSettings.json
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
|
"profiles": {
|
||||||
|
"http": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"applicationUrl": "http://localhost:5026",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
wrk/csharp/csharp.csproj
Normal file
8
wrk/csharp/csharp.csproj
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<PublishAot>true</PublishAot>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -58,6 +58,13 @@ if [ "$SUBJECT" = "axum" ] ; then
|
||||||
URL=http://127.0.0.1:3000
|
URL=http://127.0.0.1:3000
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$SUBJECT" = "csharp" ] ; then
|
||||||
|
cd wrk/csharp && dotnet publish csharp.csproj -o ./out
|
||||||
|
./out/csharp --urls "http://127.0.0.1:5026" &
|
||||||
|
PID=$!
|
||||||
|
URL=http://127.0.0.1:5026
|
||||||
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
echo "========================================================================"
|
echo "========================================================================"
|
||||||
echo " $SUBJECT"
|
echo " $SUBJECT"
|
||||||
|
|
Loading…
Add table
Reference in a new issue