Skip to content

Commit b0a0c17

Browse files
Add PublishAot configurations
1 parent 3e57bc7 commit b0a0c17

File tree

6 files changed

+157
-0
lines changed

6 files changed

+157
-0
lines changed

Diff for: frameworks/CSharp/aspnetcore/PlatformBenchmarks/PlatformBenchmarks.csproj

+7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
<OutputType>Exe</OutputType>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66
<ImplicitUsings>enable</ImplicitUsings>
7+
8+
<!-- Settings applicable to JIT-based deployment -->
79
<TieredPGO>true</TieredPGO>
10+
11+
<!-- Settings applicable to AOT-based deployment -->
12+
<StripSymbols>true</StripSymbols>
13+
<IlcOptimizationPreference>Speed</IlcOptimizationPreference>
14+
<IlcPgoOptimize>true</IlcPgoOptimize>
815
</PropertyGroup>
916

1017
<PropertyGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:7.0.100 AS build
2+
RUN apt-get update
3+
RUN apt-get -yqq install clang zlib1g-dev
4+
WORKDIR /app
5+
COPY PlatformBenchmarks .
6+
RUN dotnet publish -c Release -o out -p:PublishAot=true -p:DatabaseProvider=Npgsql
7+
8+
FROM mcr.microsoft.com/dotnet/aspnet:7.0.0 AS runtime
9+
ENV ASPNETCORE_URLS http://+:8080
10+
11+
WORKDIR /app
12+
COPY --from=build /app/out ./
13+
COPY PlatformBenchmarks/appsettings.postgresql.updates.json ./appsettings.json
14+
15+
EXPOSE 8080
16+
17+
ENTRYPOINT ["./PlatformBenchmarks"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:7.0.100 AS build
2+
RUN apt-get update
3+
RUN apt-get -yqq install clang zlib1g-dev
4+
WORKDIR /app
5+
COPY PlatformBenchmarks .
6+
RUN dotnet publish -c Release -o out -p:PublishAot=true -p:DatabaseProvider=Npgsql
7+
8+
FROM mcr.microsoft.com/dotnet/aspnet:7.0.0 AS runtime
9+
ENV ASPNETCORE_URLS http://+:8080
10+
11+
WORKDIR /app
12+
COPY --from=build /app/out ./
13+
COPY PlatformBenchmarks/appsettings.postgresql.json ./appsettings.json
14+
15+
EXPOSE 8080
16+
17+
ENTRYPOINT ["./PlatformBenchmarks"]

Diff for: frameworks/CSharp/aspnetcore/aspcore-aot.dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:7.0.100 AS build
2+
RUN apt-get update
3+
RUN apt-get -yqq install clang zlib1g-dev
4+
WORKDIR /app
5+
COPY PlatformBenchmarks .
6+
RUN dotnet publish -c Release -o out -p:PublishAot=true
7+
8+
FROM mcr.microsoft.com/dotnet/aspnet:7.0.0 AS runtime
9+
ENV ASPNETCORE_URLS http://+:8080
10+
ENV DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS 1
11+
12+
WORKDIR /app
13+
COPY --from=build /app/out ./
14+
COPY Benchmarks/appsettings.json ./appsettings.json
15+
16+
EXPOSE 8080
17+
18+
ENTRYPOINT ["./PlatformBenchmarks"]

Diff for: frameworks/CSharp/aspnetcore/benchmark_config.json

+58
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@
2020
"notes": "",
2121
"versus": "aspcore"
2222
},
23+
"aot": {
24+
"plaintext_url": "/plaintext",
25+
"json_url": "/json",
26+
"port": 8080,
27+
"approach": "Realistic",
28+
"classification": "Platform",
29+
"database": "None",
30+
"framework": "ASP.NET Core",
31+
"language": "C#",
32+
"orm": "Raw",
33+
"platform": ".NET",
34+
"flavor": "NativeAOT",
35+
"webserver": "Kestrel",
36+
"os": "Linux",
37+
"database_os": "Linux",
38+
"display_name": "ASP.NET Core [Platform, NativeAOT]",
39+
"notes": "",
40+
"versus": "aspcore-aot"
41+
},
2342
"ado-pg": {
2443
"fortune_url": "/fortunes",
2544
"db_url": "/db",
@@ -41,6 +60,27 @@
4160
"notes": "",
4261
"versus": "aspcore-ado-pg"
4362
},
63+
"aot-ado-pg": {
64+
"fortune_url": "/fortunes",
65+
"db_url": "/db",
66+
"query_url": "/queries/",
67+
"cached_query_url": "/cached-worlds/",
68+
"port": 8080,
69+
"approach": "Realistic",
70+
"classification": "Platform",
71+
"database": "Postgres",
72+
"framework": "ASP.NET Core",
73+
"language": "C#",
74+
"orm": "Raw",
75+
"platform": ".NET",
76+
"flavor": "NativeAOT",
77+
"webserver": "Kestrel",
78+
"os": "Linux",
79+
"database_os": "Linux",
80+
"display_name": "ASP.NET Core [Platform, NativeAOT, Pg]",
81+
"notes": "",
82+
"versus": "aspcore-aot-ado-pg"
83+
},
4484
"ado-pg-up": {
4585
"update_url": "/updates/",
4686
"port": 8080,
@@ -59,6 +99,24 @@
5999
"notes": "",
60100
"versus": "aspcore-ado-pg-up"
61101
},
102+
"aot-ado-pg-up": {
103+
"update_url": "/updates/",
104+
"port": 8080,
105+
"approach": "Realistic",
106+
"classification": "Platform",
107+
"database": "Postgres",
108+
"framework": "ASP.NET Core",
109+
"language": "C#",
110+
"orm": "Raw",
111+
"platform": ".NET",
112+
"flavor": "NativeAOT",
113+
"webserver": "Kestrel",
114+
"os": "Linux",
115+
"database_os": "Linux",
116+
"display_name": "ASP.NET Core [Platform, NativeAOT, Pg]",
117+
"notes": "",
118+
"versus": "aspcore-aot-ado-pg-up"
119+
},
62120
"mw": {
63121
"plaintext_url": "/plaintext",
64122
"port": 8080,

Diff for: frameworks/CSharp/aspnetcore/config.toml

+40
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ platform = ".NET"
1616
webserver = "Kestrel"
1717
versus = "aspcore-ado-pg"
1818

19+
[aot-ado-pg]
20+
urls.db = "/db"
21+
urls.query = "/queries/"
22+
urls.fortune = "/fortunes"
23+
urls.cached_query = "/cached-worlds/"
24+
approach = "Realistic"
25+
classification = "Platform"
26+
database = "Postgres"
27+
database_os = "Linux"
28+
os = "Linux"
29+
orm = "Raw"
30+
platform = ".NET"
31+
webserver = "Kestrel"
32+
versus = "aspcore-aot-ado-pg"
33+
1934
[ado-my]
2035
urls.db = "/db"
2136
urls.query = "/queries/"
@@ -262,6 +277,19 @@ platform = ".NET"
262277
webserver = "Kestrel"
263278
versus = "aspcore"
264279

280+
[aot]
281+
urls.plaintext = "/plaintext"
282+
urls.json = "/json"
283+
approach = "Realistic"
284+
classification = "Platform"
285+
database = "None"
286+
database_os = "Linux"
287+
os = "Linux"
288+
orm = "Raw"
289+
platform = ".NET"
290+
webserver = "Kestrel"
291+
versus = "aspcore-aot"
292+
265293
[mvc-dap-pg-up]
266294
urls.update = "/mvc/updates/dapper?queries="
267295
approach = "Realistic"
@@ -309,3 +337,15 @@ orm = "Raw"
309337
platform = ".NET"
310338
webserver = "Kestrel"
311339
versus = "aspcore-ado-pg-up"
340+
341+
[aot-ado-pg-up]
342+
urls.update = "/updates/"
343+
approach = "Realistic"
344+
classification = "Platform"
345+
database = "Postgres"
346+
database_os = "Linux"
347+
os = "Linux"
348+
orm = "Raw"
349+
platform = ".NET"
350+
webserver = "Kestrel"
351+
versus = "aspcore-ado-pg-up"

0 commit comments

Comments
 (0)