Skip to content

Commit 1af4f50

Browse files
committed
wrap in function + include openssl 3.0.15 comparison
1 parent b53e58b commit 1af4f50

File tree

2 files changed

+39
-19
lines changed

2 files changed

+39
-19
lines changed

scenarios/tls.benchmarks.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,23 @@ scenarios:
177177
- OPENSSL_VERSION="1.1.1w-r1"
178178
# lookup for openssl+branch version here https://pkgs.alpinelinux.org/packages?name=openssl&branch=v3.20&repo=&arch=x86_64
179179
- ALPINE_BRANCH="v3.16"
180+
load:
181+
job: httpclient
182+
variables:
183+
path: /hello-world
184+
serverPort: 8080
185+
presetHeaders: connectionclose
186+
connections: 32
187+
serverScheme: https
188+
189+
tls-handshakes-docker-openssl-3015:
190+
application:
191+
job: dockerLinuxKestrelServer
192+
buildArguments:
193+
# openssl version to install
194+
- OPENSSL_VERSION="3.0.15-r1"
195+
# lookup for openssl+branch version here https://pkgs.alpinelinux.org/packages?name=openssl&branch=v3.20&repo=&arch=x86_64
196+
- ALPINE_BRANCH="v3.17"
180197
load:
181198
job: httpclient
182199
variables:

src/BenchmarksApps/TLS/Kestrel/Program.cs

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,6 @@
88

99
Console.WriteLine("Starting application...");
1010

11-
using var process = new Process()
12-
{
13-
StartInfo =
14-
{
15-
FileName = "/usr/bin/env",
16-
Arguments = "openssl version",
17-
RedirectStandardOutput = true,
18-
RedirectStandardError = true,
19-
UseShellExecute = false,
20-
CreateNoWindow = true,
21-
},
22-
EnableRaisingEvents = true,
23-
};
24-
25-
process.Start();
26-
process.WaitForExit();
27-
string output = process.StandardOutput.ReadToEnd();
28-
Console.WriteLine("In app openssl version: \n" + output + "\n\n");
29-
3011
var builder = WebApplication.CreateBuilder(args);
3112
builder.Logging.ClearProviders();
3213

@@ -142,6 +123,7 @@ bool AllowAnyCertificateValidationWithLogging(X509Certificate2 certificate, X509
142123
await app.StartAsync();
143124

144125
Console.WriteLine("Application Info:");
126+
LogOpenSSLVersion();
145127
if (mTlsEnabled)
146128
{
147129
Console.WriteLine($"\tmTLS is enabled (client cert is required)");
@@ -178,4 +160,25 @@ static IPEndPoint CreateIPEndPoint(UrlPrefix urlPrefix)
178160
}
179161

180162
return new IPEndPoint(ip, urlPrefix.PortValue);
163+
}
164+
165+
static void LogOpenSSLVersion()
166+
{
167+
using var process = new Process()
168+
{
169+
StartInfo =
170+
{
171+
FileName = "/usr/bin/env",
172+
Arguments = "openssl version",
173+
RedirectStandardOutput = true,
174+
RedirectStandardError = true,
175+
UseShellExecute = false,
176+
CreateNoWindow = true
177+
},
178+
};
179+
180+
process.Start();
181+
process.WaitForExit();
182+
var output = process.StandardOutput.ReadToEnd();
183+
Console.WriteLine("In app openssl version: " + output);
181184
}

0 commit comments

Comments
 (0)