From nobody Fri Mar 08 22:52:43 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ts1f35FRWz5F09C; Fri, 8 Mar 2024 22:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ts1f34Xw2z4D81; Fri, 8 Mar 2024 22:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709938363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fw18+XHJa0EhTG29AkQnpC/BOlhyy0WQ1o1yaiAIY6Y=; b=Lfh9Xmoy8L2nxh4mUolX78+wYQ6p8+jgIAE/FDNhX4uti5g+sCRga2WiOKGw9/6rlkwoWE 06BB2HA5zHAaf/sfhxTUKyykDFokzjyPG5kAvVwjvf0IVENp2hFlfhZ0I3wA9AqAmoTxo3 X0ex5P/PTrrVW8YDPFLbLWUr2C7XNot5gn4Y//zuw1k+wL2fsBvT0pqPKznyNti5paBNng np1yxin/+/Vr3RqsbqmKvEOiq3Bw/1zHbu/dYLrAjvFFMB2TpFNNLmA4hvrm9ceAvYvzih x803su45b2Kj0Ll19h88HS7Sv16fGkxE4dtiY858PTDSVTucrPYtdWjz8jD0Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709938363; a=rsa-sha256; cv=none; b=HIm0os0bVIESVoWIspx1bDuFVJL11vnmrO1RO3lLjsucT/CGcOnVLc4MGDSrSrRonL/usM oKRi6HaOj3yEHnfo7nk3ecZ0X6cCb91NOeH21CQf+IuhXGBTKclan2VUcxj6oJBmU1hE4d 3W+WJufp6L0uBydayYwDXWPIRUKUL8rn07EO7WCYhOOUTc7mqkMQm1i5zSUkHSHGi0w0LM LsocVQdMmmB3+lHlTNHf7VCsFGxCg/YxqS/e1eN3kcP+h+tXcod55Af1eJMN/j3kEaBwvp OCgyBnClmeytUSKEONlnY6R6lrS3rBpKp4e6MbsKveiITCXTfRxovfUZQCkXqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709938363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fw18+XHJa0EhTG29AkQnpC/BOlhyy0WQ1o1yaiAIY6Y=; b=KU2bhs7bwprNRM9N60RcA6JkFMARKfCDFYk7TVuXRQrEFA5gDkJ7DqGvmsbRKhCbw5SMSE bWSrN5waAya7Hd9BA9Xq7C/Ef0N9yncN+Ip2vspguUaZ2NcwHCWeus/218xKjeP9C8FQ3a dZyy9yASHeu8k83cSK5cUmQkK1eNXqOjpYGBTXG14lZw93Gs/rt4M/jwBnt6vcghROeCQ6 GwWDodwfJn2Optbbd7ti1hrmqaajxI/7XrGez+idBMC4tJU0iK1Wcx7Q/inDoR3iloKvg3 PhYgdAzqbr4S+Bbb8XFqDoXzTRTibOQLIP0Pavnu/7FRowROuDGWTn+W+NIW7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ts1f33ssQzdJj; Fri, 8 Mar 2024 22:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 428Mqh7L045931; Fri, 8 Mar 2024 22:52:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 428MqhX8045928; Fri, 8 Mar 2024 22:52:43 GMT (envelope-from git) Date: Fri, 8 Mar 2024 22:52:43 GMT Message-Id: <202403082252.428MqhX8045928@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Olivier Cochard Subject: git: 9b1521f73360 - main - benchmarks/ipc-bench: Add new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b1521f73360a038e32fe7c5951079b019751f7f Auto-Submitted: auto-generated The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/ports/commit/?id=9b1521f73360a038e32fe7c5951079b019751f7f commit 9b1521f73360a038e32fe7c5951079b019751f7f Author: Olivier Cochard AuthorDate: 2024-03-08 22:49:25 +0000 Commit: Olivier Cochard CommitDate: 2024-03-08 22:51:08 +0000 benchmarks/ipc-bench: Add new port Benchmarks for various inter-process-communication (IPC) methods. Sponsored by: Netflix --- benchmarks/Makefile | 1 + benchmarks/ipc-bench/Makefile | 39 +++++++++++++++++++ benchmarks/ipc-bench/distinfo | 3 ++ .../ipc-bench/files/patch-source_CMakeLists.txt | 10 +++++ .../ipc-bench/files/patch-source_common_process.c | 44 ++++++++++++++++++++++ benchmarks/ipc-bench/pkg-descr | 3 ++ benchmarks/ipc-bench/pkg-plist | 25 ++++++++++++ 7 files changed, 125 insertions(+) diff --git a/benchmarks/Makefile b/benchmarks/Makefile index 554da41fe93d..28f1fe955405 100644 --- a/benchmarks/Makefile +++ b/benchmarks/Makefile @@ -35,6 +35,7 @@ SUBDIR += iorate SUBDIR += iozone SUBDIR += iozone21 + SUBDIR += ipc-bench SUBDIR += iperf SUBDIR += iperf3 SUBDIR += kdiskmark diff --git a/benchmarks/ipc-bench/Makefile b/benchmarks/ipc-bench/Makefile new file mode 100644 index 000000000000..80806e497baa --- /dev/null +++ b/benchmarks/ipc-bench/Makefile @@ -0,0 +1,39 @@ +PORTNAME= ipc-bench +DISTVERSION= 1.0 +CATEGORIES= benchmarks + +MAINTAINER= olivier@FreeBSD.org +COMMENT= Benchmarks for various inter-process-communication (IPC) +WWW= https://github.com/intel/uintr-ipc-bench + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= cmake:noninja pkgconfig +USE_GITHUB= yes +GH_ACCOUNT= goldsborough +GH_PROJECT= ipc-bench +GH_TAGNAME= 589146a + +BINARIES= domain fifo mmap mq shm signal tcp + +OPTIONS_DEFINE= ZMQ +OPTIONS_SUB= yes +ZMQ_DESC= Enable ZeroMQ benches via libzmq${ZMQ_VERSION} +ZMQ_LIB_DEPENDS= libzmq.so:net/libzmq${ZMQ_VERSION} +ZMQ_VERSION?= 4 + +.include +.if ${PORT_OPTIONS:MZMQ} +BINARIES+= zeromq +.endif + +do-install: + ${INSTALL_PROGRAM} ${WRKDIR}/.build/source/pipe/pipe ${STAGEDIR}${PREFIX}/bin +.for f in ${BINARIES} + ${INSTALL_PROGRAM} ${WRKDIR}/.build/source/${f}/${f} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKDIR}/.build/source/${f}/${f}-client ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKDIR}/.build/source/${f}/${f}-server ${STAGEDIR}${PREFIX}/bin +.endfor + +.include diff --git a/benchmarks/ipc-bench/distinfo b/benchmarks/ipc-bench/distinfo new file mode 100644 index 000000000000..11e7ce8c16a2 --- /dev/null +++ b/benchmarks/ipc-bench/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1709854860 +SHA256 (goldsborough-ipc-bench-1.0-589146a_GH0.tar.gz) = 734b25b219c35b4818693501b399f66b1739c31b395ced7f7050ffbc78576762 +SIZE (goldsborough-ipc-bench-1.0-589146a_GH0.tar.gz) = 347091 diff --git a/benchmarks/ipc-bench/files/patch-source_CMakeLists.txt b/benchmarks/ipc-bench/files/patch-source_CMakeLists.txt new file mode 100644 index 000000000000..e6f2eea6ac07 --- /dev/null +++ b/benchmarks/ipc-bench/files/patch-source_CMakeLists.txt @@ -0,0 +1,10 @@ +--- source/CMakeLists.txt.orig 2024-03-08 21:54:22 UTC ++++ source/CMakeLists.txt +@@ -39,7 +39,6 @@ add_subdirectory(signal) + add_subdirectory(domain) + add_subdirectory(mq) + add_subdirectory(signal) +-add_subdirectory(shm-sync) + + if (NOT APPLE) + add_subdirectory(eventfd) diff --git a/benchmarks/ipc-bench/files/patch-source_common_process.c b/benchmarks/ipc-bench/files/patch-source_common_process.c new file mode 100644 index 000000000000..661d21c74e48 --- /dev/null +++ b/benchmarks/ipc-bench/files/patch-source_common_process.c @@ -0,0 +1,44 @@ +--- source/common/process.c.orig 2022-04-28 15:09:32 UTC ++++ source/common/process.c +@@ -55,7 +55,7 @@ pid_t start_process(char *argv[]) { + // second is an array of arguments, where the + // command path has to be included as well + // (that's why argv[0] first) +- if (execv(argv[0], argv) == -1) { ++ if (execvp(argv[0], argv) == -1) { + throw("Error opening child process"); + } + } +@@ -83,24 +83,18 @@ void start_children(char *prefix, int argc, char *argv + char server_name[100]; + char client_name[100]; + +- char *build_path = find_build_path(); +- + // clang-format off + sprintf( + server_name, +- "%s/%s/%s-%s", +- build_path, ++ "%s-%s", + prefix, +- prefix, + "server" + ); + + sprintf( + client_name, +- "%s/%s/%s-%s", +- build_path, ++ "%s-%s", + prefix, +- prefix, + "client" + ); + // clang-format on +@@ -111,5 +105,4 @@ void start_children(char *prefix, int argc, char *argv + waitpid(c1_id, NULL, WUNTRACED); + waitpid(c2_id, NULL, WUNTRACED); + +- free(build_path); + } diff --git a/benchmarks/ipc-bench/pkg-descr b/benchmarks/ipc-bench/pkg-descr new file mode 100644 index 000000000000..ddb24c0fb193 --- /dev/null +++ b/benchmarks/ipc-bench/pkg-descr @@ -0,0 +1,3 @@ +Benchmarks for various inter-process-communication (IPC) methods: +ZeroMQ, TCP socket (tcp), domain socket (domain), named pipes (fifo), signal, +memory mapped file (mmap), message queues (mq), pipe, shared memory (shm). diff --git a/benchmarks/ipc-bench/pkg-plist b/benchmarks/ipc-bench/pkg-plist new file mode 100644 index 000000000000..dbe9d4bc703e --- /dev/null +++ b/benchmarks/ipc-bench/pkg-plist @@ -0,0 +1,25 @@ +bin/domain +bin/domain-client +bin/domain-server +bin/fifo +bin/fifo-client +bin/fifo-server +bin/mmap +bin/mmap-client +bin/mmap-server +bin/mq +bin/mq-client +bin/mq-server +bin/pipe +bin/shm +bin/shm-client +bin/shm-server +bin/signal +bin/signal-client +bin/signal-server +bin/tcp +bin/tcp-client +bin/tcp-server +%%ZMQ%%bin/zeromq +%%ZMQ%%bin/zeromq-client +%%ZMQ%%bin/zeromq-server