# Example: # crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/sslstream.benchmarks.yml --scenario read-write --profile aspnet-perf-lin imports: - https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/aspnet.profiles.standard.yml variables: # common parameters serverPort: 5000 sendBufferSize: 32768 # bytes receiveBufferSize: 32768 # bytes tlsVersion: "1.3" # <1.2|1.3> serverCertSelection: "CertContext" # clientCertSelection: "CertContext" # allowTlsResume: true # can be changed for .NET 8+ only; defaults to true in SslStream implementation since .NET 7 # client-specific parameters connections: 1 #number of parallel connections warmup: 15 #seconds duration: 15 #seconds # server-specific parameters # requireClientCert: false scenarios: read-write: server: job: sslServer agent: secondary client: job: sslClient agent: main variables: scenario: ReadWrite host: "{{secondaryAddress}}" client-read: server: job: sslServer agent: secondary variables: sendBufferSize: 0 # server's receive buffer size -- send and receive sizes are swapped for server side onConfigure: - ' if (String(job.Variables.sendBufferSize) != "0") { throw "Incorrect sendBufferSize for client-read scenario. Expected: 0, got: " + job.Variables.sendBufferSize; } ' client: job: sslClient agent: main variables: scenario: ReadWrite host: "{{secondaryAddress}}" sendBufferSize: 0 onConfigure: - ' if (String(job.Variables.sendBufferSize) != "0") { throw "Incorrect sendBufferSize for client-read scenario. Expected: 0, got: " + job.Variables.sendBufferSize; } ' client-write: server: job: sslServer agent: secondary variables: receiveBufferSize: 0 # server's write buffer size -- send and receive sizes are swapped for server side onConfigure: - ' if (String(job.Variables.receiveBufferSize) != "0") { throw "Incorrect receiveBufferSize for client-write scenario. Expected: 0, got: " + job.Variables.receiveBufferSize; } ' client: job: sslClient agent: main variables: scenario: ReadWrite host: "{{secondaryAddress}}" receiveBufferSize: 0 onConfigure: - ' if (String(job.Variables.receiveBufferSize) != "0") { throw "Incorrect receiveBufferSize for client-write scenario. Expected: 0, got: " + job.Variables.receiveBufferSize; } ' handshake: server: job: sslServer agent: secondary client: job: sslClient agent: main variables: scenario: Handshake host: "{{secondaryAddress}}" rps: server: job: sslServer agent: secondary client: job: sslClient agent: main variables: scenario: Rps host: "{{secondaryAddress}}" jobs: sslServer: source: repository: https://github.com/aspnet/benchmarks.git branchOrCommit: main project: src/System/Net/Benchmarks/Apps/Streaming/Tls/SslStream/Server/SslStreamServer.csproj readyStateText: Listening on # app should write this line to output when ready # note: send and receive sizes are swapped for server side arguments: "--port {{serverPort}} --receive-buffer-size {{sendBufferSize}} --send-buffer-size {{receiveBufferSize}} --tls-version {{tlsVersion}} --cert-selection {{serverCertSelection}} --allow-tls-resume {{allowTlsResume}}" sslClient: source: repository: https://github.com/aspnet/benchmarks.git branchOrCommit: main project: src/System/Net/Benchmarks/Apps/Streaming/Tls/SslStream/Client/SslStreamClient.csproj isConsoleApp: true waitForExit: true timeout: 300 #seconds arguments: "--host {{host}} --port {{serverPort}} --receive-buffer-size {{receiveBufferSize}} --send-buffer-size {{sendBufferSize}} --tls-version {{tlsVersion}} --cert-selection {{clientCertSelection}} --scenario {{scenario}} --connections {{connections}} --warmup {{warmup}} --duration {{duration}} --allow-tls-resume {{allowTlsResume}}"