Skip to content
Open
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
1 change: 1 addition & 0 deletions docker/benchmarks/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker build -t benchmarks -f Dockerfile ../../
9 changes: 9 additions & 0 deletions docker/benchmarks/run-client.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
docker run `
-d `
--log-opt max-size=10m `
--log-opt max-file=3 `
--name benchmarks-client `
-p 5002:5002 `
--restart always `
benchmarks `
dotnet run -c Debug --project src/BenchmarksClient/BenchmarksClient.csproj
26 changes: 26 additions & 0 deletions docker/benchmarks/run-server.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
param(
[string]$ServerIp="",
[string]$HardwareVersion="",
[string]$Hardware="",
[string]$Url="",
[string]$Name=""
)

$PostgreSql='--postgresql "Server=TFB-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Max Auto Prepare=3"'
$MySql='--mysql "Server=TFB-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;SslMode=None;ConnectionReset=false"'
$MsSql='--mssql "Server=TFB-database;Database=hello_world;User Id=sa;Password=Benchmarkdbp@55;Max Pool Size=100;"'
$MongoDb='--mongodb "mongodb://TFB-database:27017?maxPoolSize=1024"'

# "--network host" - Better performance than the default "bridge" driver
# "-v /var/run/docker.sock" - Give container access to the host docker daemon
docker run `
-d `
--log-opt max-size=10m `
--log-opt max-file=3 `
--name benchmarks-server `
-p 5001:5001 `
--restart always `
-v /var/run/docker.sock:/var/run/docker.sock `
benchmarks `
bash -c `
"dotnet run -c Debug --project src/BenchmarksServer/BenchmarksServer.csproj -n 10.0.75.0 --url http://*:5001 --hardware physical --hardware-version laptop"
2 changes: 2 additions & 0 deletions docker/benchmarks/stop-client.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker stop benchmarks-client
docker rm benchmarks-client
2 changes: 2 additions & 0 deletions docker/benchmarks/stop-server.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker stop benchmarks-server
docker rm benchmarks-server