Skip to content

Commit 6a48c96

Browse files
committed
Support database
1 parent c944e6d commit 6a48c96

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
2+
WORKDIR /app
3+
COPY . .
4+
RUN dotnet publish ./src/BenchmarksApps/TechEmpower/PlatformBenchmarks/PlatformBenchmarks.csproj -c Release -o out -f net9.0 /p:IsDatabase=true
5+
COPY ./src/BenchmarksApps/TechEmpower/startprocess.sh out
6+
7+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
8+
ENV URLS=http://+:8080
9+
10+
WORKDIR /app
11+
COPY --from=build /app/out ./
12+
13+
EXPOSE 8080
14+
15+
CMD ["./startprocess.sh"]
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
imports:
2+
- https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Wrk/wrk.yml
3+
- https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Bombardier/bombardier.yml
4+
- https://github.com/aspnet/Benchmarks/blob/main/scenarios/aspnet.profiles.yml?raw=true
5+
6+
jobs:
7+
8+
aspnetcore:
9+
source:
10+
repository: https://github.com/aspnet/Benchmarks
11+
branchOrCommit: main
12+
dockerFile: src/BenchmarksApps/TechEmpower/dockerfile
13+
dockerImageName: aspnetcore_reuse
14+
dockerContextDirectory: ./
15+
readyStateText: Application started
16+
arguments: --add-host="tfb-database:{{databaseServer}}"
17+
noClean: true
18+
19+
postgresql:
20+
source:
21+
repository: https://github.com/TechEmpower/FrameworkBenchmarks.git
22+
branchOrCommit: master
23+
dockerFile: toolset/databases/postgres/postgres.dockerfile
24+
dockerImageName: postgres_te
25+
dockerContextDirectory: toolset/databases/postgres
26+
readyStateText: ready to accept connections
27+
noClean: true
28+
29+
scenarios:
30+
31+
# ASP.NET Core (Platform)
32+
plaintext_aspnetcore:
33+
application:
34+
job: aspnetcore
35+
load:
36+
job: wrk
37+
variables:
38+
presetHeaders: plaintext
39+
path: /plaintext
40+
pipeline: 16
41+
serverPort: 8080
42+
43+
json_aspnetcore:
44+
application:
45+
job: aspnetcore
46+
load:
47+
job: wrk
48+
variables:
49+
presetHeaders: json
50+
path: /json
51+
serverPort: 8080
52+
53+
fortunes_aspnetcore:
54+
db:
55+
job: postgresql
56+
application:
57+
job: aspnetcore
58+
source:
59+
dockerFile: src/BenchmarksApps/TechEmpower/dockerfile-db
60+
dockerImageName: aspnetcore_reuse_db
61+
load:
62+
job: wrk
63+
variables:
64+
presetHeaders: html
65+
path: /fortunes
66+
serverPort: 8080

0 commit comments

Comments
 (0)