Skip to content

Restructure benchmark scripts#57

Merged
Sashan merged 3 commits into
openssl:mainfrom
jogme:rename_bench_scripts
Oct 28, 2025
Merged

Restructure benchmark scripts#57
Sashan merged 3 commits into
openssl:mainfrom
jogme:rename_bench_scripts

Conversation

@jogme

@jogme jogme commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Detailed information about the reason doing this is at openssl/project#1683

Resolves: openssl/project#1684
Resolves: openssl/project#1685

@jogme jogme requested a review from Sashan October 21, 2025 12:59

@Sashan Sashan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep definitions of global env. variables in run/config scripts. diff below does this tweak. otherwise it looks good.

diff --git a/bench-scripts/bench_config_apache.sh b/bench-scripts/bench_config_apache.sh
index 613fd57..3c4e480 100755
--- a/bench-scripts/bench_config_apache.sh
+++ b/bench-scripts/bench_config_apache.sh
@@ -53,10 +53,15 @@ set -x
 #
 
 INSTALL_ROOT=${BENCH_INSTALL_ROOT:-"/tmp/bench.binaries"}
+RESULT_DIR=${BENCH_RESULTS:-"${INSTALL_ROOT}/results"}
 WORKSPACE_ROOT=${BENCH_WORKSPACE_ROOT:-"/tmp/bench.workspace"}
 MAKE_OPTS=${BENCH_MAKE_OPTS}
 HTTPS_PORT=${BENCH_HTTPS_PORT:-'4430'}
 HTTP_PORT=${BENCH_HTTP_PORT:-'8080'}
+CERT_SUBJ=${BENCH_CERT_SUBJ:-'/CN=localhost'}
+CERT_ALT_SUBJ=${BENCH_CERT_ALT_SUBJ:-'subjectAltName=DNS:localhost,IP:127.0.0.1'}
+TEST_TIME=${BENCH_TEST_TIME:-'5M'}
+HOST=${BENCH_HOST:-'127.0.0.1'}
 APACHE_VERSION='2.4.65'
 
 . ./common_util.sh
diff --git a/bench-scripts/bench_config_haproxy.sh b/bench-scripts/bench_config_haproxy.sh
index 4ed4218..d75aed9 100755
--- a/bench-scripts/bench_config_haproxy.sh
+++ b/bench-scripts/bench_config_haproxy.sh
@@ -17,6 +17,7 @@ HAPROXY_NOSSL_PORT='42128'
 HAPROXY_C2P_PORT='42132'
 HAPROXY_P2S_PORT='42134'
 HAPROXY_C2S_PORT='42136'
+CERT_SUBJ=${BENCH_CERT_SUBJ:-'/CN=localhost'}
 CERT_ALT_SUBJ=${BENCH_CERT_ALT_SUBJ:-'subjectAltName=DNS:localhost,IP:127.0.0.1'}
 HOST=${BENCH_HOST:-'127.0.0.1'}
 HAPROXY_VERSION='v3.2.0'
diff --git a/bench-scripts/bench_config_nginx.sh b/bench-scripts/bench_config_nginx.sh
index 53d2ed6..b871d9c 100755
--- a/bench-scripts/bench_config_nginx.sh
+++ b/bench-scripts/bench_config_nginx.sh
@@ -18,10 +18,13 @@ set -x
 #
 INSTALL_ROOT=${BENCH_INSTALL_ROOT:-"/tmp/bench.binaries"}
 WORKSPACE_ROOT=${BENCH_WORKSPACE_ROOT:-"/tmp/bench.workspace"}
-RESULT_DIR=${BENCH_RESULTS:-"${INSTALL_ROOT}/results"}
 MAKE_OPTS=${BENCH_MAKE_OPTS}
 HTTPS_PORT=${BENCH_HTTPS_PORT:-'4430'}
 HTTP_PORT=${BENCH_HTTP_PORT:-'8080'}
+CERT_SUBJ=${BENCH_CERT_SUBJ:-'/CN=localhost'}
+CERT_ALT_SUBJ=${BENCH_CERT_ALT_SUBJ:-'subjectAltName=DNS:localhost,IP:127.0.0.1'}
+TEST_TIME=${BENCH_TEST_TIME:-'5M'}
+HOST=${BENCH_HOST:-'127.0.0.1'}
 
 . ./common_util.sh
 
diff --git a/bench-scripts/bench_run_apache.sh b/bench-scripts/bench_run_apache.sh
index e538f7c..14ca505 100755
--- a/bench-scripts/bench_run_apache.sh
+++ b/bench-scripts/bench_run_apache.sh
@@ -54,10 +54,14 @@ set -x
 
 INSTALL_ROOT=${BENCH_INSTALL_ROOT:-"/tmp/bench.binaries"}
 RESULT_DIR=${BENCH_RESULTS:-"${INSTALL_ROOT}/results"}
+WORKSPACE_ROOT=${BENCH_WORKSPACE_ROOT:-"/tmp/bench.workspace"}
 HTTPS_PORT=${BENCH_HTTPS_PORT:-'4430'}
 HTTP_PORT=${BENCH_HTTP_PORT:-'8080'}
+CERT_SUBJ=${BENCH_CERT_SUBJ:-'/CN=localhost'}
+CERT_ALT_SUBJ=${BENCH_CERT_ALT_SUBJ:-'subjectAltName=DNS:localhost,IP:127.0.0.1'}
 TEST_TIME=${BENCH_TEST_TIME:-'5M'}
 HOST=${BENCH_HOST:-'127.0.0.1'}
+APACHE_VERSION='2.4.65'
 HAPROXY='no'
 
 . ./common_util.sh
diff --git a/bench-scripts/bench_run_haproxy.sh b/bench-scripts/bench_run_haproxy.sh
index 2c318cd..269e41e 100755
--- a/bench-scripts/bench_run_haproxy.sh
+++ b/bench-scripts/bench_run_haproxy.sh
@@ -11,6 +11,7 @@
 set -x
 
 INSTALL_ROOT=${BENCH_INSTALL_ROOT:-"/tmp/bench.binaries"}
+RESULT_DIR=${BENCH_RESULTS:-"${INSTALL_ROOT}/results"}
 
 function run_haproxy {
     typeset SSL_LIB=$1

Comment thread bench-scripts/common_util.sh Outdated
Comment thread bench-scripts/apache_bench.sh
Comment thread bench-scripts/apache_bench.sh
Comment thread bench-scripts/nginx_bench.sh
Comment thread bench-scripts/haproxy_bench.sh
Comment thread bench-scripts/apache_bench.sh
@jogme jogme force-pushed the rename_bench_scripts branch from 2581f2b to f3d9933 Compare October 23, 2025 09:28
@jogme

jogme commented Oct 23, 2025

Copy link
Copy Markdown
Contributor Author

Some changes broke the script.. Looking into it

@Sashan Sashan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, I've just added a suggestion to update README.md. please check it and adjust it as you desire. if you like it, just resubmit PR and I will approve it.
thanks.

Sashan and others added 2 commits October 24, 2025 15:43
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
@jogme jogme force-pushed the rename_bench_scripts branch from 88ad1b8 to 7cb47a6 Compare October 24, 2025 13:44
@jogme

jogme commented Oct 24, 2025

Copy link
Copy Markdown
Contributor Author

@Sashan I fixed a few nits in the readme and I redid the whole other patch, because I had an issue there which caused haproxy to not run.. PTAL

Comment thread bench-scripts/bench_run_haproxy.sh
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
@jogme jogme force-pushed the rename_bench_scripts branch from 7cb47a6 to cd54037 Compare October 27, 2025 08:02

@Sashan Sashan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. thanks. let's get this in.

@Sashan Sashan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me.

@Sashan Sashan merged commit 93fb37b into openssl:main Oct 28, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

split bench_*.sh scripts to configurre and run part rename bencharks scripts

2 participants